Dukascopy
 
 
Wiki JStore Search Login

Strategy opening like crazy
 Post subject: Strategy opening like crazy Post rating: 0   New post Posted: Mon 30 Nov, 2015, 21:01 

User rating: 0
Joined: Mon 06 Jul, 2015, 16:52
Posts: 14
Location: DenmarkDenmark
Hi

Saw a video where a zone recovery strategy was proposed. So I decided to build something like that. The strategy does the following:

1: First trade is done from certain aspects of MACD (if MACD get to 0 (I had to make a small zone here to make the strategy open orders), open a long at market. If MACD crosses MACD signal open a short order). This the strategy should only do if there are 0 trades open.
2: Whenever all positions get a certain profit in pips, close all open positions, and start again looking at MACD.
3: The zone recovery part enters if the last open position has reached a certain level of loss in pips. If this leve is reached the strategy opens a position of opposite type of the last opened position at X-times the last position size. This new position then becomes the "attention" of the strategy, if this position reaches the max loss in pips designated, a new position opens as per the same rules above.
4: Still if all positions get to the profit level in pips designated, all orders will be closed and the strategy starts over.

So when I test this strategy in the historical tester the strategy opens one first position as it is intended to do (at minimum trade amount). However when I test it in actual trading time via demo account, it opens positions like crazy. Also I noticed that when it closes positions per the "when all positions are X-pips in profit close all positions") the strategy spams the "close all open positions" to the program. So the question is, how can i prevent the program from spamming both the open at market order, and the close all open positions commands? I have in desperation added a lot of "if" blocks trying to limit opened order, pending orders, all orders to 1 to no avail.


Attachments:
Zone_Recovery.vfs [52.59 KiB]
Downloaded 164 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: Strategy opening like crazy Post rating: 0   New post Posted: Wed 02 Dec, 2015, 11:44 
Visual JForex expert at Dukascopy
User avatar

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

This looks typically a problem of instrument and trading period subscription. It should behave identically as VJF Htester when these filters are added.
Please check the attached version

Cheers


Attachments:
Zone_Recovery_V1.vfs [53.25 KiB]
Downloaded 193 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.
 

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