Expert Advisor - How to retain a value in a variable outside of the loop

 

Hi All,

I need some assistance in coding in EA.

I've a variables that has a value after using a loop condition.

 

Is there a way to retain the value after finish loop the condition and use the value outside the loop?

I would like to use the variables to compare with other indicator.

 

Many Thanks,

Jeannie 

 
Declare the variable outside of the loop
Reason: