Where the hell is the magic number for order send in MT5...how are we going to track manual versus automated trades or trades that need to be tracked if nothing will distinguish the trade returned from the broker?
Does anyone know?
My Russian isn't to good, but MqlTradeRequest contains a field called expert which sounds like it's designed for that purpose.
Where the hell is the magic number for order send in MT5...how are we going to track manual versus automated trades or trades that need to be tracked if nothing will distinguish the trade returned from the broker?
Does anyone know?
struct MqlTradeRequest
{
ENUM_TRADE_REQUEST_ACTIONS action;// Тип выполняемого действия
ulong expert;// Штамп эксперта (идентификатор)
ulong order;// Тикет ордераstring symbol;// Имя торгового инструментаdouble volume;// Запрашиваемый объем сделки в лотахdouble price;// Цена double stoplimit;// Уровень StopLimit ордераdouble sl;// Уровень Stop Loss ордераdouble tp;// Уровень Take Profit ордера
ulong deviation;// Максимально приемлемое отклонение от запрашиваемой цены
ENUM_ORDER_TYPE type;// Тип ордера
ENUM_ORDER_TYPE_FILLING type_filling;// Тип ордера по исполнению
ENUM_ORDER_TYPE_TIME type_time;// Тип ордера по времени действияdatetime expiration;// Срок истечения ордера (для ордеров типа ORDER_TIME_SPECIFIED)string comment;// Комментарий к ордеруchar reserved[128];// Зарезервировано};
Hi stringo, if you're reading this. My MT5 performed a LiveUpdate this morning, but my EA still doesn't get OnTick() fired. I note that the example EAs don't implement OnTick(), and don't trade come to that. Is this stuff working yet? If so is there an example EA anywhere that shows how to use it?
- Is it possible to separate orders of the same pair? To compare orders of the same pair is really a bad update! Why that? What does the "Deviation"-field in the new order window mean?
- What should I do with my MQL4 programs? How to convert them to MQL5?
fai:
My SampleEA's OnTick() has been successfully invoked.
Your example works for me too fai, but adding that code at the start of my own OnTick() produces no comments whatsoever. I'll see if I can work out where the problem lies.
Your example works for me too fai, but adding that code at the start of my own OnTick() produces no comments whatsoever. I'll see if I can work out where the problem lies.
Jim
Herewith the cause of my problem:
int OnInit(){return(0);}int OnTick(){staticint i=0;Comment("i=",i);
i++;return(0);}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I can't save this dialog data. Bug ? or Not implemented yet ?
Where the hell is the magic number for order send in MT5...how are we going to track manual versus automated trades or trades that need to be tracked if nothing will distinguish the trade returned from the broker?
Does anyone know?
My Russian isn't to good, but MqlTradeRequest contains a field called expert which sounds like it's designed for that purpose.
Where the hell is the magic number for order send in MT5...how are we going to track manual versus automated trades or trades that need to be tracked if nothing will distinguish the trade returned from the broker?
Does anyone know?
ulong expert is magic number
What is the command to reverse the direction of an indicator buffer so that it starts with shift = 0 at the latest time?
The attached test indicator places an arrow at shift = 1, but this ends up at the beginning of the series.
ArraySetAsSeries(arr,true);
ulong expert is magic number
Hi stringo, if you're reading this. My MT5 performed a LiveUpdate this morning, but my EA still doesn't get OnTick() fired. I note that the example EAs don't implement OnTick(), and don't trade come to that. Is this stuff working yet? If so is there an example EA anywhere that shows how to use it?
Jim
- Is it possible to separate orders of the same pair? To compare orders of the same pair is really a bad update! Why that? What does the "Deviation"-field in the new order window mean?
- What should I do with my MQL4 programs? How to convert them to MQL5?
Was MT5 really necessary? I think wasted time...
Regards, dektra1
My SampleEA's OnTick() has been successfully invoked.
Your example works for me too fai, but adding that code at the start of my own OnTick() produces no comments whatsoever. I'll see if I can work out where the problem lies.
Jim
Your example works for me too fai, but adding that code at the start of my own OnTick() produces no comments whatsoever. I'll see if I can work out where the problem lies.
Jim
Herewith the cause of my problem:
Compiles without error, but no ticks!
Jim
Sometimes drawing stops even if i don't release mouse and continue dragging. and sometimes first coordinates changes their place
Try to draw a trendline and move cursor fast and move to tools menu, below and above chart window