Managing manual orders with EA Wizard trail stop
I have an ATR stop loss indicator that outputs price levels to put trailing stops at.
I want to use EA Wizard to make a trailing stop EA for manual entries.
Is this the right idea? Should the magic number be 0 or 12345?
OrderPosition (12345) is long
Move SL to:
Price: Custom ATR indi output
Again, to clarify, is it possible to trail stop with an EA for orders that *I enter myself*? I have EAs that can do it, but they are old and outdated and I did not code them myself. Does EA Wizard have this capability?
Or break even, partial profit, set SL etc… Order management of manual entries.
unfortunately, EA Wizard cannot do this right now. It is because EA Wizard uses Magic Number to recognize the trade, and manual orders usually have Magic Number = 0.
So the functions for checking profit,changing SL or closing a position that use Magic Number parameter won’t work for you. Some might work if you’ll use MagicNumber=0, but not all of them.
We might address this in the new version 4, but EA Wizard was never intended to work with manual orders.
Cheers for the input. I will test magic number 0 this week on a few orders (I will monitor the trades visually myself) and see if it helps.
I understand this was an unusual request.
I have test it in TF M1,with magic number =0 and it works fine .
thanks you so much.
It will be wonderfull if you might address this in the new version 4. differents magic number for manual orders .
@ krikriI have had success with it. I think it works, but needs more testing, particularly with multiple orders open on the same pair, and closing orders partially.
with multiple orders open I think we need differents magic numbers .
Not sure, I had an old EA (someone programmed it) that controlled manual orders using 0 as the magic number. You could open any amount of orders and it still adjusted their stop losses all simultaneously. Also if you closed an order partially (essentially making it a new order) it still worked.
I don’t think manual entries have magic numbers. 0 fills in as a place holder for “none’. This is more technical than my knowledge though. Marc would know best.
It may work, needs more testing. Unfortunately I haven’t been testing it too much. Also US bank holiday today. Tomorrow/this week I will test it definitely.
It definitely works for single entries. I just used it. I have yet to test multiple entries though.
I made 2 massive amendments on it.
The first “bufferpipz” was 20 and Converttorealpips thought that meant 20 pips. It was changed to 2. Converttorealpips apparently doesn’t accept decimal (double) variables such as 2.5 pips.
The second one is bigger and little more complex. I made it so that if you are long, it will never move your SL lower and if you are short it will never move your SL higher.
If you use initially tight stop losses when you entire, this prevents the EA from making your SL wider or if you are manually trailing a tight SL it will prevent the same widening problem. So that was fixed.
Here is it updated.
I thought at this problem for initial stop loss and I have not found how to do .
Thanks for your improvement .
very usefull for my scalping or manage multiple orders .
how can we put an initial stop loss , i e , we place a buy , and before the close of the candle , current price cross down the atr trail stop ,when the candle close then there is no stop loss.
excuse me for language I ‘m French !!!!
That can be done but there is bigger issue with the EA and it likely the indicator. I have noticed several times when switching time frames or currency pairs that the stop loss when short would be moved to a number like 999.99 or if long to like 000.32.
As you noticed the indicator only shows up either below the market or above the market depending on the trend. I need to think of a way so that the EA never makes the SL wider. Even if that added rule’s logic it still has not prevented the widening of the SL.
Possibly the indicator is the problem. Not sure. I had a EA using this indicator that someone custom made but now it is old and outdated because of MT4 updates. It worked perfectly. It still needs alot of work.
I actually have to call upon Marc’s assistance since I’m drawing a blank. Trying to work out a forumla so that the EA never moves the stop loss further way. The forum I added should have prevented that but it appears sometimes the SL gets moved wildly wide (0.0002 or 999.8 for example). I know this is indicator related.
If you get a chance, take a look @ the code. See if you have any suggestions.
@Kris, this is the same upload. Don’t download. Its for Marc.
Viewing 14 posts - 1 through 14 (of 14 total)