Beta Testing of MetaTrader 5 Has Started! - page 7

 

I can't save this dialog data. Bug ? or Not implemented yet ?

 
ErgoRaid:

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.


 
ErgoRaid wrote >>

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];    // Зарезервировано
  };

ulong expert is magic number

 
phampton wrote >>

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);

 
stringo:

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

 
//+------------------------------------------------------------------+
//|                                                    sampleEA7.mq5 |
//+------------------------------------------------------------------+

void OnTick()
  {
   static int i=0;
   Comment("i=",i);
   i++;
  }
//+------------------------------------------------------------------+
My SampleEA's OnTick() has been successfully invoked.
 

- 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

 
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.


Jim

 
soulsurfer:

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()
{
   static int i=0;
   Comment("i=",i);
   i++;

   return(0);
}

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

Reason: