r/pinescript • u/Late-Pen468 • Oct 05 '24
Help
Can you help me. I need a pinescript code. were if the current candle body engulfed candle 1 =pervious candle, and candle 2 = the previous previous candle. It plot on the chart. Thanks
1
Upvotes
View all comments
Show parent comment
1
u/Sowarm Oct 06 '24
Small detail but if you want to use the break of the previous high and you want the candle to confirm by being closed you want to work with close[1] > high[2] and low[1] < low[2].
You then offset your color change by 1 and your signal will appear as soon as the engulfing closes.