Close strategy

Strategies are published here.

Moderator: admin

Re: Close strategy

Postby Ancient » Tue Dec 21, 2010 8:03 am

Example 1: Assuming you want to Use it to Close with Profit

Profit Level for close orders in the account currency: 100.00
[You set the Monetary Amount you want to realise as Profit i.e. 100 Dollars Input as above]

Type of Profit Level: ABOVE
[You set to Above if you want to close with Profit]

Symbol: Two Options Available here, either ALL or ONE
[If you want to Exit with Profit irrespective of Symbol, Select ALL. If you have Multiple Positions on a specific Symbol and want to Close all Positions for the Particular Symbol in Profit, Select the Specific Symbol]

Example 2: Assuming you want to Use this Strategy as a Stop Loss

Profit Level for close orders in the account currency: -100.00
[You set the Monetary Stop Loss Tolerance Amount i.e. -100 Dollars Input as above]

Type of Profit Level: BELOW
[You set to BELOW if you want to use as Gross P/L Stop Loss]

On Another Note:

I have previously suggested the code is commented such that it also gives us the ability to Select multiple Symbols accoridng to preference further to ALL or Just ONE, which are the only two options presently available.

If you are not getting the Drop Down Menu to Select All or ONE, reload the Strategy, there also seems to be a bug there too.

You may want to view my suggestions in previous posts pertaining to what still needs to be added to this Strategy and possibly add your comments.


Regards
Ancient
Thinking is the hardest work there is, which is the reason why so few engage in it! - "Henry Ford"
Ancient
 
Posts: 45
Joined: Thu Nov 04, 2010 6:55 pm

Re: Close strategy

Postby 4xtr8r » Tue Dec 21, 2010 10:38 am

alepan72 wrote:
4xtr8r wrote:i've tried testing it and doesnt seem to work. not even the alert.

can you explain what the parameters should be? what each field means?

thanks.


Goodmorning friend.
Do you have install the patch below? Many strategies does n't work without it.
viewtopic.php?f=31&t=2337



Thank you! Installed new version. Will try again.
4xtr8r
 
Posts: 29
Joined: Fri Sep 03, 2010 2:19 pm

Re: Close strategy

Postby 4xtr8r » Tue Dec 21, 2010 10:44 am

@Ancient --> Thank you.
4xtr8r
 
Posts: 29
Joined: Fri Sep 03, 2010 2:19 pm

Re: Close strategy

Postby Ancient » Wed Dec 29, 2010 7:26 am

Alexander.Gettinger wrote:Strategy updated.
Added possibility to choice symbol for checking profit and closing.


When Strategy is loaded the first time, User is able to Select ALL Instruments or One Instrument.

However, when Market reaches the defined level and Strategy is Disabled / Stopped, then if User attempts to Re-Set the Properties in order to Re-Activate / Re-Start the Strategy, User is unable to Edit the previously Selected Option pertaining to Instruments.

User has to Re-load the Strategy from Manage Custom Strategies go to Manage Strategies, Add the Strategy and then only is the User able to Select Instrument Options either ALL Instruments or ONE Instrument.

Whilst on this note, please also comment such that User has the ability to Select any number of pairs to be Included in the Strategy.

Regards
Ancient

PS: I have made reference pertaining to commenting the code such that User is given the ability to Select any number of pairs according to preference many times. If this for some reason cannot be done please inform as such!
Ancient
 
Posts: 45
Joined: Thu Nov 04, 2010 6:55 pm

Re: Close strategy

Postby Ancient » Wed Dec 29, 2010 8:44 am

Further to my remarks above, and since this discussion has done the roundtrip of the Forum, I would like to add all relative discussions pertaining to this Strategy here.

The discussion pertaining to this Strategy namely the Close Strategy, was also continued under General Discussions --> Market Scope Suggestions found at viewtopic.php?f=25&t=424&start=30 initially assuming that this would possibly be a Global Requirement within Market Scope, BUT...

Ancient wrote:My query: Is this a Global Support Requirement; or can the code within the Strategy be commented such that it offers the user the further option? i.e to select the Symbols to be included for the Gross P/L calculation.

