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
Capture.JPG (14.13 KiB) Viewed 1751 times
conjure
FXCodeBase: Initiate
 
Posts: 135
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: 36341
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
FXCodeBase: Initiate
 
Posts: 135
Joined: Sat Jul 22, 2017 7:27 am


Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 6 guests