OPEN-SOURCE SCRIPT
Aggiornato The Bitterroot Trader Checklist

//version=5
indicator("Syntax-Safe Confluence Gauge", overlay=true)
// --- 1. INPUTS ---
col_ema9 = input.color(#00bcd4, "9 EMA Color")
col_ema20 = input.color(#ff9800, "20 EMA Color")
col_ema60 = input.color(#f44336, "60 EMA Color")
col_vwap = input.color(color.gray, "VWAP Color")
// --- 2. 48-HOUR DATA ---
h48 = ta.highest(high, 100)
l48 = ta.lowest(low, 100)
v48_avg = ta.sma(volume, 100)
// --- 3. CALCULATIONS ---
[macdLine, signalLine, hist] = ta.macd(close, 12, 26, 9)
e9 = ta.ema(close, 9), e20 = ta.ema(close, 20), e60 = ta.ema(close, 60)
v_wap = ta.vwap(close)
// --- 4. SCORING & CHECKLIST LOGIC ---
bool c1 = macdLine > signalLine
bool c2_bull = (volume > v48_avg and close > open)
bool c2_bear = (volume > v48_avg and close < open)
bool c3 = (e9 > e20 and e20 > e60)
bool c4_bull = close > h48[1]
bool c4_bear = close < l48[1]
bool c5 = close > v_wap
// Final Scoring
float s2 = c2_bull ? 1.0 : c2_bear ? -1.0 : 0.0
float s4 = c4_bull ? 1.0 : c4_bear ? -1.0 : 0.0
float live_mean = ((c1 ? 1 : -1) + s2 + (c3 ? 1 : -1) + s4 + (c5 ? 1 : -1)) / 5.0
// Count active checks for Alerts
int bull_checks = (c1 ? 1 : 0) + (c2_bull ? 1 : 0) + (c3 ? 1 : 0) + (c4_bull ? 1 : 0) + (c5 ? 1 : 0)
int bear_checks = (macdLine < signalLine ? 1 : 0) + (c2_bear ? 1 : 0) + (e9 < e20 and e20 < e60 ? 1 : 0) + (c4_bear ? 1 : 0) + (close < v_wap ? 1 : 0)
// --- 5. ALERTS ---
alertcondition(bull_checks >= 4, title="Strong Bullish Confluence", message="4+ Bullish Checks Aligned!")
alertcondition(bear_checks >= 4, title="Strong Bearish Confluence", message="4+ Bearish Checks Aligned!")
// --- 6. COLOR ENGINE ---
bool macd_curling_up = hist > hist[1]
bool macd_curling_down = hist < hist[1]
color final_c = #808080
if live_mean <= -0.1
final_c := (live_mean <= -0.8) ? #ff0000 : #8b0000
if macd_curling_up
final_c := #d84315
else if live_mean >= 0.1
final_c := (live_mean >= 0.8) ? #00ff00 : #006400
if macd_curling_down
final_c := #9e9d24
else
final_c := #808080
// --- 7. REWRITTEN NEEDLE LOGIC (Fixes the Mismatched Input Error) ---
string needle = switch
live_mean <= -1.0 => "┃ "
live_mean <= -0.6 => " ┃ "
live_mean <= -0.2 => " ┃ "
live_mean == 0.0 => " ┃ "
live_mean <= 0.4 => " ┃ "
live_mean <= 0.8 => " ┃ "
=> " ┃"
// --- 8. TABLE DISPLAY ---
var table gauge = table.new(position.top_right, 1, 1)
if barstate.islast
string check1 = "MACD: " + (c1 ? "✅" : "❌")
string check2 = "VOL: " + (s2 > 0 ? "✅" : s2 < 0 ? "❌" : "➖")
string check3 = "EMA: " + (c3 ? "✅" : "❌")
string check4 = "48H: " + (s4 > 0 ? "✅" : s4 < 0 ? "❌" : "➖")
string check5 = "VWAP: " + (c5 ? "✅" : "❌")
string display_text = "48H MEAN: " + str.tostring(live_mean, "#.#") + "\n" +
" [ R ▬▬▬|▬▬▬ G ]\n" +
" " + needle + "\n" +
"------------------\n" +
check1 + " | " + check2 + "\n" +
check3 + " | " + check4 + "\n" +
check5 + " | CURL: " + (macd_curling_up ? "UP" : "DN")
table.cell(gauge, 0, 0, display_text, bgcolor=color.new(final_c, 85), text_color=final_c, text_size=size.large)
// --- 9. PLOTS ---
plot(h48, "48H High", color=color.new(#00ff00, 50), style=plot.style_stepline)
plot(l48, "48H Low", color=color.new(#ff0000, 50), style=plot.style_stepline)
indicator("Syntax-Safe Confluence Gauge", overlay=true)
// --- 1. INPUTS ---
col_ema9 = input.color(#00bcd4, "9 EMA Color")
col_ema20 = input.color(#ff9800, "20 EMA Color")
col_ema60 = input.color(#f44336, "60 EMA Color")
col_vwap = input.color(color.gray, "VWAP Color")
// --- 2. 48-HOUR DATA ---
h48 = ta.highest(high, 100)
l48 = ta.lowest(low, 100)
v48_avg = ta.sma(volume, 100)
// --- 3. CALCULATIONS ---
[macdLine, signalLine, hist] = ta.macd(close, 12, 26, 9)
e9 = ta.ema(close, 9), e20 = ta.ema(close, 20), e60 = ta.ema(close, 60)
v_wap = ta.vwap(close)
// --- 4. SCORING & CHECKLIST LOGIC ---
bool c1 = macdLine > signalLine
bool c2_bull = (volume > v48_avg and close > open)
bool c2_bear = (volume > v48_avg and close < open)
bool c3 = (e9 > e20 and e20 > e60)
bool c4_bull = close > h48[1]
bool c4_bear = close < l48[1]
bool c5 = close > v_wap
// Final Scoring
float s2 = c2_bull ? 1.0 : c2_bear ? -1.0 : 0.0
float s4 = c4_bull ? 1.0 : c4_bear ? -1.0 : 0.0
float live_mean = ((c1 ? 1 : -1) + s2 + (c3 ? 1 : -1) + s4 + (c5 ? 1 : -1)) / 5.0
// Count active checks for Alerts
int bull_checks = (c1 ? 1 : 0) + (c2_bull ? 1 : 0) + (c3 ? 1 : 0) + (c4_bull ? 1 : 0) + (c5 ? 1 : 0)
int bear_checks = (macdLine < signalLine ? 1 : 0) + (c2_bear ? 1 : 0) + (e9 < e20 and e20 < e60 ? 1 : 0) + (c4_bear ? 1 : 0) + (close < v_wap ? 1 : 0)
// --- 5. ALERTS ---
alertcondition(bull_checks >= 4, title="Strong Bullish Confluence", message="4+ Bullish Checks Aligned!")
alertcondition(bear_checks >= 4, title="Strong Bearish Confluence", message="4+ Bearish Checks Aligned!")
// --- 6. COLOR ENGINE ---
bool macd_curling_up = hist > hist[1]
bool macd_curling_down = hist < hist[1]
color final_c = #808080
if live_mean <= -0.1
final_c := (live_mean <= -0.8) ? #ff0000 : #8b0000
if macd_curling_up
final_c := #d84315
else if live_mean >= 0.1
final_c := (live_mean >= 0.8) ? #00ff00 : #006400
if macd_curling_down
final_c := #9e9d24
else
final_c := #808080
// --- 7. REWRITTEN NEEDLE LOGIC (Fixes the Mismatched Input Error) ---
string needle = switch
live_mean <= -1.0 => "┃ "
live_mean <= -0.6 => " ┃ "
live_mean <= -0.2 => " ┃ "
live_mean == 0.0 => " ┃ "
live_mean <= 0.4 => " ┃ "
live_mean <= 0.8 => " ┃ "
=> " ┃"
// --- 8. TABLE DISPLAY ---
var table gauge = table.new(position.top_right, 1, 1)
if barstate.islast
string check1 = "MACD: " + (c1 ? "✅" : "❌")
string check2 = "VOL: " + (s2 > 0 ? "✅" : s2 < 0 ? "❌" : "➖")
string check3 = "EMA: " + (c3 ? "✅" : "❌")
string check4 = "48H: " + (s4 > 0 ? "✅" : s4 < 0 ? "❌" : "➖")
string check5 = "VWAP: " + (c5 ? "✅" : "❌")
string display_text = "48H MEAN: " + str.tostring(live_mean, "#.#") + "\n" +
" [ R ▬▬▬|▬▬▬ G ]\n" +
" " + needle + "\n" +
"------------------\n" +
check1 + " | " + check2 + "\n" +
check3 + " | " + check4 + "\n" +
check5 + " | CURL: " + (macd_curling_up ? "UP" : "DN")
table.cell(gauge, 0, 0, display_text, bgcolor=color.new(final_c, 85), text_color=final_c, text_size=size.large)
// --- 9. PLOTS ---
plot(h48, "48H High", color=color.new(#00ff00, 50), style=plot.style_stepline)
plot(l48, "48H Low", color=color.new(#ff0000, 50), style=plot.style_stepline)
Note di rilascio
Creates a checklist of when trades are more in your favor in when going long.Note di rilascio
Help with understanding entries. Note di rilascio
Help with entriesNote di rilascio
Helps with understanding indicators and when a good entry may be.Note di rilascio
This is to help traders understand when a trade is in their favor. MACD open, moving averages stacked, spanning, and inclining. A volume indicator shows the strength of the volume compared to the daily high. And the curl indicates the direction the MACD is starting to curl to anticipate a crossover. The more indicators in favor of the trade, the higher the percentage. You will see the colors change from red to green for a quick analysis.
Note di rilascio
A visual checklist to help with entries and exits.Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.