Page 1 of 1

Difference

PostPosted: Sun Jun 30, 2013 5:50 am
by Apprentice
Difference.png

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
(2.25 KiB) Downloaded 883 times


Untitled.png

Anchor difference.lua
(4.79 KiB) Downloaded 240 times


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

Re: Difference

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

Re: Difference

PostPosted: Sun Jul 16, 2017 5:30 pm
by Remie9
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

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

Re: Difference

PostPosted: Mon Jul 17, 2017 5:01 am
by Apprentice

Re: Difference

PostPosted: Sun Sep 06, 2020 8:29 am
by asedic
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

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

Re: Difference

PostPosted: Mon Sep 07, 2020 4:31 am
by asedic
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

PostPosted: Wed Sep 09, 2020 3:31 am
by Apprentice
Try Anchor difference.

Re: Difference

PostPosted: Thu Sep 10, 2020 3:05 am
by asedic
Thank you.