Dukascopy
 
 
Wiki JStore Search Login

Positon closed not by strategy!!!!
 Post subject: Positon closed not by strategy!!!! Post rating: 0   New post Posted: Thu 28 Jul, 2011, 17:17 

User rating: -
Hello everybody,

One of my trades opened by my strategy is closed only with 6 pips positive. I tested my strategy over and over again and it will not close that position.
Is it possible that "somebody" can close our positions, manually?!?!?!

I'm very confused!!!

Regards


 
 Post subject: Re: Positon closed not by strategy!!!! Post rating: 0   New post Posted: Fri 29 Jul, 2011, 20:04 

User rating: 0
Joined: Thu 30 Jun, 2011, 21:19
Posts: 6
Location: HU
You can run the contest platform in the "view only" mode, also manually closed not possible.


 
 Post subject: Re: Positon closed not by strategy!!!! Post rating: 0   New post Posted: Sat 30 Jul, 2011, 13:19 
User avatar

User rating: 1
Joined: Mon 25 Jul, 2011, 11:46
Posts: 29
Location: United Kingdom, Burnley
Was it closed late Friday? If so I'd guess it was because the leverage changed from 1:100 to 1:30 for the weekend.

I'm not 100% certain, but I think the historical tester will only use a constant leverage and won't alter it for weekends as it would do in a live scenario.

If you run your tester and change the leverage (through the account button) to 1:30 and see a different final equity then it's quite likely that this is what happened. Note that running on 1:30 would mean that your order that made 6 positive pips would not open so the final equity will still look different to what happened.


 
 Post subject: Re: Positon closed not by strategy!!!! Post rating: 0   New post Posted: Tue 02 Aug, 2011, 08:42 

User rating: -
understand.... thank you guys.... :)


 
 Post subject: Re: Positon closed not by strategy!!!! Post rating: 0   New post Posted: Thu 04 Aug, 2011, 18:54 
User avatar

User rating: 0
Joined: Tue 31 May, 2011, 16:45
Posts: 13
Location: GermanyGermany
Hi ethernum,

to not have those leverage cuts effect your position in any unpredictable way I found it helpful to just close all positions on friday afternoon, e.g. in the onBar method with a construction like the following:

Calendar c = Calendar.getInstance();
c.setTimeZone(TimeZone.getTimeZone("GMT"));
c.setTimeInMillis(askBar.getTime());
int day_of_week = c.get(Calendar.DAY_OF_WEEK);
int hour = c.get(Calendar.HOUR_OF_DAY);

if (day_of_week == Calendar.FRIDAY) {
if (hour >= 16) {
closeAll();
return;
}
}


 

Jump to:  

  © 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