|
Working with pending orders |
doczero
|
Post subject: Working with pending orders |
Post rating: 0
|
Posted: Thu 16 May, 2013, 12:39
|
|
User rating: 7
Joined: Wed 04 Jul, 2012, 02:40 Posts: 109 Location: Australia, Melbourne
|
Hi Guys,
I was wondering if you can help with the following:
1) If I have a pending BUY stop, and I wish to change the entry price to a new entry price how do I do this? (as there is no SET PRICE block - like set stop loss).
2) Can I use position viewer and the bool Position is long = true to see if a pending order is a buystop?
Thanks in advance!
DoCZero
|
|
|
|
|
vadim_berezhnoj
|
Post subject: Re: Working with pending orders |
Post rating: 0
|
Posted: Thu 16 May, 2013, 14:43
|
|
Visual JForex expert at Dukascopy | |
User rating: ∞
Joined: Mon 22 Apr, 2013, 11:30 Posts: 604 Location: UkraineUkraine
|
Hello Doc.
1) You should cancel old order and place new one.
2) In parameters of "Position" variable there is "Position Command" parameter. Check it in IF block.
|
|
|
|
|
doczero
|
Post subject: Re: Working with pending orders |
Post rating: 0
|
Posted: Thu 16 May, 2013, 18:10
|
|
User rating: 7
Joined: Wed 04 Jul, 2012, 02:40 Posts: 109 Location: Australia, Melbourne
|
Hello vadim,
I have put this file together to show both your suggestions but I can not get it working as you say - the logic is as follows:
If no pending order - Place a pending buyorder at lower MAenvelope Place a pending Sellstop at higher MAenvelope
If pending orders are open - Modify pending order to new MAenvelope value each bar.
Can you modify my code to demonstrate how to do this correctly?
Also I would find it strange that deleting an order to change the value would be more efficient than modifying the trigger price. Is it just Jforex can not do this at the moment?
Attachments: |
Pendingmodify.vfs [36.99 KiB]
Downloaded 254 times
|
File comment: Updated Version
Pendingmodify.vfs [37.06 KiB]
Downloaded 262 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.
|
|
|
|
|
|
|
Pages: [
1
]
|
|
|
|
|