• Get $30 off VIP with code SUMMER30. Ends July 27. Happy trading!

Need help customizing a watchlist.

kingkunta

New member
Hi all , is there anyway to make a watchlist option to me whether or not a stocks current daily candle opened up between yesterday’s high and low? Thanks in advance guys
 

rad14733

Well-known member
VIP
@kingkunta Try this...

Ruby:
AddLabel(yes, " ", if Between(open, open[1], close[1]) then Color.GREEN else Color.RED);
AssignBackgroundColor(if Between(open, open[1], close[1]) then Color.GREEN else Color.RED);
 

kingkunta

New member
@rad14733
AddLabel(yes, " ", if Between(open, high[1], low[1]) then Color.GREEN else Color.RED);
AssignBackgroundColor(if Between(open, high[1], low[1]) then Color.GREEN else Color.RED);

wouldn't the code be this as I want it to be between the previous days candles high and low? instead of the open and close?
 

rad14733

Well-known member
VIP
@rad14733
AddLabel(yes, " ", if Between(open, high[1], low[1]) then Color.GREEN else Color.RED);
AssignBackgroundColor(if Between(open, high[1], low[1]) then Color.GREEN else Color.RED);

wouldn't the code be this as I want it to be between the previous days candles high and low? instead of the open and close?

Ah, yes... Good catch... (y)
 

rad14733

Well-known member
VIP
hey so I did it like I wrote down and its just showing red labels for every stock on my watchlist, I checked a few of them and they meet the criteria but still dont show up in the right color, any advice?

Is the timeframe for the column set to Day...??? The code below works...

Ruby:
AddLabel(yes, " ");
AssignBackgroundColor(if Between(open, low[1], high[1]) then Color.GREEN else Color.RED);
 

Similar threads

Top