Errors, bugs, questions - page 2533
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
In your case, organise a while() loop rather than a for() loop.
Check for some sign of end of blinking.
But about "blinking with variable frequency" - something strange... I don't see any errors on the fly, it should be flashing quite frequently.
Admittedly, I doubt it's wise to create and delete graphic objects instead of making them invisible. But, it seems you can't make an object invisible... So that leaves only deleting.
Thanks for the reply, it works now. But the blinking is just as chaotic, recorded how it happens. And I replaced the removal with changing the LABEL colour to black.
Thanks for the reply, it's working now. But the blinking is the same chaotic, recorded how it happens. And I replaced the deletion with changing the LABEL colour to black.
You can see it depends on the tick. This code should be done in OnTimer(), not in OnTick().
And you don't have to color it black - objects have a visibility property(OBJPROP_TIMEFRAMES) - you just need to manage its visibility.
The values for the timeframes, at which the object must be visible, are set by a set of flags. In your case, you need to set 0(OBJ_NO_PERIODS) - the object is not visible anywhere, and OBJ_ALL_PERIODS - visible everywhere. And don't forget to update chart with ChartRedraw() after the property value has changed.
Thanks for the reply, it's working now. But the blinking is the same chaotic, recorded how it happens. And I replaced the deletion by changing the LABEL colour to black.
I don't think you have much to lose yet, try using my script code, it works, it's shorter
it's in the script folder!
I don't think you have much to lose yet, try using my script code, it works, it's shorter
It's in the srift folder!
Igor, I understand it's written in MQL5 and I have Metatrader 4 unfortunately.
Igor, I understand it's written in MQL5, and I have Metatrader 4 unfortunately.
this is MQL4... could have tried it already ))))
Oh, man, that's right.) Thanks a lot, Igor! Sorry for the impudence, but is it possible to use an indicator instead of a script? I've copied the guts of the indicator template and it is OK when I switch TFs. I have copied it to the indicator template, it compiles well but when I paste it on the chart, the terminal hangs up.
Thank you very much! )
For site administrators:
I couldn't find where, I'm writing here.
I need to change the details of the seller in the profile.
how to do this ?
I wrote a message a long time ago in the seller's area, but there is no answer.
maybe there is another way ?