Dukascopy
 
 
Wiki JStore Search Login

EMA5 and EMA30 Cross
 Post subject: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Wed 25 Nov, 2015, 16:32 
User avatar

User rating: 0
Joined: Thu 19 Nov, 2015, 06:43
Posts: 15
Location: MalaysiaMalaysia
Hi I am try to cut loss once ema5 cross over ema30. However it seems not that case. Please have a look the vfs what went wrong. Also if you can suggest to improve the vfs.

My objective is if long, once ema5 is cross lower than ema30 should close the position. That's apply to short, once the ema5 is cross higher than ema30 shall close the position.

your help is appreciated.
Image


Attachments:
EMA5-30Cross.vfs [65.97 KiB]
Downloaded 210 times
EMA5-30Cross.png [59.9 KiB]
Downloaded 713 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: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Thu 26 Nov, 2015, 11:35 
Visual JForex expert at Dukascopy
User avatar

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

Please check the attached example which open and closes trades based on crossover, you can implement the same logic in your strategy.
What kind of improvement do wish to add? at which level exactly ?

Thanks


Attachments:
Webinar7_11.vfs [46.01 KiB]
Downloaded 207 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: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Fri 27 Nov, 2015, 07:09 
User avatar

User rating: 0
Joined: Thu 19 Nov, 2015, 06:43
Posts: 15
Location: MalaysiaMalaysia
Thanks for the help. I have to try incorporated your solution, however it is not working as i expected. I surely I have done somewhere wrong and hope you can rectify for me.
My thought was three candles continuous downtrend and the latest candle close price is lower than EMA30 shall short sell. It goes to three continuous uptrend candles and the latest candle close price is higher than EMA30 shall long buy.

To close the open position (if it does not reach PT/SL), for the short sell, as long as the EMA5 price is cross over and higher than EMA30 shall close the position. For the long buy, as long as the EMA5 price is cross over and lower than EMA30 shall close the position.

your help is appreciated.
Image


Attachments:
EMA5-30Cross_V1.vfs [88.19 KiB]
Downloaded 181 times
EMA5-30Cross.png [100.85 KiB]
Downloaded 680 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: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Fri 27 Nov, 2015, 16:20 
Visual JForex expert at Dukascopy
User avatar

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

There was couple of mistakes in your file and I quickly changed couple of blocks but indeed it has to be tested thoroughly.


Cheers


Attachments:
EMA5-30Cross_V2.vfs [66.66 KiB]
Downloaded 195 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: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Mon 30 Nov, 2015, 06:21 
User avatar

User rating: 0
Joined: Thu 19 Nov, 2015, 06:43
Posts: 15
Location: MalaysiaMalaysia
Hi thanks again for the rectification.
When I run the test, it stops after 1 transaction (open and close), why is that so? It should have look for the next pattern to long/short. Please advise.


 
 Post subject: Re: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Tue 01 Dec, 2015, 06:12 
User avatar

User rating: 0
Joined: Thu 19 Nov, 2015, 06:43
Posts: 15
Location: MalaysiaMalaysia
Hi Can you help me on the previous query?


 
 Post subject: Re: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Wed 02 Dec, 2015, 06:59 

User rating: 0
Joined: Mon 06 Jul, 2015, 16:52
Posts: 14
Location: DenmarkDenmark
I looked at it, and your if block going down to the close short was linked to itself and not the close and cancel position block.


 
 Post subject: Re: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Wed 02 Dec, 2015, 07:20 
User avatar

User rating: 0
Joined: Thu 19 Nov, 2015, 06:43
Posts: 15
Location: MalaysiaMalaysia
Hi In fact I have rectified, however, when I run with historical test for 1 week data, it only open and close (1 transaction). Sub-sequence will no on position. Why is that so?


Attachments:
EMA5_30Cross_V2.vfs [69.86 KiB]
Downloaded 190 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: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Wed 02 Dec, 2015, 14:12 
Visual JForex expert at Dukascopy
User avatar

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

