Distance From MA

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Moderator: admin

Distance From MA

Postby Apprentice » Fri Mar 27, 2015 3:46 am

Distance_From_MA.png

Based on request.
viewtopic.php?f=27&t=62043

Code: Select all
local Dist_Crt_High = math.abs(source.high[period] - ma.DATA[period-1]); 
local Dist_Crt_Low  = math.abs(source.low[period]  - ma.DATA[period-1]);   
       
      if (Dist_Crt_High >= Dist_Crt_Low) then
      Distance[period] = (source.high[period] - ma.DATA[period-1])/source:pipSize();
      end
       if (Dist_Crt_High < Dist_Crt_Low) then
      Distance[period]  = (source.low[period]  - ma.DATA[period-1])/source:pipSize()
       end   

Distance_From_MA.lua
(5.07 KiB) Downloaded 538 times


The indicator was revised and updated
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Distance From MA

Postby NicolaeZ » Sat Mar 28, 2015 7:23 am

Thank you!
Nicolae
NicolaeZ
 
Posts: 21
Joined: Thu May 31, 2012 6:32 am
Location: Bucharest, Romania

Re: Distance From MA

Postby Apprentice » Thu Aug 03, 2017 6:24 am

The indicator was revised and updated.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Custom Indicators

Who is online

Users browsing this forum: Google [Bot] and 34 guests