please need your help in this code
i made it clear with this image:
we have to scenarios:
1- price Closes ABOVE MA
2- price Closes BELOW MA
if the price closes above the MA the indicator calculate (in pips) the difference between the "LOW" and the MA.
if the price closes below the MA the indicator calculate (in pips) the difference between the "HIGH" and the MA.
i made it clear with this image:
we have to scenarios:
1- price Closes ABOVE MA
2- price Closes BELOW MA
if the price closes above the MA the indicator calculate (in pips) the difference between the "LOW" and the MA.
if the price closes below the MA the indicator calculate (in pips) the difference between the "HIGH" and the MA.