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

 
EVGENII SHELIPOV #:

Honestly, it's not clear
What can this expression change
if(flag_close==1)ClosseAll();
If you can explain

When a close condition occurs

//-------------------------------------------------------------------+  Команда на закрытие сетки ордеров
   if((CountTrade(0) > 1 && CalculiteProfit() >= 0 && OrderGroupCloseSignal()==0)||(CountTrade(1) > 1 && CalculiteProfit() >= 0 && OrderGroupCloseSignal()==1))
     {
      flag_close=1;
     }

flag_close gets a value of 1

and ClosseAll(); will be executed repeatedly until flag_close gets a value of 0

and flag_close will get 0 when all the orders are closed

   if(CountTrade() == 0)
     {
      flag_close=0;

and will be 0 until a close signal appears

 
Andrey Sokolov #:

Personal correspondence is recommended in private messages.

This is no longer private, it is a discussion of code
 
Tretyakov Rostyslav #:
It's no longer personal, it's a discussion of code

that he sent you and discuss between you what you did to him

 
Andrey Sokolov #:

that he sent you, and discuss between you what you did to him.

I posted the part of the code we're discussing...for all to see and discuss

 
Andrey Sokolov #:

ozymandias_lite.mq5

Looked at the indicator... it doesn't draw the same way


 
EVGENII SHELIPOV #:


It is also possible to send closing requests until the orders close. But it is important that no new orders appear during this. I don't know if your broker's server will close orders on the second, third, etc...?

 
Tretyakov Rostyslav #:

When a closing condition occurs, flag_close is set to

flag_close is set to 1

and ClosseAll(); will be executed repeatedly until flag_close gets a value of 0

and flag_close will get 0 when all the orders are closed

and will be 0 before there is a signal to close

Thank you, I will try it

 
Mihail Matkovskij #:

It is also possible to send closing requests until the orders close. But it is important that no new orders appear during this. I do not know if your broker's server will close orders from the second, third, etc...?

Or until the broker bans it. That's speaking of your experts.


 
Andrey Sokolov #:

Or until the broker gets banned. Speaking of your experts.

What?! What does this have to do with my robots? Or did you trade with them and get scolded? Tell me which robot you traded on and where you got scolded. We'll fix it!

Even if I did, there's no such behavior. I advised Eugene, as an option (because he does not want to ask his broker what's going on). You see, it is an abnormal situation. And the solution is abnormal too.

By the way, your friend also advises to do the same

Любые вопросы новичков по MQL4 и MQL5, помощь и обсуждение по алгоритмам и кодам
Любые вопросы новичков по MQL4 и MQL5, помощь и обсуждение по алгоритмам и кодам
  • 2022.01.06
  • www.mql5.com
В этой ветке я хочу начать свою помощь тем, кто действительно хочет разобраться и научиться программированию на новом MQL4 и желает легко перейти н...
 
Andrey Sokolov #:

Or until the broker bans you. Speaking of your experts.

Listen, Andrey Sokolov, you are no help at this forum thread == 0, but you put your 5 cents in. Maybe you shouldn't annoy people??????

Reason: