Page 1 of 1

Difference

Posted: Sun Jun 30, 2013 5:50 am

This simple indicator will show the difference from the current period,
and period N periods ago.
The value can be displayed in absolute value.
Difference.lua

Anchor difference.lua

MQ4/MT4 version.
viewtopic.php?f=38&t=64838

Re: Difference

Posted: Sat Jun 24, 2017 4:51 am
The indicator was revised and updated.

Re: Difference

Posted: Sun Jul 16, 2017 5:30 pm
Hi,

Very useful indicator indeed. Thanks for that.

One question. Is it possible to use this custom indicator in a strategy?

Regards
Jeremie

Re: Difference

Posted: Mon Jul 17, 2017 4:04 am
Sure, can you specify the entry / exit rules.

Re: Difference

Posted: Mon Jul 17, 2017 5:01 am

Re: Difference

Posted: Sun Sep 06, 2020 8:29 am
Very good job, thank you. Is it possible to integrate option for calculation of difference between actual value and value at defined fixed point? Thank you.

Re: Difference

Posted: Mon Sep 07, 2020 1:55 am
Sure.
"Defined fixed point", can you give me an example?
Is it defined by the user?

Re: Difference

Posted: Mon Sep 07, 2020 4:31 am
Thank you for fast response, I really appreciate your work.

If we define formula in existing indicator as diff=A1-A2, A1 is actual value, and A2 is value N period ago. Value of A1 and A2 are continuously changing in time, but number of time periods is fixed.

I am interested in difference diff = A1-C where value of C is constant and corresponds to value in some fixed time point, let say at 9:00 am (market opening or any other interesting point ...), and does not change in time.

Maybe definition of fixed time point is problem. In that case integration of option to put constant value manually and calculation of difference between actual value and this constant would be very good solution.

Thank you.

Re: Difference

Posted: Wed Sep 09, 2020 3:31 am
Try Anchor difference.

Re: Difference

Posted: Thu Sep 10, 2020 3:05 am
Thank you.