Dukascopy
 
 
Wiki JStore Search Login

Working with pending orders
 Post subject: Working with pending orders Post rating: 0   New post Posted: Thu 16 May, 2013, 12:39 
User avatar

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


 
 Post subject: Re: Working with pending orders Post rating: 0   New post Posted: Thu 16 May, 2013, 14:43 
Visual JForex expert at Dukascopy
User avatar

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.


 
 Post subject: Re: Working with pending orders Post rating: 0   New post Posted: Thu 16 May, 2013, 18:10 
User avatar

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.
 
 Post subject: Re: Working with pending orders Post rating: 0   New post Posted: Mon 20 May, 2013, 11:54 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 604
Location: UkraineUkraine
Hello Doc.

I got two solutions for you.
First(Pendingmodify_v2) is exact what you are asking for.
Second(BollingerBandExample3) is my strategy for BolingerBand strategy with tricky solution for updating Pending orders.

Good luck.


Attachments:
BollingerBandExample3.vfs [42.65 KiB]
Downloaded 276 times
Pendingmodify_v2.vfs [39.5 KiB]
Downloaded 277 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:  

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