|
Trading time vs cancel position at time |
fostercz
|
Post subject: Trading time vs cancel position at time |
Post rating: 0
|
Posted: Wed 07 May, 2014, 15:12
|
|
User rating: 0
Joined: Sun 04 May, 2014, 18:17 Posts: 12 Location: Czech Republic,
|
Hello
I tried to make same strategy
Basic concept is trade -between 9 and 17 GMT - currency pair EUR/USD - maximally one trade per day on each currency pair - maximally two trades open on both pairs (Next may be GPB/USD e.g) - close trade on EUR/USD at 19:00 GMT
Here I post magic, that i made. It works when i see the chart, but shows me ERROR:Cannot close order in CREATED, CLOSED or CANCELED state, current state - [CLOSED].
So my diagnosis is, that after it closes my position it is still trying to close again!
Please write answer easy I´m still beginner.
Attachments: |
tradingtimeerror.vfs [34.2 KiB]
Downloaded 89 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: Trading time vs cancel position at time |
Post rating: 1
|
Posted: Wed 07 May, 2014, 17:56
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Greetings,
Yes your conclusion is correct: you strategy is send closing command to a positions that are not valid anymore because either already closed or 'overwritten' by another position that comes afterwords/ In any case, if you need to make sure your position(s) is (are) closed, you have to know weather your strategy is dealing with multiple positions or a single one: Multiple positions --> Use Position viewer Single position --> Use a simple position variable but make sure the position state is filled
Attached 2 examples of the above cases
Thanks
Attachments: |
tradingtimeerror_2.vfs [33.11 KiB]
Downloaded 124 times
|
tradingtimeerror_1.vfs [36.15 KiB]
Downloaded 101 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.
|
|
|
|
|
 |
fostercz
|
Post subject: Re: Trading time vs cancel position at time |
Post rating: 0
|
Posted: Wed 07 May, 2014, 18:06
|
|
User rating: 0
Joined: Sun 04 May, 2014, 18:17 Posts: 12 Location: Czech Republic,
|
I will check your answers. Thanks for responding to my post. I have solved it this way. Maybe I´m starting to think like amateur programer.
Edit: Your code is currently much more faster.
Attachments: |
repaired.vfs [35.23 KiB]
Downloaded 106 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
]
|
|
|
|
|