Dukascopy
 
 
Wiki JStore Search Login

How to know if open order is long or short
 Post subject: How to know if open order is long or short Post rating: 0   Post Posted: Tue 23 Apr, 2013, 09:55 
User avatar

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


 
 Post subject: Re: How to know if open order is long or short Post rating: 0   Post Posted: Tue 23 Apr, 2013, 10:41 
Visual JForex expert at Dukascopy
User avatar

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.
 
 Post subject: Re: How to know if open order is long or short Post rating: 0   Post Posted: Tue 23 Apr, 2013, 11:02 
User avatar

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! ;)


 
 Post subject: Re: How to know if open order is long or short Post rating: 0   Post 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


 
 Post subject: Re: How to know if open order is long or short Post rating: 0   Post Posted: Wed 21 Aug, 2013, 17:57 
Visual JForex expert at Dukascopy
User avatar

User rating: 27
Joined: Fri 03 May, 2013, 18:25
Posts: 366
Location: GermanyGermany
Hello!

It is very easy... Just by logic: ;)


Image

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.
 
 Post subject: Re: How to know if open order is long or short Post rating: 0   Post Posted: Wed 21 Aug, 2013, 23:36 

User rating: 0
Joined: Sat 29 Jun, 2013, 10:41
Posts: 8
Thanks Dirk


 

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