Dual Distance From Average indicator

Dual Distance From Average indicator

I still debate myself between indicators that try to predict the future and those that illustrate a simplified view of the obvious market moves. I think that indicators that are very clear help in 2 ways: 1) indicating trades that are conceptually simple, that everybody understands and where you visualise your edge and 2) not forgetting to look at the basics.

This indicator won’t predict any future: it aims to put in a clear way what the market does, and it is conceptually very simple.

I use it for trend following. It measures the distances between price (smooth version of price) and moving averages (exponential, default of 70 and 200 as I use for Spanish stocks). The behaviour that I look for are bounces with (or close to) the 0 line. Interpretation: a bounce in the 0 line simply is the moving average acting as a support (if the bounce is a local minima) or resistance (if the bounce is a local maxima).

I use a smoothed version of the price (exp moving average, default 15) for 2 reasons: 1) close price on itself it gives too spiky signals that become more complex to interpret, 2) it is very common for price to pierce a moving average, but it is far less likely that a smooth version of close (i.e. another moving average) pierces it.

Finally, I print (red line) the distance between the 2 moving averages (70 and 200). This is simply to bring in the longer term trend (bull > 0, bear < 0) as well as MA crossings.

You may likely see this as a redundant indicator if you print your moving averages in the chart, and you will be right. This is just a way to bring moving average interpretation to a simplified form.

I hope someone finds it useful. Any feedback or comments are welcome!

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

New! PRC is also now on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Abz • 07/30/2019 #

    hello ,
    Thanks for this indicatior , what timeframe do you use it on ?

  2. camporan • 07/30/2019 #

    You can use it 5M onwards, but the longer timeframe the more accurate it is. My preferred are 30M and daily. Also, use your judgement to see if the bounces do happen historically: the edge is just likelihood, and the best way to know how good your edge is, is by looking at the past 🙂

  3. manchokcity • 07/30/2019 #

    can we have it in mql4 platform? or how or which platform do we use it?

    • camporan • 359 days ago #

      I don’t use MetaTrader so I won’t be able to do the translation myself. Sorry!

  4. Alexander9 • 78 days ago #

    This can for amibroker ? . Thanks

Register or


avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Alps007 Hi Nicolas. Happy New Year. Can you please program me several MACD divergence screeners ...
Arlei Zanin Hello Nicolas, would it be possible to convert the Cloud to Pascal language? Thank you.
ashee i want it in MT4
Nicolas Use the color variables R and G to test if the trend is bullish (R=0) or bearish (R>0).
s00071609 Where can i find the syntax to test the colour of the line, I am calling the indicator value...
Nicolas You should open a new topic to discuss about the strategy and its coding.
Byggtrader Hi Nicolas! How do I get the indicator in the price chart? It only stays under i new chart.
Nicolas Just add it on the price chart by using the wrench on the left upper side of the chart (pric...
scarphace38 Bonsoir, je découvre PRT et je n'arrive pas a afficher le meme résultat pour l'indicateur de...
Dom Hello, hello....je commence le trading et découvre par la même occasion le codage....et ce n...
Nicolas Merci, ça fait plaisir !
Vonasi Sure that is possible. I will code it and make a post in the English ProBuilder forum and pu...
Vonasi Vama v2 with Hull moving average included can be found here: https://www.prorealcode.com/top...
JMat45 Thank you, Vonasi.
HeikinAshi https://www.prorealcode.com/topic/ssl-channel/
jobswaps oyes aste uno de soportes y recistencias
jobswaps eso lo necesitamos
Globalmarkets79 Thank you Vonasi for the answer. I have an other question. When i tried to run the indicator...
Vonasi Lines is either 0 or 1 to turn on or off the drawing of them. Once again if you download and...
Globalmarkets79 Thank you Vonasi, this indicator is very helpful!!!
11 months ago
Jan Wind "There are two methods of using Kagi: We buy when there is a turnaround and sell when there...
Nicolas Thanks, let us know how it is going?
Jan Wind Hallo Nicolas, I have tested the pre-mentioned concept, and had to change the concept : ...
11 months ago
Alai-n @Vonasi Thanks
jiddan78 how to convert to afl amibroker ?
Nicolas We do not supply free coding assistance for AFL Amibroker on the website. You can ask for pa...
riz001 thnk u
geroniman bonjour Nicolas, j ai un indicateur le Tiger . J aiemrai placer des fleches buy et sell dire...
Nicolas Merci de formuler les demandes sur le forum. ça n'est pas le bon endroit et hors sujet ici ! ;)
GraHal Discussion Topic started here ... https://www.prorealcode.com/topic/discussion-re-auto-sy...
samsampop Hi robertogozzi - thank you very much for sharing this strategy. I have performed various ...
robertogozzi Thank you samsampop.
FabiusMor Hi Nicolas, as you suggested I made a screener out of your indicator and the results are rea...
gildaslm Hi Nicolas, could you help me to set up the screener for this. Thank you !!
Nicolas Sure, please open a new topic in the screener forum and respect the posting rules.
ggolfet Thanks Nicolas, I imported the itf file and solved the problem.
Hasardeur Hallo Nicolas, i tried to code the multi period heat map in combination with the Ehler’s ...
Nicolas Please open a new topic with the code in forum.
LucioleLucide Clean view, thanks for sharing
dertopen hi where i can found the window for candle configuration?
paolosab69 Ciao! . I have seen the pictures that explain this metod but i don't understand when is mome...
Alberto Aguilera Hi! Thanks for your strategy Anyone can check it with 200 bars?
winnie37 yes. "No ground breaking math here, but I am finding very useful and some algo based on it i...
Jan Wind Also interesting to know what does not work, which set up you use, saves me investigating ! ...
winnie37 i just set the proorder like this: buy when 50/100/200 phase >0 and sell when under 0, go...
Jan Wind Good evening Roberto, I do not understand Italian, so I could not read the background. ...
robertogozzi Results, while matching when it's SMA compared to TRSMA, are different in the case of WMA an...
1 year ago