Dukascopy
 
 
Wiki JStore Search Login

How to distinguish positions opened manually from those opened by other strategy?
 Post subject: How to distinguish positions opened manually from those opened by other strategy? Post rating: 0   New post Posted: Thu 19 Jun, 2014, 19:20 

User rating: 1
Joined: Tue 10 Jul, 2012, 11:51
Posts: 25
Location: Czech Republic,
Hello,
I want to create a simple strategy for managing my manual trades (moving SL to BE when a position is X pips in profit). Looks easy, but I need the strategy to handle just my manual positions and to ignore others placed by other strategies.
How do I do it? Is there any trick?

I tried to filter the positions using Position.Label, but labels at manual positions are not empty, but generated, so this didn't work.

PLease help.

Thanks


 
 Post subject: Re: How to distinguish positions opened manually from those opened by other strategy? Post rating: 0   New post Posted: Fri 20 Jun, 2014, 08:52 
Visual JForex expert at Dukascopy
User avatar

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

Did you tried to use the field comment in your order command block ? meaning you identify the orders/positions created by your strategy by a given comment and IF this comment is not identified in a submitted order/position => Manual order


 
 Post subject: Re: How to distinguish positions opened manually from those opened by other strategy? Post rating: 0   New post Posted: Fri 20 Jun, 2014, 10:20 

User rating: 1
Joined: Tue 10 Jul, 2012, 11:51
Posts: 25
Location: Czech Republic,
Hi amine,

Oops, sure, my mistake. It couldn't work using Label.
Fixed to use the "comment", but it still doesn't work for me :(

As manual trades don't have any "comment", the strategy says "null" when processing such a trade by an IF block and then the IF block does't proceed in comparing the "null" with "mycomment". It never gets through even the result is "=" or "!=".
Attached is the strategy.

Any idea how to get over this?

Many thanks for your help.


Attachments:
SLtoBE_noComment.vfs [29.63 KiB]
Downloaded 148 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 distinguish positions opened manually from those opened by other strategy? Post rating: 0   New post Posted: Fri 20 Jun, 2014, 13:18 
Visual JForex expert at Dukascopy
User avatar

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

Alright,
You need to use it as displayed: In order to find this "Infinity" variable which may sounds strange :) just click on the small icon as shown below and you'll get it.
Image

If comment = nothing <=> Comment = Infinity : manual trading then the flow pass over
If comment = Something <=> Comment != Infinity: Automated trading (whatever the comment is) then the flow goes in that side.. If later you need to specify a comment to identify which strategy is doing what, then simply add another IF block with the specific text comment.


Attachments:
Here.png [20.06 KiB]
Downloaded 334 times
Comment.JPG [83.32 KiB]
Downloaded 365 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 distinguish positions opened manually from those opened by other strategy? Post rating: 1   New post Posted: Fri 20 Jun, 2014, 13:59 

User rating: 1
Joined: Tue 10 Jul, 2012, 11:51
Posts: 25
Location: Czech Republic,
Man you're good! It works. Thanks.


 

Jump to:  

  © 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