a strategy question

Moderator: admin

a strategy question

Postby conjure » Tue Apr 17, 2018 6:48 am

Hi.
I m trying to write my own strategy
and i need to calculate the distance between
high and close in pips
for current candle
Is it possible? Can someone give me an example?
Thank you

Capture.JPG
(14.13 KiB) Not downloaded yet
conjure
 
Posts: 85
Joined: Sat Jul 22, 2017 7:27 am

Re: a strategy question

Postby Apprentice » Tue Apr 17, 2018 6:57 am

Try something like this.
local Distance=(Source.high[period]-Source.close[period])/Source:pipSize();
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 19586
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: a strategy question

Postby conjure » Tue Apr 17, 2018 8:08 am

than you Apprentice
conjure
 
Posts: 85
Joined: Sat Jul 22, 2017 7:27 am


Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 4 guests