Fractal engulfing candle
Posted: Tue Feb 07, 2023 3:28 pm
Hi all,
I'm watching the video now about the fractal engulfing candle. And I just can't wrap my head around one thing.
In order to check if there has been a lower low or higher high in the last 10 days, you write:
swingHigh = high == ta.highest(high, 10) or high[1] == ta.highest(high, 10)
swingLow = low == ta.lowest(low, 10) or low[1] == ta.lowest(low, 10)
Why is the sign here == instead of => or =<?
We want to see whether in the last 10 days, any candle was equal or higher than the current high or equal or lower to the current low. Not whether its exactly the same as the current high or the current low.
Got totally frustrated after this video cause I followed all the logic everything makes perfect sense and then one thing happens that doesn't make any sense and I get internal errors haha.
Thanks!
I'm watching the video now about the fractal engulfing candle. And I just can't wrap my head around one thing.
In order to check if there has been a lower low or higher high in the last 10 days, you write:
swingHigh = high == ta.highest(high, 10) or high[1] == ta.highest(high, 10)
swingLow = low == ta.lowest(low, 10) or low[1] == ta.lowest(low, 10)
Why is the sign here == instead of => or =<?
We want to see whether in the last 10 days, any candle was equal or higher than the current high or equal or lower to the current low. Not whether its exactly the same as the current high or the current low.
Got totally frustrated after this video cause I followed all the logic everything makes perfect sense and then one thing happens that doesn't make any sense and I get internal errors haha.
Thanks!