Dukascopy
 
 
Wiki JStore Search Login

Visual JForex Average Daily Range Assistance
 Post subject: Visual JForex Average Daily Range Assistance Post rating: 0   New post Posted: Sat 12 Mar, 2016, 12:10 
User avatar

User rating: 0
Joined: Wed 10 Jul, 2013, 12:42
Posts: 30
Location: FranceFrance
Hello
I have implemented a clunky Average Daily Range criteria in VJForex but I wanted to know if there is a better way.
Currently to calculate ADR5 I have 5 separate shifted candles and calculations to assign each days candle High and Low to variables and then run a calculation to subtract to get the daily range and then a calculation expression to average the 5 days.

It works but it is clunky and if I want to change the number of Daily Bars to say 20 for ADR20 then it becomes more painful.

I am sure there is a way to use loopViewer to run this process for D shift 1 to calc D-1 High, D-1Low, calc/subtract and then assign range to D1 range variable and then on to, D shift 2, D shift 3, D shift 4, D shift 5 but though there are a number of loopviewer threads in the forum there doesn't to be anything I can apply to this issue to find a solutions by trial and error.

If someone can point me in the right direction I would appreciate it.
--

A follow on issue to ADR is the Daily Range of Sunday after Sunday night open. Can VJF incorporate Sunday into Monday, as a low range 2 hour Sunday range will skew ADR data.

Thanks
LD


 
 Post subject: Re: Visual JForex Average Daily Range Assistance Post rating: 0   New post Posted: Mon 14 Mar, 2016, 15:35 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

Your idea is not bad when it comes to a limited and reasonable candles range but if you want the average of the daily candles for the last month, then it is slightly complicated to use 30 blocks of get historical candle and use outputs individually. It is is indeed better to implement a dynamic way and you're right on pointing the use of loop viewer.
I'll let you test an example that implements" get historical candles" and "loop viewer". the number of used candles is defined in "Number of candles" variable .
Could you please let me know your email address to send you that ?

Thanks


 
 Post subject: Re: Visual JForex Average Daily Range Assistance Post rating: 0   New post Posted: Tue 15 Mar, 2016, 12:03 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
here is it,
No need for your email address :)


Attachments:
AverageWeighted.vfs [31.15 KiB]
Downloaded 154 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Visual JForex Average Daily Range Assistance Post rating: 0   New post Posted: Thu 17 Mar, 2016, 08:35 
User avatar

User rating: 0
Joined: Wed 10 Jul, 2013, 12:42
Posts: 30
Location: FranceFrance
Hello Amine
Can you please re-attach the averageweighted.vfs file - I get the following message when attempting download.
The selected attachment does not exist anymore.
The file ./../files/47316_4f78c18842b50e6da15aa23cb3574345 does not exist.

Regards
LD


 
 Post subject: Re: Visual JForex Average Daily Range Assistance Post rating: 0   New post Posted: Thu 17 Mar, 2016, 12:53 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

I see ... please let me know your email address


 
 Post subject: Re: Visual JForex Average Daily Range Assistance Post rating: 0   New post Posted: Thu 17 Mar, 2016, 21:32 
User avatar

User rating: 0
Joined: Wed 10 Jul, 2013, 12:42
Posts: 30
Location: FranceFrance
Hello Amine
Can you please email the vfs attachment to xxxxxxx AT xxxxxxx DOT com
I look forward to working out this criteria/function with the code.

Thanks
LD


 
 Post subject: Re: Visual JForex Average Daily Range Assistance Post rating: 0   New post Posted: Wed 01 Mar, 2017, 15:14 
User avatar

User rating: 0
Joined: Sun 20 Jul, 2014, 11:25
Posts: 6
Location: ItalyItaly
Could you please repost your file?

:D


 
 Post subject: Re: Visual JForex Average Daily Range Assistance Post rating: 0   New post Posted: Fri 03 Mar, 2017, 11:22 
User avatar

User rating: 0
Joined: Fri 19 Sep, 2014, 12:05
Posts: 61
Location: Italy, montopoli di sabina
Good morning,
Could you please post the VJF code for the average range of n past candles?
Tried with Get Historical Candles and Loop Viewer and two calculations (max (open,close)) - (Min (open,close) but do not seem it graphically correct.


 
 Post subject: Re: Visual JForex Average Daily Range Assistance Post rating: 0   New post Posted: Fri 03 Mar, 2017, 14:16 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi guys !

I'm not sure I still remember this thread :D but here is all I've got ...


Attachments:
AverageWeighted2.vfs [32.37 KiB]
Downloaded 182 times
AverageWeighted1.vfs [32.33 KiB]
Downloaded 165 times
AverageWeighted.vfs [31.15 KiB]
Downloaded 168 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Visual JForex Average Daily Range Assistance Post rating: 0   New post Posted: Fri 03 Mar, 2017, 16:33 
User avatar

User rating: 0
Joined: Fri 19 Sep, 2014, 12:05
Posts: 61
Location: Italy, montopoli di sabina
Thanks :D

It could be great an indicator ;)


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com