For Loops & Chronological Order
Posted: Fri Jul 02, 2021 5:13 pm
Hello,
I'm trying to make a script with a portion of the parameters below.
//Buying Condition In Chronological Order
Stochastic Crossover
MACD Crossover
10 EMA Crosses Above 20 EMA
The Stochastic Crossover must always occur at least 1 Bar before the MACD Crossover
Once the Stochastic Crossover occurs the MACD Crossover must occur within 5 bars
Once the MACD Crossover occurs the EMA Crossover must occur within 8 bars
Would a For Loop help in this scenario? Would I have to use different For Loops to get the index correct since each crossover has different ranges?
Thank you in advance, and please let me know if elaboration on the question is needed!
I'm trying to make a script with a portion of the parameters below.
//Buying Condition In Chronological Order
Stochastic Crossover
MACD Crossover
10 EMA Crosses Above 20 EMA
The Stochastic Crossover must always occur at least 1 Bar before the MACD Crossover
Once the Stochastic Crossover occurs the MACD Crossover must occur within 5 bars
Once the MACD Crossover occurs the EMA Crossover must occur within 8 bars
Would a For Loop help in this scenario? Would I have to use different For Loops to get the index correct since each crossover has different ranges?
Thank you in advance, and please let me know if elaboration on the question is needed!