• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 7:09pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 7:09pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

BASKET TRADE Management: Using multiple trade management EA's on basket trades 8 replies

Alternative Trade Management/Money Management Methods 1 reply

multi-purpose Stoch Alert 11 replies

Successful Trade Management / Risk Management 0 replies

Trade Multi ECN accounts on Multi Brokers ? 1 reply

  • Commercial Content
  • /
  • Reply to Thread
  • Subscribe
  • 55
Attachments: Multi-purpose trade management EA
Exit Attachments

Multi-purpose trade management EA

  • Last Post
  •  
  • 1 1516Page 171819 41
  • 1 16Page 1718 41
  •  
  • Post #321
  • Quote
  • Nov 3, 2009 4:30am Nov 3, 2009 4:30am
  •  pathumracled
  • | Joined May 2009 | Status: Sucessful Praying FxTrader2Investor | 258 Posts
Quoting Penny
Disliked
Hi Steve

I would like to know if there is a way the ea can be set to stop any new trades from opening once a close all has been triggered.
Thanks Penny.
Ignored
Hello Penny:
If we can find a way to let it (M-PTM) then disable all EA's (Chage MT4 hat from Green to RED) But that is the domain of the expert coders, if you will.

Bless
 
 
  • Post #322
  • Quote
  • Nov 7, 2009 1:37am Nov 7, 2009 1:37am
  •  tts123
  • | Joined Dec 2008 | Status: Member | 26 Posts
Quoting SteveHopwood
Disliked
'Tis done. Download from post 1.

I haven't tested the function, so sing out if there are any bugs. There shouldn't be, as it is the same code as all the other hidden stop code with a couple of variable names changed, but test it on demo first just to make sure.

Ignored
Hi Steve, thanks for your EA, can this EA work on ECN broker e.g. FXCM UK?
 
 
  • Post #323
  • Quote
  • Nov 10, 2009 12:52pm Nov 10, 2009 12:52pm
  •  b12
  • | Joined Apr 2009 | Status: Member | 7 Posts
Hi I had been using this EA for quite a while, but somehow since yesterday I always got this message

"Stop loss hit. Close of GBPJPY ticket no 4252791 failed with error (4109): trade is not allowed in the expert properties"

Anybody kind enough can tell be what sort of error is this.

Btw, thank you Steve for the continuous improvement
 
 
  • Post #324
  • Quote
  • Nov 11, 2009 6:33am Nov 11, 2009 6:33am
  •  ivanyong
  • | Membership Revoked | Joined Sep 2008 | 51 Posts
Quoting b12
Disliked
hi i had been using this ea for quite a while, but somehow since yesterday i always got this message

"stop loss hit. Close of gbpjpy ticket no 4252791 failed with error (4109): Trade is not allowed in the expert properties"

anybody kind enough can tell be what sort of error is this.

Btw, thank you steve for the continuous improvement
Ignored
please check your stop loss that allowed by ur broker.
Eg. Gbpjpy min stop loss away from 10pips..
 
 
  • Post #325
  • Quote
  • Nov 15, 2009 5:26pm Nov 15, 2009 5:26pm
  •  tonycashflow
  • | Joined Apr 2009 | Status: Member | 31 Posts
I tried finding a trade management ea that could do the following without success:

1 - Close all trades of a given currency when one of the trades hit a certain number of pips in drawdown. For example, if set at 150, when one trade hits that level (most likely the first one entered), all trades in the currency pair are close.

and/or

2 - Close all trades of a given currency when the first trade of the basket has been opened for a certain number of time in minutes or hours


They could be added to the "basket" section of this ea. I don't know if that is simple to do but it would be great if it could be added to this ea.

BTW thanks for the EA Really helpful
 
 
  • Post #326
  • Quote
  • Nov 15, 2009 7:04pm Nov 15, 2009 7:04pm
  •  SteveHopwood
  • | Commercial Member | Joined Apr 2007 | 8,331 Posts
Quoting tonycashflow
Disliked
I tried finding a trade management ea that could do the following without success:

1 - Close all trades of a given currency when one of the trades hit a certain number of pips in drawdown. For example, if set at 150, when one trade hits that level (most likely the first one entered), all trades in the currency pair are close.

and/or

2 - Close all trades of a given currency when the first trade of the basket has been opened for a certain number of time in minutes or hours


They could be added to the "basket" section of this ea. I don't...
Ignored
Great that you find the EA useful. I don't normally respond to individual requests for added functions unless they have a clear use to the majority of users. This does not appear to have such general use, so i shall take it no further.

 
 
  • Post #327
  • Quote
  • Nov 15, 2009 9:16pm Nov 15, 2009 9:16pm
  •  tonycashflow
  • | Joined Apr 2009 | Status: Member | 31 Posts
