MT4 - Stop Management for specific order.

 

Hi,

I have a question. Is it possible to run an EA or something else that is only following a specific order or a group of orders so that it can for example change the stops?

I've heard that it is easier using MT5 (true?) but unfortunately my broker doesn't support it yet.


My idea is the following: I'm entering a trade manually and when I'm leaving I want to set automatic stops (not trailing stops). The rules for my stops are easy to program but I don't know the way of managing just one or two trades automatically.


Thanks in advance!

 
An EA can do what you describe . . . you just need to code it correctly.
 

Yes I know. I could probably simply add the EA to the chart give it a Magic number and the order ID to fulfill my needs but what can I do if I have like three orders is EUR/USD and I want to apply three different stop rules for them?

Or, in the morning I have an order where an EA controlls my stops and in the afternoon I want to add a second order with a different stop?


cheers

 
TJmclovin:

Yes I know. I could probably simply add the EA to the chart give it a Magic number and the order ID to fulfill my needs but what can I do if I have like three orders is EUR/USD and I want to apply three different stop rules for them?

Or, in the morning I have an order where an EA controlls my stops and in the afternoon I want to add a second order with a different stop?

If you make up your rules as you go then no EA can read your mind . . . if you have no consistent approach how can you expect consistency of performance. An EA can apply set rules to an Order or many Orders . . . it can only do what you tell it.

Before you can consider any kind of automation you need to analyse your method and document it . . .

 

No thats not what I meant. I have three specific rules for my stops - depending on the entries I chose (manually).

Now, let's assume I entered three different trades in EUR/USD one for an assumed long term trend, one for mid -or short term and one for scalping. What I want to do know is to activate a program that will set the stops automatically according to the stop system I specified for the specific order.

Like right-click on order 1 and chose "Use stop technique A" (I know that's not possible)..

 
TJmclovin:

No thats not what I meant. I have three specific rules for my stops - depending on the entries I chose (manually).

Now, let's assume I entered three different trades in EUR/USD one for an assumed long term trend, one for mid -or short term and one for scalping. What I want to do know is to activate a program that will set the stops automatically according to the stop system I specified for the specific order.

Like right-click on order 1 and chose "Use stop technique A" (I know that's not possible)..

OK, I see . . . it can be done. You need some way of telling the EA how to manage a particular Order, and then for the EA to remember in such a way as it keeps track of that information even if MT4 is restarted.

For example you could use Text Objects that list each of your Orders by Ticket number and also lists your three order management types, to assign an order management type to a particular ticket . . move the order management type text on screen a little then move the ticket number text that you want to manage . . . the EA will be able to know that the text has moved and will then manage the order in accordance with the type of management selected.

 
RaptorUK:

OK, I see . . . it can be done. You need some way of telling the EA how to manage a particular Order, and then for the EA to remember in such a way as it keeps track of that information even if MT4 is restarted.

For example you could use Text Objects that list each of your Orders by Ticket number and also lists your three order management types, to assign an order management type to a particular ticket . . move the order management type text on screen a little then move the ticket number text that you want to manage . . . the EA will be able to know that the text has moved and will then manage the order in accordance with the type of management selected.


Thanks again! It's not a very good way I guess but as MQL4 isn't capable of doing this in a more elegant way I'll give it a try!
 
TJmclovin:

No thats not what I meant. I have three specific rules for my stops - depending on the entries I chose (manually).

Don't open the trades manually. Write 3 scripts for the 3 classes that will open the trade with a unique magic number and manage that trade.

When you want to open drag the script to the chart.

 
WHRoeder:

Don't open the trades manually. Write 3 scripts for the 3 classes that will open the trade with a unique magic number and manage that trade.

When you want to open drag the script to the chart.


Brilliant! Cheers!


Edit: Wait..aren't scripts supposed to be executed just once? How can a script "manage" a trade by changing stops? Or did you mean that my EA will look for the magic numbers and than manage the trades?

 
TJmclovin:

Sorry for double post

You can simply delete your double post.
 
RaptorUK:
You can simply delete your double post.

Did that. However, it would be nice if you, WHRoeder, could clearify your suggested approach. Thx again.
Reason: