Difference

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

Difference

Postby Apprentice » Sun Jun 30, 2013 5:50 am

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 238 times


MQ4/MT4 version.
viewtopic.php?f=38&t=64838
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Difference

Postby Apprentice » Sat Jun 24, 2017 4:51 am

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

Re: Difference

Postby Remie9 » 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
Remie9
 
Posts: 2
Joined: Tue May 30, 2017 4:55 pm

Re: Difference

Postby Apprentice » Mon Jul 17, 2017 4:04 am

Sure, can you specify the entry / exit rules.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Re: Difference

Postby asedic » 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.
asedic
 
Posts: 8
Joined: Tue Jan 20, 2015 7:00 am

Re: Difference

Postby Apprentice » Mon Sep 07, 2020 1:55 am

Sure.
"Defined fixed point", can you give me an example?
Is it defined by the user?
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Difference

Postby asedic » 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.
asedic
 
Posts: 8
Joined: Tue Jan 20, 2015 7:00 am

Re: Difference

Postby Apprentice » Wed Sep 09, 2020 3:31 am

Try Anchor difference.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Difference

Postby asedic » Thu Sep 10, 2020 3:05 am

Thank you.
asedic
 
Posts: 8
Joined: Tue Jan 20, 2015 7:00 am


Return to Custom Indicators

Who is online

Users browsing this forum: Bing [Bot] and 55 guests