Page 1 of 2

High Low Range Average

PostPosted: Mon Jul 27, 2020 5:07 pm
by Apprentice
EURUSD H1 (07-27-2020 2217).png

Based on request.
viewtopic.php?f=27&t=70226
High Low Range Average.lua
(4.12 KiB) Downloaded 424 times

High Low Range Average Readout.lua
(6.46 KiB) Downloaded 323 times

Re: High Low Range Average

PostPosted: Tue Jul 28, 2020 2:39 am
by MadMan
Thank you .. but it is not what I am looking for
Please let me know if the above request is not clear

Thanks in advance

Re: High Low Range Average

PostPosted: Tue Jul 28, 2020 1:57 pm
by Apprentice
We have two lines, averages of
1) high - open
2) open - low

Can you specify the equation?

Re: High Low Range Average

PostPosted: Wed Jul 29, 2020 2:36 am
by MadMan
Can you please check the attached sheet and let me know .. it's a sample

I need the two averages to be displayed on chart .. no lines or oscillator

Re: High Low Range Average

PostPosted: Wed Jul 29, 2020 4:04 pm
by Apprentice
As numbers only?

Re: High Low Range Average

PostPosted: Thu Jul 30, 2020 3:41 am
by MadMan
yes .. only the numbers (in pips)

Re: High Low Range Average

PostPosted: Fri Jul 31, 2020 5:26 am
by Apprentice
High Low Range Average Readout added.

Re: High Low Range Average

PostPosted: Sat Aug 01, 2020 3:45 am
by MadMan
Thank you Apprentice .. this is good .. nice and simple as desired

But can you please double check the calculation as I am getting different results on excel

let me break it down once more

The difference (in pips) between open price & highest price
The difference (in pips) between open price & lowest price
then calculate the average of the above two values for N number of periods EXCLUDING the current candle

Please let me know if more details needed.

Regards

Re: High Low Range Average

PostPosted: Sun Aug 02, 2020 8:28 am
by Apprentice
high[period]= source.high[period]-source.open[period];
low[period]= source.open[period]-source.low[period];


High[period]= mathex.avg(high,period-Period+1, period);
Low[period]= mathex.avg(low,period-Period+1, period);

Re: High Low Range Average

PostPosted: Mon Aug 03, 2020 1:35 am
by MadMan
OK .. i will double check at my side

But is it possible to get the standard deviation as well .. same thing but instead of average .. calculate the standard deviation.

Thanks