Quoting SteveHopwood
Disliked
Great that you find the EA useful. I don't normally respond to individual requests for added functions unless they have a clear use to the majority of users. This does not appear to have such general use, so i shall take it no further.

Ignored
Ok, no problem. However, I have a question. What is your definition of basket of trades? Is it all the open trades of a currency pair?

Also a question about one of the settings. What exactly does "Trade expiry settings" do.

Does it work "trade by trade". In other words, will it close each trade after the given number of minutes or will it close all trades after the given number of minutes. For example, will it close all trades after the basket is opened (the first trade is opened) after, lets say 300 minutes?

I hope its clear

Thanks
 
 
  • Post #328
  • Quote
  • Nov 18, 2009 9:07pm Nov 18, 2009 9:07pm
  •  astral77
  • | Joined Nov 2009 | Status: Member | 1,196 Posts
HI Steve

Hope you are well. Many thanks for sharing your hard work with us. Some time ago you said you had switched brokers to Alpari UK. Are they any good?

I am with forex.com and fxcm.cm which have UK offices hence the US rules do not apply. but for micro lots I have IBFX. Do you have any favourite ones?
 
 
  • Post #329
  • Quote
  • Nov 20, 2009 8:24am Nov 20, 2009 8:24am
  •  toddanderson
  • | Joined Jul 2005 | Status: Member | 511 Posts
Iam testing the basket trading take profit and stoploss
and its not working for me, has anyone tested this on basket trading I just have it set to $20 stoploss. I am testing on fxpro and it is a 5 digit broker
well its not closing at a -$20.00 loss .
Attached Image (click to enlarge)
Click to Enlarge

Name: 20 dollars.gif
Size: 46 KB
Attached File
File Type: zip managebasketPreset.zip   1 KB | 543 downloads
 
 
  • Post #330
  • Quote
  • Nov 20, 2009 5:22pm Nov 20, 2009 5:22pm
  •  SteveHopwood
  • | Commercial Member | Joined Apr 2007 | 8,331 Posts
Quoting astral77
Disliked
HI Steve

Hope you are well. Many thanks for sharing your hard work with us. Some time ago you said you had switched brokers to Alpari UK. Are they any good?

I am with forex.com and fxcm.cm which have UK offices hence the US rules do not apply. but for micro lots I have IBFX. Do you have any favourite ones?
Ignored
Steer clear of them unless you have lots of money. They have 'variable' leverage of 'up to 500:1'. This means they have effective permanent leverage of 500:1. Lethal. No doubt the do have bearable leverage available occasionally - midday Sunday would be my best guess. These characters are crooks.

Guess how I know?

Happily, there wasn't much money involved. Glad I didn't bet the family house on it.

 
 
  • Post #331
  • Quote
  • Edited Nov 21, 2009 7:02am Nov 20, 2009 5:23pm | Edited Nov 21, 2009 7:02am
  •  SteveHopwood
  • | Commercial Member | Joined Apr 2007 | 8,331 Posts
Quoting toddanderson
Disliked
Iam testing the basket trading take profit and stoploss
and its not working for me, has anyone tested this on basket trading I just have it set to $20 stoploss. I am testing on fxpro and it is a 5 digit broker
well its not closing at a -$20.00 loss .
Ignored
Some say it works. Some say it doesn't. I haven't a clue - I don't use it.

 
 
  • Post #332
  • Quote
  • Nov 20, 2009 5:28pm Nov 20, 2009 5:28pm
  •  SteveHopwood
  • | Commercial Member | Joined Apr 2007 | 8,331 Posts
Copying the trailing stop routine over to the scooby-doo robot earlier this week, I noticed a bug that could stop the hidden trailing stop from working properly.

If you use the hidden trailing stop, then you need to download the bug-fixed version.

 
 
  • Post #333
  • Quote
  • Nov 28, 2009 12:44pm Nov 28, 2009 12:44pm
  •  pathumracled
  • | Joined May 2009 | Status: Sucessful Praying FxTrader2Investor | 258 Posts
Can someone please assit in making the Multi-Purpose Trade Management utility, Manage the tradeds on an account by Symbols? If this were done we would be able to have one instance of the EA manage the account regardless of the number of EA used or whether or not the the actual trades are reversed (originate as long but placed as shorts or vice-versa). The level of control it provides would be increased several times over.

It is my prayer that a gifted coder will assit here . I know Steve is busy with Scoobydoo and other projects, so if someone else could for example look at the section of the code that currently manages "this chart only" and expand it to manage "by symbols", with the user giving the desired sybols to be monitored ( say 1-20; GBPUSD, GBPUSDm, etc). I have been trying to help myself but this is a little more than I can manage at the momen. So Please if you are able, won't you help?

