Errors, bugs, questions - page 1523

 

ChartApplyTemplate

Note

If a new template is loaded from the EA to the chart to which it is attached through this function, the EA will be unloaded and will not be able to continue.

It is the same with indicators ???

 
Sergey Gritsay:

Here is one possible implementation. this EA should open an order after a specified number of bars. And learn how to insert the EA code correctly, the SRC button on the message bar.

111

Thank you very much. It's working.
 
Ilya Malev:

So tighten it up already, or fix the certificate. Indulging not indulging is not a serious conversation. What programmers expect from you is not "coddling", but clear, well-documented software.


Document what? "Brothers, relax and take it easy, deinitialize as you like. The developers allowed it."

But when you close the terminal, the terminal will trigger strict conditions, which have already been specifically mentioned in documentation. And the next time you open the terminal, you may not have opened charts, because they have not been stored in time.

Of course, this code has no purpose other than a demonstration, which you have asked for. And it's quite harmless, a no-brainer if you remove Sleep and replace Comment with Print. There is no protection against spamming gigabytes of Print into the log in either Quartet or Quartet 5.

What's that got to do with it?

Try for the sake of your interest to flood the log in an infinite loop and see at what rate it will grow and how after 64 meg will cut duplicate entries and how will truncate the beginning of the log. You're overreacting with your assertion about the lack of protection. We'd have had all the drives on the hosting sites clogged long ago.

 

Good afternoon. I have faced this bug in MT5:

     if(ObjectFind(0,"twofiFiboUp" + TimeToString(dday_stop))==-1) 
           {
            ObjectCreate(0,"twofiFiboUp" + TimeToString(dday_stop),OBJ_FIBO,0,dday_stop,ddayL,day_stop,ddayH);
            ObjectSetInteger(0,"twofiFiboUp" + TimeToString(dday_stop),OBJPROP_COLOR,fibo_color_up);
            ObjectSetInteger(0,"twofiFiboUp" + TimeToString(dday_stop),OBJPROP_LEVELCOLOR,fibo_color_up);
            ObjectSetInteger(0,"twofiFiboUp" + TimeToString(dday_stop),OBJPROP_STYLE,fibo_style);
            ObjectSetInteger(0,"twofiFiboUp" + TimeToString(dday_stop),OBJPROP_SELECTABLE,false);  
           } 

I set the colour of Fibonacci levels, and when I look at the object properties, the colour I set is shown there, but all the levels are yellow on the chart...

How do I know what to do?

 
Nikita Solodko:

Good afternoon. I have faced this bug in MT5:

I set the colour of Fibonacci levels, and when I look at the object properties, the colour I set is shown there, but all the levels are yellow on the chart...

How do I know what to do?

See examples from documentationhttps://www.mql5.com/ru/docs/constants/objectconstants/enum_object/obj_fibo
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы объектов / Типы объектов / OBJ_FIBO
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы объектов / Типы объектов / OBJ_FIBO
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы объектов / Типы объектов / OBJ_FIBO - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Nikita Solodko:

Good afternoon. I have faced this bug in MT5:

I set the colour of Fibonacci levels, and when I look at the object properties, the colour I set is shown there, but all the levels are yellow on the chart...

Please, advise what to do?

Change the code.

First: the entry

if(ObjectFind(0,"twofiFiboUp")==-1) 

it is better to change it to

if(ObjectFind(0,"twofiFiboUp")<0) 

Second: look exactly what you are doing - if an object with this name is not found ONLY then you change its colours. This condition will only work once on a clean chart. If there is already an object with the name you want on the chart, you will not be able to change its properties, because you simply will not get inside the condition:

            ObjectCreate(0,"twofiFiboUp",OBJ_FIBO,0,dday_stop,ddayL,day_stop,ddayH);
            ObjectSetInteger(0,"twofiFiboUp",OBJPROP_COLOR,fibo_color_up);
            ObjectSetInteger(0,"twofiFiboUp",OBJPROP_LEVELCOLOR,fibo_color_up);
            ObjectSetInteger(0,"twofiFiboUp",OBJPROP_STYLE,fibo_style);
            ObjectSetInteger(0,"twofiFiboUp",OBJPROP_SELECTABLE,false); 
 
Sergey Gritsay:
Look at the examples in the documentationhttps://www.mql5.com/ru/docs/constants/objectconstants/enum_object/obj_fibo
Thank you. It helped.
 
Slawa:

But when you close the terminal, the conditions that have already been specifically stated in the documentation will be strictly enforced. And the next time you open the terminal, you may not see any open charts because they were not remembered in the allotted time.

Is it back again? I've suffered from this nastiness before!
 
-Aleks-:
Have they brought it back again? I've suffered through this nastiness before!

Who said it was back? We didn't. And we're not going to yet.

I said we wouldn't change anything in the documentation about it.

This was originally about a looping indicator. Which is categorically not recommended. Even as an illustration.

 
Slawa:

Who said they did? We didn't. And we're not going to yet.

I said we wouldn't change anything in the documentation about it.

It was originally about a looping indicator. Which is categorically not recommended. Even as an illustration.

Ugh, so this bug isn't back - you can close the terminal in peace and be sure all the charts are saved.


Such a question, I want to open not a job through freelancing, but to give a bonus to a programmer, is it not punishable?

Reason: