This procedure will profit objectives CloseTrades_After_Account_Profit_Reached.mq4 Please help revise the net capital, whichever is, for example, my profit target is set to 300, based on net capital growth to the target on all of the positions to unwind, I would like to thank
This is a useful tool. I opened this EA on a random chart and it works to close out all open trades.
Any possibility of having a "close all trades after account loss" function, as well as a "trailing equity stop"?
Say your overall equity is going in the right direction, and you only want to close everything out if your equity starts rolling back too far.
I guess this would be easy to code, but my knowledge of MQ4 is non-existant.
Try this...I've modified a program to modify All orders with a StopLoss after the set profit number is reached. I haven't had time to test if hedging to see if it closes BOTH Buys and Sells. The NFA ban on Stop Loss may make this a moot point unless we make it a hidden Stop loss. Test it before relying on it with REAL money...and let me know if I need to fix something....BillR
UPDATE...it does work fine with real money...haven't tested if both buy and sell are present...AND I only trade one pair at a time....BillR
Last edited by BillR; 05-07-2009 at 14:28.
Thanks for your EA, but it doesn't seem to work (well, for me anyhow).
It gives me a happy face to let me know that it should be working, but I'm getting no output on the screen as to what the settings are, like the "close on profit bot", and it's not stoplossing trades when profit target is reached either.
I guess something is amiss.
Of course, I'm running this on a demo account, and will be for a while before I can bash out a decent robot-trading system with the various bots available. Having something to close out some equity on the way up seems like a necessary piece of the puzzle to reign in all the wayward trades and establish some sanity. Robots and drawdown do not mix.
I'm on FXDD Demo and Real...it worked fine for me on both...Did you put it in /Experts?? It doesn't have the on screen text on the upper left..but it does bring an Alert window up when it sets the ModifyOrder stop loss. You need to set the Stop loss at more than 15. BillR
I redid it with "Info" text in upper left hand corner and default "StopLoss" is now 15. Give it a try and see if this works for you. BillR
Correct file this time...
Tried it again, but no dice. It's not setting the stop loss at all.
Mind you, I'm testing this on an Alpari demo account. I'm not sure if the 5 digit display is giving me trouble or not. Will try on another broker demo account.
Might also want to call the EA, "Equity Manager" or something. The name is getting a bit wordy and out of hand!
Try adding an extra "0" to the "Trailing stop" for 5 digit accounts....ie. 150 instead of 15......
It's worked fine a few times today on my 4 digit accounts...What a waste the 5th digit BS is....Just to make the brokers larger spread...
I'm trying to have it also delete ALL Pending (LIMIT orders) when it reaches the profit point and modifys the StopLoss (trailing Stop). But I can't get it to work...anyone have any ideas??? This should be easy...
Last edited by BillR; 05-08-2009 at 01:00.
close all trades after account loss
Originally Posted by Neo-Rio
That seems to do the job too.
I wonder if it's too much to ask to combine both the take profit, and cutoff loss, as well as add a trailing equity profit stop feature all into the one EA?
Then I could open up a chart I'd NEVER trade on, (like XAUUSD!) to control the action.
I'm currently having fun putting the lesser rated, but trading more often EAs into a "demo-account death match", and trying to control the action through equity.
I'm not sure what the best strategy is for closing all trades, (between direct shutdown or adding stoplosses) but shutting them off, rather than adjusting their stoploss, at least gets around the 5-digits issue. Although manually shutting them all down happens sequentially rather than in parallel, so maybe stoploss is the way to go though... hrm.
Tags for this Thread