why the variable declaration must be between the curly brackets of the for loop so it operate?
it even did not work when the variable were in global scope?
it even did not work when the variable were in global scope?
Inserted Code
for( i=0;i<UncountedBars;i++) { double ValueSLMA = iMA(Symbol(),0,PeriodSLMA,MA_Shift,MA_Method,MA_AppliedPrice,i); double ValueFAMA = iMA(Symbol(),0,PeriodFAMA,MA_Shift,MA_Method,MA_AppliedPrice,i); double ValueSLMA_1 = iMA(Symbol(),0,PeriodSLMA,MA_Shift,MA_Method,MA_AppliedPrice,i+1); double ValueFAMA_1 = iMA(Symbol(),0,PeriodFAMA,MA_Shift,MA_Method,MA_AppliedPrice,i+1);