Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1544

 
Evgenyi1990:
Hello, I need a counselor. Where can I get a trusted one?

There are a lot of them in the Ministry of Justice. "Counsellor of Justice"

 
Evgenyi1990:
Hello, I need an advisor. Where can I get a trusted one?

Here

Форекс-маркет – Магазин торговых роботов, советников и технических индикаторов для MetaTrader 5
Форекс-маркет – Магазин торговых роботов, советников и технических индикаторов для MetaTrader 5
  • www.mql5.com
Официальная витрина приложений для торговли из терминала
 

What is the difference between regular pairs like GBPUSD and pairs with a letter T like GBPUSD T?

 
more4ok1309:

What is the difference between regular pairs like GBPUSD and pairs with a letter T like GBPUSD T?

Generally the account type is different
 
more4ok1309:

What is the difference between regular pairs like GBPUSD and pairs with a letter T like GBPUSD T.?

Why such big letters?

Can't you see without glasses?

 
MakarFX:
It's not clear what is "OrderMagicNumber()" and what is "stop_loss"

This is the ID of the executed order which closed at the stop and appeared in the history of trades. Using it, the EA should find it and understand that this order has closed at stop (it also identifies the currency pair and the direction of the losing trade) and when the EA places a take order, it should add this stop in pips. Maybe there is something wrong in logic, but everything is OK in compilation. If you need, I can show you the whole code.

 
SGarnov:

This is the ID of the executed order which closed at the stop and appeared in the history of trades. Using it, the Expert Advisor should find it and understand that this order has closed at stop (it also identifies the currency pair and the direction of the losing trade) and when the EA sets a take order, it should add this stop in pips. Maybe there is something wrong in logic, but everything is OK in compilation. If you have the need, I can paste the entire code.

Fill the code, I think the error is here "OrderMagicNumber()".

Or you can try it like this

//+----------------------------------------------------------------------------+
//|  Возвращает пункты убытка последнего закрытого ордера в пунктах            |
//+----------------------------------------------------------------------------+
double GetPointLastLoss()
  {
   datetime t=0;
   double result=0,p=0,tp=0;
   int i=OrdersHistoryTotal();
   for(int pos=0; pos<i; pos++)
     {
      if(OrderSelect(pos, SELECT_BY_POS, MODE_HISTORY))
        {
         if((OrderSymbol()==_Symbol) && (OrderMagicNumber()==Magic))
           {
            if(OrderType()==OP_BUY || OrderType()==OP_SELL)
              {
               if(t<OrderCloseTime())
                 {t=OrderCloseTime(); p=OrderProfit(); tp=OrderType();
                  if(tp==OP_BUY&&p<0)
                    {
                     result=OrderOpenPrice()-OrderClosePrice();
                    } else {result=0;}
                  if(tp==OP_SELL&&p<0)
                    {
                     result=OrderClosePrice()-OrderOpenPrice();
                    } else {result=0;}
                 }
              }
           }
        }
     }
   return(result);
  }
 

Hi all!

For the first time I want to use MT4 for android on a tablet. Who can tell me if it's possible to add "homemade indicators" to the mobile version of

MT4 mobile version is it possible to add "homemade" indicators? And where can I see how to do it?

Thank you!

 
T41:

Hi all!

For the first time I want to use MT4 for android on a tablet. Who can tell me if it's possible to add "homemade indicators" to the mobile version of

MT4 mobile version can I add "homemade" indicators? And where can I see how to do it?

Thank you!

You can't, not anywhere and never.

 
Alexey Viktorov:

No way, nowhere and never.

Thank you!

Sadness of course.....

Reason: