|
How to know if open order is long or short |
doczero
|
Post subject: How to know if open order is long or short |
Post rating: 0
|
Posted: Tue 23 Apr, 2013, 09:55
|
|
User rating: 7
Joined: Wed 04 Jul, 2012, 02:40 Posts: 109 Location: Australia, Melbourne
|
Hi Guys,
This should be simple - for some reason I can not find how to check if an open order is long or short?
I checked the wiki and it says that I should use data type Position , then I should be able to use something like an IF statement? I still cant find it!
Can someone clear this up as im really finding it difficult to answer this!
Thanks
DoCZero
|
|
|
|
 |
Visual Support
|
Post subject: Re: How to know if open order is long or short |
Post rating: 0
|
Posted: Tue 23 Apr, 2013, 10:41
|
|
Visual JForex expert at Dukascopy |  |
User rating: 4
Joined: Fri 06 Feb, 2009, 16:34 Posts: 130
|
doczero wrote: This should be simple - for some reason I can not find how to check if an open order is long or short?
I checked the wiki and it says that I should use data type Position , then I should be able to use something like an IF statement? I still cant find it!
Check this screen. In the example strategy, the strategy checks all positions if it was Long and profit/loss in USD bigger and equals than 50$, than those positions will be closed. This check happens on every candle.
Attachments: |
PositionisLongExample.vfs [22.19 KiB]
Downloaded 418 times
|
PositionisLongExample.JPG [121.27 KiB]
Downloaded 547 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.
|
|
|
|
|
 |
doczero
|
Post subject: Re: How to know if open order is long or short |
Post rating: 0
|
Posted: Tue 23 Apr, 2013, 11:02
|
|
User rating: 7
Joined: Wed 04 Jul, 2012, 02:40 Posts: 109 Location: Australia, Melbourne
|
Thanks support - By the way, loving the tool so far, hopefully going to finish my first strategy tonight! 
|
|
|
|
 |
julianlam
|
Post subject: Re: How to know if open order is long or short |
Post rating: 0
|
Posted: Wed 21 Aug, 2013, 16:27
|
|
User rating: 0
Joined: Sat 29 Jun, 2013, 10:41 Posts: 8
|
Hi,
I hope its not too silly to ask, but what if the position is short? In the diagram, under User Variable/currentPosition, there is no "Position is Short" Option.
Thanks
|
|
|
|
 |
dirk_r1
|
Post subject: Re: How to know if open order is long or short |
Post rating: 0
|
Posted: Wed 21 Aug, 2013, 17:57
|
|
Visual JForex expert at Dukascopy |  |
User rating: 27
Joined: Fri 03 May, 2013, 18:25 Posts: 366 Location: GermanyGermany
|
Hello! It is very easy... Just by logic:   Have fun!
Attachments: |
Determine_Pos.png [43.11 KiB]
Downloaded 709 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.
|
|
|
|
|
 |
julianlam
|
Post subject: Re: How to know if open order is long or short |
Post rating: 0
|
Posted: Wed 21 Aug, 2013, 23:36
|
|
User rating: 0
Joined: Sat 29 Jun, 2013, 10:41 Posts: 8
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|