High Low Range Average

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

High Low Range Average

Postby Apprentice » Mon Jul 27, 2020 5:07 pm

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

High Low Range Average Readout.lua
(6.46 KiB) Downloaded 316 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: High Low Range Average

Postby MadMan » Tue Jul 28, 2020 2:39 am

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
MadMan
 
Posts: 41
Joined: Tue Jun 02, 2020 12:06 am

Re: High Low Range Average

Postby Apprentice » Tue Jul 28, 2020 1:57 pm

We have two lines, averages of
1) high - open
2) open - low

Can you specify the equation?
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: High Low Range Average

Postby MadMan » Wed Jul 29, 2020 2:36 am

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
Attachments
EUR-USD.xlsx
(12.52 KiB) Downloaded 310 times
MadMan
 
Posts: 41
Joined: Tue Jun 02, 2020 12:06 am


Re: High Low Range Average

Postby MadMan » Thu Jul 30, 2020 3:41 am

yes .. only the numbers (in pips)
MadMan
 
Posts: 41
Joined: Tue Jun 02, 2020 12:06 am

Re: High Low Range Average

Postby Apprentice » Fri Jul 31, 2020 5:26 am

High Low Range Average Readout added.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: High Low Range Average

Postby MadMan » Sat Aug 01, 2020 3:45 am

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
MadMan
 
Posts: 41
Joined: Tue Jun 02, 2020 12:06 am

Re: High Low Range Average

Postby Apprentice » Sun Aug 02, 2020 8:28 am

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);
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: High Low Range Average

Postby MadMan » Mon Aug 03, 2020 1:35 am

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
MadMan
 
Posts: 41
Joined: Tue Jun 02, 2020 12:06 am

Next

Return to Custom Indicators

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot], Majestic-12 [Bot] and 43 guests