Questions from Beginners MQL5 MT5 MetaTrader 5 - page 524

 
Sergey Gritsay:
your code, please
void OnTick()
  {
  if(TimeCurrent()>=D'23:50')close_all();return;
  
  if(NevDay2())
     {
      double PP = iCustom(NULL,0,"PP",0,0);//получаем значение индикатора
      double Op = iOpen(Symbol(),PERIOD_D1,2);//Цена открытия бара
//--------------------------------------------------------------------
      if(MathAbs(PP-Op)>PP_Open*Point) // проверяем условие разницы между РР и Ор
        {
          if(PP<Op) //проверяем какой ордер открывать
           {
           double TP1 = PP+(TP*Point);
           int ticket = OrderSend(Symbol(),OP_SELL,volume,Bid,Slippege,NormalizeDouble(Bid+SL*Point,Digits),TP1);
           }
          else
           {
           double TP1 = PP-(TP*Point);
           int ticket = OrderSend(Symbol(),OP_BUY,volume,Ask,Slippege,NormalizeDouble(Ask-SL*Point,Digits),TP1);
           }
        }
     }
  }

//-----------------

 
toni_stark:

Please insert the code correctly:Insert code correctly in the forum
 
toni_stark:

In this line, remove thereturn statement; With this entry, you will have nothing to do except for the close condition.

if(TimeCurrent()>=D'23:50')close_all();return;
 
Sergey Gritsay:

In this line, remove thereturn statement; With this entry, you will have nothing to do except for the close condition.

I see, thank you!
 
Sergey Gritsay:
Then where did you get this code?
I got these EAs written to order and they don't want to refine them. Can you help me, Sergei?
 
demonoid123000:
I ordered these EAs and they do not want to improve them. Can you help me, Sergei?

I wonder how much you paid for such a code? I'll try to help.

 
demonoid123000:
I got these EAs written to order but they don't want to refine them. Can you help me, Sergei?
Try
Files:
 
Can you tell me how to convert a string of text to a boolean value?
 
-Aleks-:
Can you please tell me how to convert a string of text into a boolean value of bool type?

f What exactly is the string?

 
Sergey Gritsay:

f What exactly is the line?

Let it be string a="true";
Reason: