Hello so I created a strategy below and I want the t1 t2 t3 to fill with color how Can I do this?
# Determine the entry price based on the current arrow
def entry_price =
if U1 then close
else if D1 then close
else Double.NaN;
# Calculate stop price for U1
def stop_price_u1 = low;
# Calculate stop price for D1
def stop_price_d1 = high;
# Determine the stop price based on the condition
def stop_price = if U1 then stop_price_u1 else if D1 then stop_price_d1 else Double.NaN;
plot entry = if !IsNaN(entry_price) then entry_price else Double.NaN;
plot t1 = if !IsNaN(entry_price) then entry_price + rr_ratio * (entry_price - stop_price) else Double.NaN;
plot t2 = if !IsNaN(entry_price) then entry_price + (2 * rr_ratio) * (entry_price - stop_price) else Double.NaN;
plot t3 = if !IsNaN(entry_price) then entry_price + (3 * rr_ratio) * (entry_price - stop_price) else Double.NaN;
def showBubbles = !IsNaN(entry_price) or !IsNaN(t1) or !IsNaN(t2) or !IsNaN(t3);
AddChartBubble(showBubbles and !IsNaN(t1), t1, "T1 $" + t1, Color.GREEN);
AddChartBubble(showBubbles and !IsNaN(t2), t2, "T2 $" + t2, Color.GREEN);
AddChartBubble(showBubbles and !IsNaN(t3), t3, "T3 $" + t3, Color.GREEN);
AddChartBubble(showBubbles and !IsNaN(entry_price), stop_price, "STOP $" + stop_price, Color.RED, no);
# Determine the entry price based on the current arrow
def entry_price =
if U1 then close
else if D1 then close
else Double.NaN;
# Calculate stop price for U1
def stop_price_u1 = low;
# Calculate stop price for D1
def stop_price_d1 = high;
# Determine the stop price based on the condition
def stop_price = if U1 then stop_price_u1 else if D1 then stop_price_d1 else Double.NaN;
plot entry = if !IsNaN(entry_price) then entry_price else Double.NaN;
plot t1 = if !IsNaN(entry_price) then entry_price + rr_ratio * (entry_price - stop_price) else Double.NaN;
plot t2 = if !IsNaN(entry_price) then entry_price + (2 * rr_ratio) * (entry_price - stop_price) else Double.NaN;
plot t3 = if !IsNaN(entry_price) then entry_price + (3 * rr_ratio) * (entry_price - stop_price) else Double.NaN;
def showBubbles = !IsNaN(entry_price) or !IsNaN(t1) or !IsNaN(t2) or !IsNaN(t3);
AddChartBubble(showBubbles and !IsNaN(t1), t1, "T1 $" + t1, Color.GREEN);
AddChartBubble(showBubbles and !IsNaN(t2), t2, "T2 $" + t2, Color.GREEN);
AddChartBubble(showBubbles and !IsNaN(t3), t3, "T3 $" + t3, Color.GREEN);
AddChartBubble(showBubbles and !IsNaN(entry_price), stop_price, "STOP $" + stop_price, Color.RED, no);