Close strategy

Strategies are published here.

Moderator: admin

Close strategy

Postby Alexander.Gettinger » Wed Dec 08, 2010 5:32 am

Strategy for close all open orders if all total profit/loss above/below user's level.

Download:
LevelCloseStrategy.lua
(13.1 KiB) Downloaded 3486 times
Last edited by Alexander.Gettinger on Thu Dec 09, 2010 12:28 am, edited 1 time in total.
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Re: Close strategy

Postby alepan72 » Wed Dec 08, 2010 6:46 am

That's PERFECT. It is exactly what I want!!!

Thanx a lot for your services :!: :!: :!:
Image
User avatar
alepan72
 
Posts: 59
Joined: Wed Oct 27, 2010 4:19 am

Re: Close strategy

Postby Ancient » Wed Dec 08, 2010 7:44 am

Hi Alexander,

The following is not clear to me:

Parameters, Profit level for close orders in the account
Do we Enter Pips (P/L) OR Monetary Profit (Gross P/L)?

Thank You for taking the time.

Regards
Ancient
Ancient
 
Posts: 45
Joined: Thu Nov 04, 2010 6:55 pm

Re: Close strategy

Postby Ancient » Wed Dec 08, 2010 12:37 pm

Initially I thought I understood what this Strategy was about. But after taking a closer look at it I lost it totally!

Can someone explain what this Strategy is meant to do?

Regards
Ancient
 
Posts: 45
Joined: Thu Nov 04, 2010 6:55 pm

Re: Close strategy

Postby Jason Rogers » Wed Dec 08, 2010 4:41 pm

I tested the strategy and it's sending the order to "Close All Positions for Symbol" rather than "Close All Positions". So if I have multiple currency pairs open, it will only close the trades which I have the strategy attached to. And if I attach the strategy to both currency pairs and set the profit target to say $100, it will close all trades in 1 currency pair when total profit reaches $100 but remaining trades stay open. The remaining trades will only close when the profit on remaining trades goes back up to $100.
Jason Rogers
 
Posts: 2
Joined: Wed Dec 08, 2010 4:36 pm

Re: Close strategy

Postby alepan72 » Wed Dec 08, 2010 6:26 pm

Jason Rogers wrote:I tested the strategy and it's sending the order to "Close All Positions for Symbol" rather than "Close All Positions".


Xmmm.... I suppose I m wrong. I thought that strategy close ALL pairs, but it's close only a pair.
Dear Alexander.Gettinger, can you fix it? I have a similar strategy for MT4 and I can send it to you if it 's help you to translate it.
Image
User avatar
alepan72
 
Posts: 59
Joined: Wed Oct 27, 2010 4:19 am

Re: Close strategy

Postby Ancient » Wed Dec 08, 2010 7:12 pm

The name of this Strategy requires to be worded such that it more correctly describes its purpose.

If this is not possible, a brief explanation of the Strategy's Logical application would be useful. If this is also not possible, then possibly this Strategy should only exist on the Members pc that requested its development.
Ancient
 
Posts: 45
Joined: Thu Nov 04, 2010 6:55 pm

Re: Close strategy

Postby Ancient » Wed Dec 08, 2010 7:30 pm

This Strategy does anything else other than the initial request! Below is Alepans Request:

Re: Close all open markets if netpl is possitive strategy reque
by alepan72 » Wed Oct 27, 2010 12:27 pm

Hi, all!
I m interesting for a strategy like this. I usually open two or three positions on differents currencies or trading based on a correlation table.
I would like if some reason my net p/l is above or below a stop loss / profit value (20-30 pips e.g.), strategy close ALL positions automatically.
Thanks and my best regards for your job.
alepan72

Posts: 14
Joined: Wed Oct 27, 2010 12:19 pm
Private messageE-mail

This Strategy does anything else other than the initial request! For the life of me I cannot understand how Alepan came back so happy and content, thanking for the development of the Strategy he requested???
Ancient
 
Posts: 45
Joined: Thu Nov 04, 2010 6:55 pm

Re: Close strategy

Postby Alexander.Gettinger » Wed Dec 08, 2010 10:04 pm

Ancient wrote:Hi Alexander,

The following is not clear to me:

Parameters, Profit level for close orders in the account
Do we Enter Pips (P/L) OR Monetary Profit (Gross P/L)?

Thank You for taking the time.

Regards
Ancient


Gross P/L
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Re: Close strategy

Postby Alexander.Gettinger » Wed Dec 08, 2010 10:09 pm

Ancient wrote:Initially I thought I understood what this Strategy was about. But after taking a closer look at it I lost it totally!

Can someone explain what this Strategy is meant to do?

Regards


For example:
Let [LevelType]=ABOVE. If your profit/loss for all open orders more than [ProfitLevel] strategy close all position.
For [LevelType]=BELOW. If profit/loss less than [ProfitLevel] strategy close all orders.

This strategy is a Stop/Limit level for all account, not for one order.
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Next

Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 14 guests