For starter Im a newbie in pine script. I would like to mark the first up bar candle after the last down candle in a series of candles.
// UpBar
UpBar = close >= close[1] and open >= open[1]
//DownBar
DownBar = open <= open[1] and close >= close[1]
UpBar1 = not NormalBar[1] and UpBar
plotchar(UpBar1, color=color.blue)
Here is the problem
- only applied to previous candle
- it skipped some of the first upbar candle
The question is, how to identify the last down bar candle and disregard any candles comes after except the first up bar candle and mark it? And repeated the process for the entire series of candles.
Ryan kenshin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.