Download MetaTrader 5

Identify Order

To add comments, please log in or register
dignitas123
35
dignitas123  

Hello,

so my idea is to make an EA that can seperete between what I call "Superorders" and just "Orders".

First, the EA is looking for an entry on a D1 basis and after the criterias are met it places the trade. Now the EA looks for an opportunity on a H1 basis but has to trade in the direction of the Superorder.

Furthermore the EA has to memorize the profit and if a certain profit is reached the normal Orders should be closed partial. 

 

My problem is that I don't know how to seperate Superorders and normal Orders. Maybe with OrderComment? But I've read it is not very reliable... And I don't know how to make a group of orders where OrderTakeProfit() first order + OrderProfit second order etc. is checked.

 

Any thoughts? I for my myself can't figure it out alone..

Keith Watford
Moderator
10369
Keith Watford  
dignitas123:


My problem is that I don't know how to seperate Superorders and normal Orders. 


As there is different criteria for the trades, you could assign different magic numbers
whroeder1
15331
whroeder1  
Use a range of magic numbers
MN_normal = magic_number, MN_super = magic_number +1

See also Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 forum

   magic_number   = Magic_Number_Base + Chart_iTF * 2;
To add comments, please log in or register