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

 
Порт-моне тв #:

I'll try to add it, I'll let you know.

Or like this

//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
   int ticket;
   double price=StringToDouble(ObjectGetString(0,"Label_1",OBJPROP_TEXT));
   if(Ask<=price)
     {
      ticket = OrderSend(_Symbol,OP_BUY,0.01,Ask,3,0,Ask+300*_Point,NULL,0,0,clrGreen);
      ObjectSetString(0,"Label_1",OBJPROP_TEXT,DoubleToString(DBL_MAX,Digits));
      ObjectSetInteger(0,"Button_1",OBJPROP_STATE,false);
     }
  }
 
Tretyakov Rostyslav #:

Or like this

And if there is a requote or something else and the position does not open, it is clear in the ticket what will be displayed, but the button will be clicked without the position.

 
Vitaly Muzichenko #:

And if there is a requote or something else and the position does not open, the ticket will clearly show that, but the button will be clicked without the position.

Is that what this is about?

 
Tretyakov Rostyslav #:

Is that what we're talking about?

Maybe not, but it's not hard to put 1 additional if() at once :)

P.S. Now he will put it on some centspace with fix-spread, and will write that the code seems to work, but sometimes. And again edits .
 
Vitaly Muzichenko #:

Probably not about that, but putting 1 extra if() at once is not hard :)

I know what you mean, I have all trading functions with check.

Here the person wants to understand the process of memorising price and opening by timer itself.

 
Vitaly Muzichenko #:
Now he's going to bet on some cenomanian
I hope not)
 
Tretyakov Rostyslav #:

I know what you mean, I have all the trading functions going with a check.

Here the person wants to understand the process of price and timer openings memorisation itself.

I meant that you can do it without checking, just check the ticket variable in if(), and if it's there, move on and press the button.

 
Vitaly Muzichenko #:

you can do it without checking, just checking

)))

 
Tretyakov Rostyslav #:

)))

Yeah, pulled out a piece of phrase after all :)

 
Vitaly Muzichenko #:

Yep, pulled a piece of phrase after all :)

For the mood)