This is a crutch instead of synchronisation (on an output when there are no ticks). The idea is like a tank - there is an error - switch to M1 and return.
Mine is worse. (By the way, your case used to work without Slip, it stopped working a few weeks ago.)
Same scheme stopped working without creepy slips on other (not current) charts:
void cChartReInit::Run() // Scanning all charts and reinit if button is pushed
{
for(long i=ChartNext(0);i>0;i=ChartNext(i))
{
if(!ChartGetInteger(i,CHART_WINDOW_IS_VISIBLE)) continue;
long wc = ChartGetInteger(i,CHART_WINDOWS_TOTAL);
long wi = ObjectFind(i, pButtonName);
if(--wc!=wi) { CreateReinitButton(i); ChartRedraw(i); continue;}
if(ObjectGetInteger(i,pButtonName,OBJPROP_STATE))
{
ObjectSetInteger(i,pButtonName,OBJPROP_STATE,false);
ENUM_TIMEFRAMES cp = ChartPeriod(i);
Sleep(1350); // раньше это было не нужноChartSetSymbolPeriod(i, ChartSymbol(i), ((cp==PERIOD_M1) ? PERIOD_M5 : PERIOD_M1));
Sleep(1350); // раньше это было не нужноChartSetSymbolPeriod(i, ChartSymbol(i), cp);
}
ChartRedraw(i);
} // for(Charts)
}
Кнопочная переинициализация чарта с перерасчетом всех индикаторов, а также простенький и прозрачный объектно-ориентированный пример обработки всех чартов из одного эксперта.
You could do it with a timer, but I don't like all that.
// Corrected the link. First through "my codes", now through a common login in kodobaza. // Does it work now? Or do I need to unlogin to get a public link?
I can do it through a timer, but I don't like all this.
I tried to attach OnTimer with ChartRedraw instead of switching to another timeframe - no response, it updates, but the error hangs.
I'll have another look.
Update has a suspicion that all this is related to the threads. Somewhere, they do not match, one hangs with an error, the other ticks by itself. Ras-synchronization, however. And there is no command for full recalculation.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Then a) why does it work for the object b) if you replace it, it starts crumbling
Not all of them, only 18 out of 21 lines...
I'll try to rewrite them all, it's still not clear. It seems to be one type.
Then a) why does it work for the object b) if you replace it, it starts crumbling
Not all of them, only 18 out of 21 lines...
I'll try to rewrite them all, it's still not clear. It seems to be one type.
Yes, I did, thank you, it's ticking ).
Now try it like this:
Now try it like this:
Tried it, I can't get back from M1 automatically. If I enumerate as above
I can return every once in a while, but if I assign _Period at once, I fall to M1 and stay there.
upd does not save even if I moved to the end of the indicator
I don't know why it clogs, I'm trying to figure it out.
This is a crutch instead of synchronisation (on an output when there are no ticks). The idea is like a tank - there is an error - switch to M1 and return.
only from M1 it very much does not always release.Tried it, from M1 I can't go back automatically. If I enumerate as above
I can go back every once in a while, but if I assign _Period at once, I fall to M1 and stay there.
Your case is cured by a small slip.
Mine is worse. (By the way, your case used to work without Slip, it stopped working a few weeks ago.)
Same scheme stopped working without creepy slips on other (not current) charts:
Code from here: https://www.mql5.com/ru/code/224Your case is treated with a small slip.
Mine is worse. (By the way, your case without a Slip used to work, stopped a few weeks ago.)
But the same scheme stopped working without creepy slips on other (not current) charts:
Code from here: https://www.mql5.com/ru/code/224/10323Slip doesn't work in indicators, does it?
Link to 404 page throws
Slip doesn't work in indicators, does it?
It's a 404 page link.
Yeah.
Try some kind of costly loop...
You could do it with a timer, but I don't like all that.
// Corrected the link. First through "my codes", now through a common login in kodobaza. // Does it work now? Or do I need to unlogin to get a public link?
Yeah. :(
Try some kind of costly cycle...
I can do it through a timer, but I don't like all this.
I tried to attach OnTimer with ChartRedraw instead of switching to another timeframe - no response, it updates, but the error hangs.
I'll have another look.
Update has a suspicion that all this is related to the threads. Somewhere, they do not match, one hangs with an error, the other ticks by itself. Ras-synchronization, however. And there is no command for full recalculation.
I've also tried
it doesn't seem to be working at all. Took it in the kodobase though.