Dukascopy
 
 
Wiki JStore Search Login

how to close pending order ?
 Post subject: how to close pending order ? Post rating: 0   Post Posted: Mon 27 May, 2013, 23:35 
User avatar

User rating: 9
Joined: Sun 18 Dec, 2011, 03:31
Posts: 160
Location: Egypt, Cairo
i open pending order in each day i want to close this pending order before next day(tomorrow) 23:59


 
 Post subject: Re: how to close pending order ? Post rating: 0   Post Posted: Tue 28 May, 2013, 13:11 
User avatar

User rating: 7
Joined: Wed 04 Jul, 2012, 02:40
Posts: 109
Location: Australia, Melbourne
Hello FXEgyptian!

Ok, so this is not the most efficient way - however it works and is quick and dirty. The other way is to use a calculation in the goodtilltime box of the order. I havent sat down and worked through that yet so what I am posting is a way that works, but is not the most efficient.

The Code attached will open a pending order when none is open.
If the time is 23:59 it will close that order (however a new one will open).
I have made the target price 100pips above current price, with a 50pip stoploss and 50pip take profit.

I think you can modify this to do what you want! Picture and code:


Image

As always - the code is tested and works how described above. Any questions - im happy to help!

DoCZero.


Attachments:
closeattime.jpg [544.55 KiB]
Downloaded 1414 times
closeattime.vfs [36.38 KiB]
Downloaded 626 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: how to close pending order ? Post rating: 0   Post Posted: Thu 30 May, 2013, 16:56 
User avatar

User rating: 6
Joined: Fri 12 Apr, 2013, 14:08
Posts: 88
Location: FranceFrance
Quote:
The other way is to use a calculation in the goodtilltime box of the order.


That would be the best way.


 
 Post subject: Re: how to close pending order ? Post rating: 0   Post Posted: Thu 30 May, 2013, 16:57 
User avatar

User rating: 6
Joined: Fri 12 Apr, 2013, 14:08
Posts: 88
Location: FranceFrance
Look here:

https://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=139&t=49189


 
 Post subject: Re: how to close pending order ? Post rating: 0   Post Posted: Thu 30 May, 2013, 21:08 
User avatar

User rating: 9
Joined: Sun 18 Dec, 2011, 03:31
Posts: 160
Location: Egypt, Cairo
Thank you all


 
 Post subject: Re: how to close pending order ? Post rating: 0   Post Posted: Mon 03 Jun, 2013, 07:17 
User avatar

User rating: 6
Joined: Fri 12 Apr, 2013, 14:08
Posts: 88
Location: FranceFrance
Welcome.

Do not hesitate to come back.


 
 Post subject: Re: how to close pending order ? Post rating: 0   Post Posted: Sat 15 Jun, 2013, 10:50 
User avatar

User rating: 9
Joined: Sun 18 Dec, 2011, 03:31
Posts: 160
Location: Egypt, Cairo
Para wrote:


i try to do this in above link but it didn't work, my pending order didn't cancel can you upload strategy contain this technique ?


 
 Post subject: Re: how to close pending order ? Post rating: 0   Post Posted: Mon 17 Jun, 2013, 12:39 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 604
Location: UkraineUkraine
Please provide an example of the strategy to speak substantively.


 
 Post subject: Re: how to close pending order ? Post rating: 0   Post Posted: Tue 18 Jun, 2013, 10:40 
User avatar

User rating: 9
Joined: Sun 18 Dec, 2011, 03:31
Posts: 160
Location: Egypt, Cairo
vadim_berezhnoj wrote:
Please provide an example of the strategy to speak substantively.


i want close pending order after 6 hours from it was created

i try to use what in description in this link in my strategy but it didn't work i want just a simple strategy contain this request .

"https://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=139&t=49189"


 
 Post subject: Re: how to close pending order ? Post rating: 0   Post Posted: Wed 19 Jun, 2013, 08:59 
User avatar

User rating: 6
Joined: Fri 12 Apr, 2013, 14:08
Posts: 88
Location: FranceFrance
Please provide your .svf file.

When you write "It doesn't work", their is no much we can do.


 
 Post subject: Re: how to close pending order ? Post rating: 0   Post Posted: Wed 19 Jun, 2013, 17:40 
User avatar

User rating: 9
Joined: Sun 18 Dec, 2011, 03:31
Posts: 160
Location: Egypt, Cairo
Para wrote:
Please provide your .svf file.

When you write "It doesn't work", their is no much we can do.


when i write "It doesn't work" means i want just simple strategy explain goodtilltime in pending order.

my strategy exist in attach file,i want to know why didn't pending order cancel after 6hour ?


Attachments:
TR.vfs [29.04 KiB]
Downloaded 564 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: how to close pending order ? Post rating: 0   Post Posted: Thu 20 Jun, 2013, 01:23 
User avatar

