|
Cancel pending orders on conditions |
Karl1
|
Post subject: Cancel pending orders on conditions |
Post rating: 0
|
Posted: Sun 18 Oct, 2015, 14:42
|
|
User rating: 0
Joined: Tue 20 May, 2014, 13:09 Posts: 15 Location: Malaysia, Kuala Lumpur
|
Hi,
I would like to have a program that help me to cancel all the pending orders when 1 of them is filled. For eg. initially, I entered 2 orders pending to be filled: 1. eur/usd 2. usd/jpy
I want only 1 trade out of these 2 pending orders i.e. if eur/usd is filled then usd/jpy gets cancel immediately or vice versa.
can you please help me on this?
|
|
|
|
 |
amine_chourou
|
Post subject: Re: Cancel pending orders on conditions |
Post rating: 0
|
Posted: Mon 19 Oct, 2015, 16:30
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi and welcome to this forum!
This is possible to be implemented but the idea behind Visual Jforex platform is to give you the opportunity to build your ideas yourself. According to your description, this can be made using few blocks: You need to tell the system to check all pending positions: this can be made using "Position viewer block" with Pending position variable You need to check if any pending order gets filled : This should be feasible using an IF condition: IF Pending Position: STATE = Filled (which means if any order gets triggered and filled ) You need to cancel any remaining pending order if the above condition is met using "close and cancel" block
On which currency pairs you work actually? (eur/usd & usd/jpy only ? )
Thanks
|
|
|
|
 |
bradrtony
|
Post subject: Re: Cancel pending orders on conditions |
Post rating: 0
|
Posted: Tue 20 Oct, 2015, 09:26
|
|
User rating: 0
Joined: Sun 15 Mar, 2015, 20:15 Posts: 77 Location: Czech RepublicCzech Republic
|
Amine,
pls help how to cancel pending order based on time expiration.
Example: - pending order is placed - it's expiration is 5 min
Thanks for your effort, Antony
|
|
|
|
 |