Your feedback pertaining to the above will be highly appreciated. Moreover, should it be a matter of commenting the code in the Strategy only, if such could be done, will be great.

Either way, your comments regarding my query above is what is of interest to me.

And Nikolays reply below: Found at viewtopic.php?f=25&t=424&start=30
Nikolay.Gekht wrote:Well, the strategy CAN work as on multiple accounts as well as on multiple instruments if it is written to work in this mode. The problem is that there is no such strategies developed yet.

However, Nikolays reply could have been misinterpreted very easily since the query was referencing both Muti Accounts and Multi Instruments.

Subsequently, since I viewed that the Selection of Multi Instruments to be included in the Close Strategy were developed, I understood that providing the one further Option missing being the ability to Select Instruments from the list "Ctrl + Select" according to preference is possible deriving this from Nikolays reply mentioning that "multiple instruments CAN if it is written to work in this mode".

Finally, I am requesting from Alexander to either please comment the code such that the further oprtion is made available to the User, in order for the Stategy to realise its full potential, or inform that such is not possible for any reason.

Regards
Ancient
Thinking is the hardest work there is, which is the reason why so few engage in it! - "Henry Ford"
Ancient
 
Posts: 45
Joined: Thu Nov 04, 2010 6:55 pm

Re: Close strategy

Postby 4xtr8r » Wed Dec 29, 2010 4:24 pm

I tried using the "close strategy" and it gives me an error message when i select yes to "allow strategy to trade." At least i get a popup and the email alert works. If i select "no" for the "allow strategy to trade" it will not alert me (by popup or email).

Would be nice if the "sound" option worked too. You can select yes for sound, but no option to select which sound file!?!?

All in all, i'm not too concerned for it to close the trade automatically, but would be nice if at least the alert system would work properly.


Please advise. Thanks.

4xtr8r
4xtr8r
 
Posts: 29
Joined: Fri Sep 03, 2010 2:19 pm

Re: Close strategy

Postby Ancient » Thu Dec 30, 2010 2:17 am

Have you tried entering the path to the sound file?
Ancient
 
Posts: 45
Joined: Thu Nov 04, 2010 6:55 pm

Re: Close strategy

Postby JJBungles » Tue Jan 04, 2011 12:55 pm

Alexander,

Thank you for this strategy. It works perfectly. I use two instances of this strategy whilst in multiple positions. One instance on EU, one instance on GU. The EU takes care of the TP target. The GU takes care of the SL target. I can adjust these levels throughout my trade. I am currently using it on a UK spreadbet demo account and it works fine.

One question: when the close command occurs, what type of close order is commenced;

-a Market order or
-an At Best order

What extra code would be required to select either type within this strategy?

Kindest Regards,

JJ
JJBungles
 
Posts: 4
Joined: Mon Dec 13, 2010 5:32 am

Re: Close strategy

Postby rehan727 » Fri Jan 07, 2011 11:34 am

Ancient wrote:When Strategy is loaded the first time, User is able to Select ALL Instruments or One Instrument.

However, when Market reaches the defined level and Strategy is Disabled / Stopped, then if User attempts to Re-Set the Properties in order to Re-Activate / Re-Start the Strategy, User is unable to Edit the previously Selected Option pertaining to Instruments.

User has to Re-load the Strategy from Manage Custom Strategies go to Manage Strategies, Add the Strategy and then only is the User able to Select Instrument Options either ALL Instruments or ONE Instrument.


Facing the same problem. The currency selection is disabled once the strategy closes the trades. Have to remove the strategy and add it again.
CurrencyFirsttime.JPG
Currency list shows first time
Attachments
CurrencyAfterClose.JPG
Currency list not available after strategy is completed.
rehan727
 
Posts: 2
Joined: Fri Jan 07, 2011 10:53 am

Re: Close strategy

Postby JJBungles » Fri Jan 07, 2011 2:13 pm

When the strategy executes (Closes the trades) it is turned off and a red dot shows up on the strategy manager.

Menu is Strategies --> Manage Strategies.

Select the strategy and start it again. When it goes green you can change the settings.
JJBungles
 
Posts: 4
Joined: Mon Dec 13, 2010 5:32 am

PreviousNext

Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 21 guests