Did you tried to test for more than a week on Historical tester ?


 
 Post subject: Re: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Thu 03 Dec, 2015, 02:15 
User avatar

User rating: 0
Joined: Thu 19 Nov, 2015, 06:43
Posts: 15
Location: MalaysiaMalaysia
Hi I did run on monthly test however, it is still not close position when it crosses on EMA 5 and EMA 30 can you assist?
Image


Attachments:
EMA5-30Cross.png [63.61 KiB]
Downloaded 719 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: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Mon 07 Dec, 2015, 06:12 
User avatar

User rating: 0
Joined: Thu 19 Nov, 2015, 06:43
Posts: 15
Location: MalaysiaMalaysia
Hi
I have not getting help from anyone since last discussion. Anyone help please.


 
 Post subject: Re: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Mon 07 Dec, 2015, 11:06 
Visual JForex expert at Dukascopy
User avatar

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

We're currently fixing couple of issues that may have impact your strategy, I recommend waiting till the next release which will be made asap.
If this is urgent, I can figure out another workaround to achieve your idea.
Thanks in advance for your patience .

Amine


 
 Post subject: Re: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Mon 07 Dec, 2015, 13:01 
User avatar

User rating: 0
Joined: Thu 19 Nov, 2015, 06:43
Posts: 15
Location: MalaysiaMalaysia
Hi, If there is alternative, kindly provide alternative. Thanks in advance.


 
 Post subject: Re: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Mon 07 Dec, 2015, 15:45 
Visual JForex expert at Dukascopy
User avatar

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

What I did is simply restart all from scratch in this example. I've fine tuned some conditions.. Let me know your thoughts.
If there is any inconsistencies, please highlight it so that I can check quickly ..
Cheers
A


Attachments:
Refurbished_V1.vfs [61.05 KiB]
Downloaded 186 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: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Mon 07 Dec, 2015, 17:28 
User avatar

User rating: 0
Joined: Thu 19 Nov, 2015, 06:43
Posts: 15
Location: MalaysiaMalaysia
Hi Thanks for the prompt reply. However I test it, and it still not close the position when EMA5 cross EMA30. Can you have a look, as long as any open position should be close as long as ema cross over.
Image


Attachments:
EMA5-EMA30_Cross.jpg [405.21 KiB]
Downloaded 621 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: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Tue 08 Dec, 2015, 11:16 
Visual JForex expert at Dukascopy
User avatar

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

Can you please try to "play" with exit conditions to meet your requirements ?
Currently , I'm afraid to tell that you should wait for the next release to be 100% sure that all related issues that may impact this strategy will be fixed to be able to test on a blank page

Thanks gain for your patience in this matter;

Cheers


Attachments:
Refurbished_V2.vfs [59.6 KiB]
Downloaded 215 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: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Tue 28 Jun, 2016, 08:37 
User avatar

User rating: 0
Joined: Fri 18 Mar, 2016, 10:07
Posts: 7
Location: Switzerland, Zürich
Is this problem solved now?
I have the same problem. I have 2 MA's and at the cross the strategy buy or sell and by the next cross the strategy has to close the open position.
But the strategy doesn't close it. The Code works well because i have counter for the crosses.
Thank you for support.


 
 Post subject: Re: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Tue 28 Jun, 2016, 15:02 
Visual JForex expert at Dukascopy
User avatar

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

Could you please post your strategy and explain its behavior and we'll check that ..


 
 Post subject: Re: EMA5 and EMA30 Cross Post rating: 0   New post Posted: Wed 29 Jun, 2016, 00:23 
User avatar

User rating: 0
Joined: Fri 18 Mar, 2016, 10:07
Posts: 7
Location: Switzerland, Zürich
I will do so far as possible.


 

Jump to:  

cron
  © 1998-2024 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