amine_chourou
|
Post subject: Re: Cancel pending orders on conditions |
Post rating: 1
|
Posted: Tue 20 Oct, 2015, 14:29
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi,
Such ideas can led the user to work with "Time in Force" variable type named "Good Till Time" in VJF and available in the Pending order block but this variable can be only used to cancel a given order in "Open" status at a specific time known in advance . In your case, this would not help as you need an expiry time that depends on the creation time of the order: Creation time + 5 mn (i.e: 300000 ms). Therefore, we need to use "Close/Cancel position block that will help you achieving this. Once expiry time reached, the cancel command will remove the order IF not filled. Check this example and let me know your questions
Cheers
Attachments: |
Cancel_If_Not_filled.vfs [33.71 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.
|
|
|
|
|
 |
bradrtony
|
Post subject: Re: Cancel pending orders on conditions |
Post rating: 0
|
Posted: Tue 20 Oct, 2015, 17:36
|
|
User rating: 0
Joined: Sun 15 Mar, 2015, 20:15 Posts: 77 Location: Czech RepublicCzech Republic
|
First of all thanks for fast response  Second: all those blocks are to solve my question? Well, I need to get through all that 
|
|
|
|
 |
amine_chourou
|
Post subject: Re: Cancel pending orders on conditions |
Post rating: 0
|
Posted: Wed 21 Oct, 2015, 09:53
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Well, After rethinking this, there is a simpler way to achieve your idea and this time the use of GTT variable is possible, indeed  Check this example and let me know your thoughts Cheers
Attachments: |
Pending_GTT.vfs [25.52 KiB]
Downloaded 180 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.
|
|
|
|
|
 |
bradrtony
|
Post subject: Re: Cancel pending orders on conditions |
Post rating: 0
|
Posted: Wed 21 Oct, 2015, 18:07
|
|
User rating: 0
Joined: Sun 15 Mar, 2015, 20:15 Posts: 77 Location: Czech RepublicCzech Republic
|
Well, that is simpler way  Appreciate Amine! Can you please help me (based on Pending_GTT) how to place pending order at lastBarLow? Honestly, I did spend almost three days on that, but as far as I am new to Visual Jforex and my programming skills end up with basic on ZX Spectrum... but becoming big Visual fan  ! Have a good evening A.
|
|
|
|
 |
bradrtony
|
Post subject: Re: Cancel pending orders on conditions |
Post rating: 0
|
Posted: Wed 21 Oct, 2015, 18:12
|
|
User rating: 0
Joined: Sun 15 Mar, 2015, 20:15 Posts: 77 Location: Czech RepublicCzech Republic
|
One more pls: is that GT ExpiryTime green box part of the strategy?
|
|
|
|
 |
amine_chourou
|
Post subject: Re: Cancel pending orders on conditions |
Post rating: 0
|
Posted: Thu 22 Oct, 2015, 09:36
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hiya, Good to hear that! My first contact with a "computer" was with Spectrum ZX +2 as well !!  Quote: Can you please help me (based on Pending_GTT) how to place pending order at lastBarLow? Simply drag the candle low price into the entry price field of the pending order block and that's it. Quote: One more pls: is that GT Expiry-time green box part of the strategy? No, it is a variable dropped on the work-space so be able to see its value in real time. It is valid for any variable, once dropped into the work-space it displays its "content" once it gets a value when the flow goes through it. I recommend you to browse Visual Jforex records in Youtube Cheers
|
|
|
|
 |
bradrtony
|
Post subject: Re: Cancel pending orders on conditions |
Post rating: 0
|
Posted: Thu 22 Oct, 2015, 14:00
|
|
User rating: 0
Joined: Sun 15 Mar, 2015, 20:15 Posts: 77 Location: Czech RepublicCzech Republic
|
Finally I did that (pls see attachment) and it works! Any suggestions how to be smarter welcome.
BTW ZX Spectrum have had 8 kB ROM and 48 kB RAM. It is even more amazing from today's standpoint.
Attachments: |
pendingOrder_v3.vfs [27.68 KiB]
Downloaded 113 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.
|
|
|
|
|
 |
amine_chourou
|
Post subject: Re: Cancel pending orders on conditions |
Post rating: 0
|
Posted: Fri 23 Oct, 2015, 16:28
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
To Karl1,
We're planning to enhance the variables "All Positions", "Pending Positions" and "Open Positions" displayed in the left panel of VJF in a way to consider positions traded in all instruments. Currently, it supports only instruments defined by the strategy i.e the user.
Cheers
|
|
|
|
 |
bradrtony
|
Post subject: Re: Cancel pending orders on conditions |
Post rating: 0
|
Posted: Mon 26 Oct, 2015, 23:06
|
|
User rating: 0
Joined: Sun 15 Mar, 2015, 20:15 Posts: 77 Location: Czech RepublicCzech Republic
|
to Amine:
good news: the attached strategy works well with Visual Historical Testing bad news: it does not work on demo real time account
what we can do with that?
Attachments: |
Pending_GTT (1).vfs [25.52 KiB]
Downloaded 128 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.
|
|
|
|
|
 |
amine_chourou
|
Post subject: Re: Cancel pending orders on conditions |
Post rating: 0
|
Posted: Tue 27 Oct, 2015, 11:53
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi,
Try to subscribe to an instrument using IF condition and it will work in real-time run
|
|
|
|
 |
bradrtony
|
Post subject: Re: Cancel pending orders on conditions |
Post rating: 0
|
Posted: Tue 27 Oct, 2015, 12:22
|
|
User rating: 0
Joined: Sun 15 Mar, 2015, 20:15 Posts: 77 Location: Czech RepublicCzech Republic
|
Hi Amine,
please give example (I am not catching it ..).
Appreciate, Antony
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|