highest / lowest close of a period of n candles
-
How can I use a condition like
close[1] > highest CLOSE of the last n candles, starting with candle [2] ?Similar to highest / lowest price of n candles, but based on the candles close.
Many thanks!
-
The only way is by creating a custom loop searching for that close price. There is no fxDreema blocks doing that.
-
@l-andorrà
Thanks!
I don't know how to do that. how is a custom loop integrated?
I think the iHighest function could deliver the highes close.
but I don't know how to integrate it either. -
This should do it, not tested but compiles: https://fxdreema.com/shared/FoVpQnJDb
-
@jstap
Many thanks !!!
I will test this. -
Added variables to draw blocks, let me know if it works: https://fxdreema.com/shared/9RCAmiyOd
-
@jstap
Many thanks! This seems to do what I need.
When I want to compare the close of the latest candle[1] to the highest or lowest close of the previous candles (starting from candle[2], is the following calculation correct?int copied = CopyClose(_Symbol, _Period, 2, Count, closes);
-
Yes t should be