Indicator of distance between bar and MA

 

Hi I would be very grateful if u can share and indicator that plots the distance

between MA and bar's Low or High-

Pls send me more than one indicator in order to give me the chance to select the one

that suits my request

Thanks

Files:
1-request.png  50 kb
 
chehab:

Hi I would be very grateful if u can share and indicator that plots the distance

between MA and bar's Low or High-

Pls send me more than one indicator in order to give me the chance to select the one

that suits my request

Thanks

chehab

If you take MACD, set the fast period to 1 and set to slow ma to any ma you want, you are going to get the difference between price and MA

 

Hi Mr mladen

Thank you for your help and prompt reply-

Your suggestion was completely new to me. However we consider it acceptable -

I tried it in practical and concluded that this method does not meet all of my request

in the meantime i'll be continuously forced to do extra calculations just to locate the MA.

It would be more easier with the use of an indicator that responds to the details i mentioned on the chart-

I like to ask you to give me more of your suggestions

Thanks

 

The simplest way : write this single line int start function:

Comment(DoubleToStr(Close[0]-iMA(NULL,0,MaPeriod,0,MaMethod,MaPrice,0),Digits);

Replace the close with the price of your choice and MaPeriod,MaMethod and MaPrice with values of your choice and you will not have to calculate it any more. You do not need anything any more to have that value displayed on the chart

Reason: