Can we do loops?
2 replies
Elias Michael
4 months ago #284697
I am looking for a way to get historic indicator data so as to set a dynamic stop. So for the stop level, I want to look left on the chart until i find price and them from there look for the second lowest fractal (for a long trade). But I can’t think of a way to do this In strategyquant.
In mql I could initiate a loop and manually look back (can we do this in strategyquant?) Or another idea, which I can’t think how to implement, is to have the historic values of the fractal indicator and just take the second lowest from the current price.
tomas262
4 months ago #284706
Hi,
you cannot do looping. We do not allow this in our tool. You need to keep tracking of values you need forward so you store some value now (this bar) for later use. That is the only way
Fractal is troublesome. It gets redrawn. I have found it very unreliable and impossible to backtest basically
Elias Michael
4 months ago #284709
Hi,
Are we able to work with arrays? Because then I could sort and search for a value less than to get what I need..
Viewing 2 replies - 1 through 2 (of 2 total)