For those to whom it may be of help, I have been able to get the M-PTM to operate, in revese for baskets intended to Blow-Down. Here is the code, just replace the existing one in a second copy of M-PTM and replace the code below and see. It works but lock in losses.If it makes no sence to you then it makes none. To those among us to whom it does make sense, will find it immediately useful. Here Goes:


void BasketJumpingStopManipulation()
{
// Has the trail kicked in, and if so has the profit retraced to it
//if (LockedProfit > 1 && BasketProfit <= LockedProfit)
// if (LockedProfit <= 1 && BasketProfit > LockedProfit); Last major changed required to make the thing work
if (LockedProfit < -1 && BasketProfit >= LockedProfit)
{
LockedProfit=-1;
Comment("Reverse Basket jumping stop hit. Closing trades.");
Alert("Reverse Basket jumping stop hit. Closing trades.");
CloseBasketTrades();
return;
}

// Is jumping stop disabled after break even?
//if (LockedProfit > -1 && DisableBasketJumpStopAfterBE)
if (LockedProfit <= 1 && DisableBasketJumpStopAfterBE)
{
ScreenMessage="";
ScreenMessage = StringConcatenate(ScreenMessage, "Reverse Basket Loss = ", BasketProfit, NL);
ScreenMessage = StringConcatenate(ScreenMessage, "Locked Loss = ", LockedProfit, NL);
Comment(ScreenMessage);
}

// Set to breakeven the first time BasketProfit reachespasses BasketJumpingStopProfit
// Add BasketBEP later
if (LockedProfit==-1)
{
//if (BasketProfit >= BasketJumpingStopProfit)
if (BasketProfit < BasketJumpingStopProfit)
{
LockedProfit=0;
string JSmessage = "Basket Reverse jumping stop moved to breakeven ";
if (BasketAddBEP)
{
LockedProfit=LockedProfit + BasketBreakEvenProfit;
//LockedProfit=LockedProfit - BasketBreakEvenProfit;
JSmessage = StringConcatenate(JSmessage, "plus Loss of $",LockedProfit);
}//if (BasketAddBEP)
if (ShowAlerts) Alert(JSmessage);
}//if (BasketProfit >= BasketJumpingStopProfit)
}//if (LockedProfit==-1)

// Does a jumping stop need updating?
//if (BasketProfit >= LockedProfit + (BasketJumpingStopProfit*2))
if (BasketProfit < LockedProfit + (BasketJumpingStopProfit*2))
{
//LockedProfit = LockedProfit + BasketJumpingStopProfit;
LockedProfit = LockedProfit + BasketJumpingStopProfit;
JSmessage= StringConcatenate("Basket trades Reverse jumping stop moved to $", LockedProfit);
Alert(JSmessage);
}
// Got this far, so give the user some feedback
ScreenMessage="";
ScreenMessage = StringConcatenate(ScreenMessage, "Basket Loss = ", BasketProfit, NL);
//if (LockedProfit > -1) ScreenMessage = StringConcatenate(ScreenMessage, "Locked profits = ", LockedProfit, NL);
if (LockedProfit <-1) ScreenMessage = StringConcatenate(ScreenMessage, "Locked Losses = ", LockedProfit, NL);
else ScreenMessage = StringConcatenate(ScreenMessage, "No locked Losses yet", NL);
Comment(ScreenMessage);

}//End void BasketJumpingStopManipulation()


Alternatively, see the attached. Be blssed by where your curiociy leads you.


Bless
Attached File
File Type: zip pathumracled-Negative M-PTM.zip   17 KB | 501 downloads
 
 
  • Post #334
  • Quote
  • Nov 28, 2009 1:02pm Nov 28, 2009 1:02pm
  •  pathumracled
  • | Joined May 2009 | Status: Sucessful Praying FxTrader2Investor | 258 Posts
Sorry mate,
for the earlier glaring omission. I Could not have made the mods without your direction. Thanks again Steve and continue in your generosity.
By extension, to all the members by virtue of coding expertise or use or bug identification, thanks to you all. We would not have this great utility (and its variants), without this great spirit of collaboration.

Bless
 
 
  • Post #335
  • Quote
  • Dec 7, 2009 5:43pm Dec 7, 2009 5:43pm
  •  VonBek
  • | Joined Mar 2009 | Status: Member | 19 Posts
Hi All,

Have been using the EA for a few days and found it to be great, but noticed that on some trades the EA did not activate at all.

So, I updated to the new version from page 1.

Have not tested it on any open trades yet, However I have a Buy limit order set up, the EA keeps trying to change the SL & TP, the old version would not do this untill the trade was active, so I get the following error every couple of minutes:

NZDUSD SL insertion failed with error(4109): trade is not allowed in the expert properties.

and the same error for the TP insertion.

any ideas how to stop this ?

Cheers
VonBek.
 
 
  • Post #336
  • Quote
  • Dec 9, 2009 6:16am Dec 9, 2009 6:16am
  •  Sw4xGro
  • | Joined Mar 2008 | Status: Member | 25 Posts
