|
Volume MA |
lhawk
|
Post subject: Volume MA |
Post rating: 0
|
Posted: Thu 29 Sep, 2016, 05:30
|
|
User rating: 0
Joined: Thu 22 Sep, 2016, 06:51 Posts: 4 Location: United Arab Emirates, Dubai
|
Hello all,
I am trying a simple strategy get to work but produces no results. The simple strategy accesses the past 20 candles information. Then calculates the 20MA for the volume compares the current volume to the 20MA volume and if the value is greater opens a position at market.
Could you please have a look at the attached and advise why this is not working?
Regards, Lhawk
Attachments: |
Sep25th2016Volume.vfs [84.21 KiB]
Downloaded 146 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.
|
|
|
|
|
|
amine_chourou
|
Post subject: Re: Volume MA |
Post rating: 0
|
Posted: Thu 29 Sep, 2016, 15:06
|
|
Visual JForex expert at Dukascopy | |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi,
There is a solution to simplify this: the use of Get historical candles block which can handle multiple candle at a time. Please check the attached example. I had also another idea: Why don't you use an indicator such as "VolumeWAP" with calculation settings applied on Candle Volume and period = 20 ? this will gove approx an idea about the average volume I guess ... This worth testing in my opinion
Thanks !
Attachments: |
User_Ex1012.vfs [37.51 KiB]
Downloaded 127 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.
|
|
|
|
|
|
lhawk
|
Post subject: Re: Volume MA |
Post rating: 0
|
Posted: Thu 29 Sep, 2016, 21:19
|
|
User rating: 0
Joined: Thu 22 Sep, 2016, 06:51 Posts: 4 Location: United Arab Emirates, Dubai
|
Hi Amine,
Thanks for the simplified approach. This is certainly more professional code than my initial algorithm.
However, the issue still stands. I import and run the strategy, 20 minutes or so passed and no result. Then I had to manually stop the process. I am not sure whether this is an algorithm problem or my desktop is acting improperly.
Regards.
|
|
|
|
|
amine_chourou
|
Post subject: Re: Volume MA |
Post rating: 0
|
Posted: Mon 03 Oct, 2016, 10:30
|
|
Visual JForex expert at Dukascopy | |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi,
That's true because I forgot an essential condition: To reset the result of the sum to zero at the end of every cycle of 20 daily candles: this is necessary otherwise the sum keeps increasing endlessly and the average volume will be wrong starting from the 2nd cycle and so forth.
Anyway, this has been corrected as you can see with the "Assign block" let me know if you have any question to understand this logic.
Attachments: |
User_Ex1012_V2.vfs [39.08 KiB]
Downloaded 153 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.
|
|
|
|
|
|
|
Pages: [
1
]
|
|
|
|
|