Using Loops and Filters to Find Historical Candles with Conditions
1 replies
Maicol Eduardo Martinez Gonzalez
3 months ago #286922
Hi AlgoWizard community,
I’m currently working on a project where I need to find candles that meet certain conditions in the past. Specifically, I need to identify the most recent candle with a lower high to the left and a lower high to the right, or find the closest bullish candles relative to the current price when the price is below these candles.
<h3>Questions:</h3>
- Are there functions like
do
orwhile
loops in AlgoWizard that I can use to create these conditions? - Is there a way to create filters or write custom scripts in MQL or Java to incorporate these conditions into AlgoWizard as blocks or functions?
Any guidance or examples on how to implement this would be greatly appreciated!
Thanks in advance for your help.
tomas262
3 months ago #286948
Unfortunately looping is not possible to do using SQX. I believe you do not need to use it actually. You can simply setup a condition (block) such as
High[3] < High[2] AND
High[2] > High[1]
and trigger an action upon that. The action does not need to be a “trade entry”. You can also store the High[2] value into a (double) variable and use in other conditions for example
Viewing 1 replies (of 1 total)