Hello Steve:

You've done a great job on the expert advisor. It is very, very useful to the manual trader.

Recently, my 5-digit broker for which I have respect for, inquired due to the MT4 server being hit multiply "tick-for-tick' on what was the instantaneous trailing stop use my side, and requested politely that my expert advisors respond in the future per pip (10 piplets on 5-digit), not per tick, as to contain growing burden on MT4 server communications. It's less of an issue on single trade positions, but with three or more open trades I understand the feedback and concern he expressed on this type of 5-digit platform expert advisor use (and 5-digit is the future).

So my queston is -Would it be possible to adapt the EA in either one of two ways, whichever is from coding involves the simplest adjustment;

1. Either make an option on the instantaneous trailing stop loss with a "jumping" stop loss functional variable i.e. stop tightens every X pips (in 5-digit case 1 pip variable would be 10. This would also be a neat feature on your normal trailing stop loss as well. I should point out that the broker could not express similar concern for per-tick trailing stop loss funtionality after breakeven, since the MT4 platform has this capability this anyway. So it's really more specific for the instantaneous trailing stop loss (and yes I do use this on your EA, and yes it can be put to good use!).

2. Or, add the option to make the instantaneous stop loss also with a hidden stop loss variable, so the platform would not actually receive repeated contacts upon stop loss continual adjustment. This option contains the small risk though that on platform closing on the user side that the stop loss will not be stored on the platform.

Let me know what you think.

Thanks,
Ron
 
 
  • Post #337
  • Quote
  • Dec 9, 2009 7:30am Dec 9, 2009 7:30am
  •  SteveHopwood
  • | Commercial Member | Joined Apr 2007 | 8,331 Posts
Did you enquire back, equally politely, asking why the criminal is using 5 digit quotes when his server cannot cope with the results of doing so? I would have done. These bloodsuckers are using 5 digit quotes because it is to their advantage, not ours.

As you have a use for the instant trailing stop, I shall add the functionality to hide it to this feature - sometime this week, so leave it with me.

Nudge me if I forget.

 
 
  • Post #338
  • Quote
  • Dec 9, 2009 8:05am Dec 9, 2009 8:05am
  •  Sw4xGro
  • | Joined Mar 2008 | Status: Member | 25 Posts
Hello Steve:

Besides broker issues..., the trading mechanism I often employ is in itself irrelevant if tick-per-tick or per pip -just as long as a tsl is available, therefore I prefer to deliver or execute EAs per whole pip wherever possible from my side, particularly again those which modify server based changes in TP or SL with high frequency, frequency which for trading results either is nonfunctional or plays no relevant part within. My side and broker side are not too much in conflict here, again "politely" called mutual interests.

A Hidden Instantaneous Trailing Stop Loss feature would fulfill such situations quite well!

I'll check back in due time.

Many thanks,

Ron
 
 
  • Post #339
  • Quote
  • Dec 9, 2009 8:45pm Dec 9, 2009 8:45pm
  •  jack h
  • | Joined Nov 2006 | Status: Member | 48 Posts
Quoting toddanderson
Disliked
Iam testing the basket trading take profit and stoploss
and its not working for me, has anyone tested this on basket trading I just have it set to $20 stoploss. I am testing on fxpro and it is a 5 digit broker
well its not closing at a -$20.00 loss .
Ignored

Hi, I looked at your set file. To manage a basket you must have (the following is from the set file)

"bin2=Set ManageByMagicNumber or
bin3=ManageByTradeComment to true"

Near the beginning of the set file... You do have "ManageByTradeComment = 1" and trade comment is "Fib". Does you basket have trade comment "Fib" ?

If not, do the basket trades have a magic number?


I hope this helps,

Jack
 
 
  • Post #340
  • Quote
  • Dec 10, 2009 9:18am Dec 10, 2009 9:18am
  •  toddanderson
  • | Joined Jul 2005 | Status: Member | 511 Posts
thank you, you are correct
I used the trade by comment to true
I than changed my buysell script to have a comment placed

Thank for your help


Quoting jack h
Disliked
Hi, I looked at your set file. To manage a basket you must have (the following is from the set file)

"bin2=Set ManageByMagicNumber or
bin3=ManageByTradeComment to true"

Near the beginning of the set file... You do have "ManageByTradeComment = 1" and trade comment is "Fib". Does you basket have trade comment "Fib" ?

If not, do the basket trades have a magic number?


I hope this helps,

Jack
Ignored
 
 
  • Commercial Content
  • /
  • Multi-purpose trade management EA
  • Reply to Thread
    • 1 1516Page 171819 41
    • 1 16Page 1718 41
0 traders viewing now
  • More
Top of Page
Forex Factory Blog Updated: Alerting All Members
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2022