User rating: 9
Joined: Sun 18 Dec, 2011, 03:31
Posts: 160
Location: Egypt, Cairo
forexegyptian wrote:
Para wrote:
Please provide your .svf file.

When you write "It doesn't work", their is no much we can do.


when i write "It doesn't work" means i want just simple strategy explain goodtilltime in pending order.

my strategy exist in attach file,i want to know why didn't pending order cancel after 6hour ?


please check my strategy and tell me what is problem ?


 
 Post subject: Re: how to close pending order ? Post rating: 0   Post Posted: Thu 20 Jun, 2013, 04:08 
User avatar

User rating: 9
Joined: Sun 18 Dec, 2011, 03:31
Posts: 160
Location: Egypt, Cairo
Are goodtilltime available only to PLACE OFFER, PLACE BID ? "i think this is issue face me when i use goodtilltime"

if the answer is yes what different between [buy stop,sell stop] and [PLACE OFFER, PLACE BID] ?

I really appreciate your efforts with me to solve this problem


 
 Post subject: Re: how to close pending order ? Post rating: 0   Post Posted: Fri 21 Jun, 2013, 00:35 
User avatar

User rating: 9
Joined: Sun 18 Dec, 2011, 03:31
Posts: 160
Location: Egypt, Cairo
Can any one help me ?


 
 Post subject: Re: how to close pending order ? Post rating: 0   Post Posted: Fri 21 Jun, 2013, 07:33 
User avatar

User rating: 6
Joined: Fri 12 Apr, 2013, 14:08
Posts: 88
Location: FranceFrance
Hello

Please export your strategy to JForex and test it there with the historical tester.
We suspect a bug somewhere in a server.

Your code seems correct.


 
 Post subject: Re: how to close pending order ? Post rating: 0   Post Posted: Fri 21 Jun, 2013, 10:28 
User avatar

User rating: 9
Joined: Sun 18 Dec, 2011, 03:31
Posts: 160
Location: Egypt, Cairo
Para wrote:
Hello

Please export your strategy to JForex and test it there with the historical tester.
We suspect a bug somewhere in a server.

Your code seems correct.


i export my strategy to jforex but also goodtilltime not execute.

Are goodtilltime available only to PLACE OFFER, PLACE BID ? "i think this is issue face me when i use goodtilltime" because i use BUY Stop

if the answer is yes how can i close my pending order with type "BUY Stop By Bid" after 6 hours from it was created

I really appreciate your efforts with me to solve this problem




Image


Attachments:
Pic1.jpg [117.93 KiB]
Downloaded 1341 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: how to close pending order ? Post rating: 0   Post Posted: Fri 21 Jun, 2013, 10:59 
User avatar

User rating: 6
Joined: Fri 12 Apr, 2013, 14:08
Posts: 88
Location: FranceFrance
We did identify a problem with the historical tester.

If you take your strategy and change the pending order by a @market order, than you will see the position opening at 01:00 instead of 03:00.

We are working to identify what causes this problem.


 
 Post subject: Re: how to close pending order ? Post rating: 0   Post Posted: Fri 21 Jun, 2013, 11:17 
User avatar

User rating: 6
Joined: Fri 12 Apr, 2013, 14:08
Posts: 88
Location: FranceFrance
Are goodtilltime available only to PLACE OFFER, PLACE BID ?
Nop, it is for all pending orders.


 
 Post subject: Re: how to close pending order ? Post rating: 0   Post Posted: Sat 22 Jun, 2013, 03:15 
User avatar

User rating: 9
Joined: Sun 18 Dec, 2011, 03:31
Posts: 160
Location: Egypt, Cairo
Para wrote:
We did identify a problem with the historical tester.

If you take your strategy and change the pending order by a @market order, than you will see the position opening at 01:00 instead of 03:00.

We are working to identify what causes this problem.


i try to change pending order by a @market, but i don't know, i attached java strategy, can you show me which line of code required to change this order ?

Attachment:
TR.java [13.15 KiB]
Downloaded 555 times


and why will i see the position opening at 01:00 instead of 03:00 ? in my code i write in 03:00 add 50pip to last bid candle close and this pending order available to 6 hours


 
 Post subject: Re: how to close pending order ? Post rating: 0   Post Posted: Mon 24 Jun, 2013, 21:13 
User avatar

User rating: 9
Joined: Sun 18 Dec, 2011, 03:31
Posts: 160
Location: Egypt, Cairo
Para wrote:
We did identify a problem with the historical tester.

If you take your strategy and change the pending order by a @market order, than you will see the position opening at 01:00 instead of 03:00.

We are working to identify what causes this problem.


can you tell me how change the pending order by a @market order ?

i attach strategy source code


Attachments:
TR.java [13.16 KiB]
Downloaded 544 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