Dukascopy
 
 
Wiki JStore Search Login

Pending Order Expiration Trouble
 Post subject: Pending Order Expiration Trouble Post rating: 0   Post Posted: Tue 27 Oct, 2015, 12:18 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
Dears,

please help me to fix following trouble:
- the attached strategy should produce max one pending position per bar
- but it produces another pending order once the previous pending order becomes executed

Appreciate,
Antony


Attachments:
SellSide_forDC_v1.vfs [64.06 KiB]
Downloaded 135 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: Pending Order Expiration Trouble Post rating: 0   Post Posted: Tue 27 Oct, 2015, 14:32 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

It does so cause you said so ! :)

Here is the guilty:
Image

Once the pending order is executed it switches from the status "pending" to "executed" literally from "opened" state to "filled" thus no-more considered as a Pending order but as open position.
To apply your condition, you should use "All position" instead of pending Position and you'll have that done.

Cheers


Attachments:
Pending.JPG [58.21 KiB]
Downloaded 347 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: Pending Order Expiration Trouble Post rating: 0   Post Posted: Tue 27 Oct, 2015, 15:15 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
Well, that is right, but we need NOT to be limited by amount of opened (filled) positions.
Sorry, I did not mentioned that before :roll:


 
 Post subject: Re: Pending Order Expiration Trouble Post rating: 0   Post Posted: Tue 27 Oct, 2015, 16:01 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Let me clarify:
- Pending positions considers only orders in placed status
- Open positions handles Filled orders
- All positions handles both: PENDING + OPENED <=> Placed and filled

When a position is CLOSED then the amount gets reset and the flow will go through.


 
 Post subject: Re: Pending Order Expiration Trouble Post rating: 0   Post Posted: Tue 27 Oct, 2015, 16:07 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
.. but there can be more than one position opened (filled)
- so the new pending order will not be opened
- even it should be opened based on entry conditions
- thus the flow does not get through
- because allPositions will be greater or equal to ONE

Am I right?


 
 Post subject: Re: Pending Order Expiration Trouble Post rating: 0   Post Posted: Tue 27 Oct, 2015, 16:16 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Yes, this is right.
Quote:
.. but there can be more than one position opened (filled)


Is this is a new assumption to be considered into your strategy ?

Could you please provide a full description ?


 
 Post subject: Re: Pending Order Expiration Trouble Post rating: 0   Post Posted: Tue 27 Oct, 2015, 16:38 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
Lets put it this way:

- the attached strategy produces entry signals based on simple condition (anytime indicator crossess xy = place pending order)
- so there can be unlimited amount of filled positions

to avoid that, the filter is:
- place only ONE pending order per candle
- also, each placed pending order has its expiration (the same time period as the timeFrame)

Again, big thanks :)


Attachments:
SellSide_forDC_v1.vfs [64.06 KiB]
Downloaded 151 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: Pending Order Expiration Trouble Post rating: 0   Post Posted: Tue 27 Oct, 2015, 17:37 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
from your first post the problem is:
Quote:
but it produces another pending order once the previous pending order becomes executed


and the solution is:
Quote:
to avoid that, the filter is:
- place only ONE pending order per candle
- also, each placed pending order has its expiration (the same time period as the timeFrame)


Then the use of the filter with pending is okay !! once the pending order is filled and a new candle starts (meeting the entry conditions) an new order is placed.
I can't see where is the problem here ..sorry


 
 Post subject: Re: Pending Order Expiration Trouble Post rating: 0   Post Posted: Tue 27 Oct, 2015, 17:50 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
please specify what is the proper OutputValues in your example
https://www.dukascopy.com/vfhelper/arti ... _locale=EN

???

Thanks!


 
 Post subject: Re: Pending Order Expiration Trouble Post rating: 0   Post Posted: Wed 28 Oct, 2015, 10:14 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

Get time unit is a block used to retrieve date and time data from a given input, the input should be indeed defined as time & Date type. In the setting area, you can select the data that you want to retrieve and the variable type is defined by default as integer but you can still use "Double" if needed.
I cannot guess what is expected from the strategy to do, I need a thorough description so that I can help you to do achieve your idea in a simple way.
I don't understand the use of Ontick start while I can see that you trade on hourly basis.
Let's start from the attached version, I've added a couple of filters in the beginning as the strategy was generating an error in your previous example. The error comes from the fact that an output is used in an IF block while it did not get attributed with a value yet.

PS: Your latest post is almost treating the same matter, let's sort this out first
Thanks


Attachments:
SellSide_V1.vfs [69.64 KiB]
Downloaded 139 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: Pending Order Expiration Trouble Post rating: 0   Post Posted: Wed 28 Oct, 2015, 11:14 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
Hi Amine,

sorry for the potential duplicity of discussed problem. I was getting lost, that is why tried to put it all together and made a new topic. It looks as a good refresh to me.

Appreciate your long explanation, before I get through that, I tried your attached SellSide_V1.vfs, but it is not producing any pending order at all (on historical testing). It should be, right?

Antony


 
 Post subject: Re: Pending Order Expiration Trouble Post rating: 0   Post Posted: Wed 28 Oct, 2015, 11:20 

User rating: 0
Joined: Sun 15 Mar, 2015, 20:15
Posts: 77
Location: Czech RepublicCzech Republic
My suggestion is this:

- as far as this topic is more theoretic from my side, lets end up the discussion over here and move to topic called PENDING ORDER EXPIRATION TROUBLE II, because that is exactly the real case I need to figure out

What do you think?


 

Jump to:  

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