Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

All my Order states are always cancelled.. why?
 Post subject: All my Order states are always cancelled.. why? Post rating: 0   New post Posted: Sun 30 Jun, 2013, 07:02 

User rating: 0
Joined: Thu 09 May, 2013, 14:01
Posts: 9
Location: SingaporeSingapore
Hi,

I ran the historical tester on my program and I noticed that all the orders placed by my program seem to have order state cancelled. I have checked the code with logging and the logic is simple and straight forward. Can you look at the possible problem?

I am attaching the java file.

Thanks,
Vamana


Attachments:
Strategy_4.java [7.36 KiB]
Downloaded 380 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: All my Order states are always cancelled.. why? Post rating: 0   New post Posted: Mon 01 Jul, 2013, 07:34 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please provide a printscreen of the Historical Tester settings that you use.


 
 Post subject: Re: All my Order states are always cancelled.. why? Post rating: 0   New post Posted: Mon 01 Jul, 2013, 14:37 

User rating: 0
Joined: Thu 09 May, 2013, 14:01
Posts: 9
Location: SingaporeSingapore
Hi Support,

I have attached the screenshot with this reply.

Vamana.

Image


Attachments:
Screenshot.png [176.07 KiB]
Downloaded 775 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: All my Order states are always cancelled.. why? Post rating: 0   New post Posted: Mon 01 Jul, 2013, 15:10 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
If you submit order when the market is closed, then it gets cancelled. See checking for market hours:
https://www.dukascopy.com/wiki/#Market_Hours
See how to work with date values:
https://www.dukascopy.com/wiki/#Customize_trading_hours
And more on order state:
https://www.dukascopy.com/wiki/#Order_state


 
 Post subject: Re: All my Order states are always cancelled.. why? Post rating: 0   New post Posted: Tue 02 Jul, 2013, 14:19 

User rating: 0
Joined: Thu 09 May, 2013, 14:01
Posts: 9
Location: SingaporeSingapore
Hi

I am running the historical tester and 'all' my orders in the historical tester run are cancelled not only those in the off market hours.. Only the orders which were issued during off market hours (in history) should be cancelled. The other orders (in Historical tester weekdays) should still be executed right? Also I downloaded a strategy contest strategy and it seems to work fine.

Thanks,
Vamana.


 
 Post subject: Re: All my Order states are always cancelled.. why? Post rating: 0   New post Posted: Tue 02 Jul, 2013, 14:25 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please save all messages to a text file and post it here. Also please provide a screenshot of the Historical Tester Account settings.


 
 Post subject: Re: All my Order states are always cancelled.. why? Post rating: 0   New post Posted: Tue 02 Jul, 2013, 14:52 

User rating: 0
Joined: Thu 09 May, 2013, 14:01
Posts: 9
Location: SingaporeSingapore
Hi

I have attached the files you have asked.

Thanks,
Vamana

Image


Attachments:
screenshot_account_settings.PNG [99.04 KiB]
Downloaded 757 times
Strategy_4_2pips_tp_KD_Cross_02072013_134723.csv [17.14 KiB]
Downloaded 365 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: All my Order states are always cancelled.. why? Post rating: 0   New post Posted: Wed 03 Jul, 2013, 08:31 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
You have to choose GBP/USD in Historical Tester instruments. Additionally:
  1. Always check order state before attempting to close it (see the last paragraph in the first section of https://www.dukascopy.com/wiki/#Close_Orders)
  2. Add tick filtering by instrument https://www.dukascopy.com/wiki/#Filter_Ticks_Bars
  3. Instead of saving the last stoch value, consider calculating it over candle interval, see: https://www.dukascopy.com/wiki/#Indicator_Calculation/Calculate_indicator_by_candle_interval
  4. For SL/TP rounding use: https://www.dukascopy.com/wiki/#Rounding_prices


 

Jump to:  

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