Page 1 of 1

a strategy question

PostPosted: Tue Apr 17, 2018 6:48 am
by conjure
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 1757 times

Re: a strategy question

PostPosted: Tue Apr 17, 2018 6:57 am
by Apprentice
Try something like this.
local Distance=(Source.high[period]-Source.close[period])/Source:pipSize();

Re: a strategy question

PostPosted: Tue Apr 17, 2018 8:08 am
by conjure
than you Apprentice