Multi Timeframe Indicators - page 479

 
john1368:
Indicator from Post 4922, can someone have a look at this indicator and if possible modify it so it does it will not keep stalling the metatrader platform? At the moment I can only have 4 charts open and the indicator makes the platform extremely slow.

john1368

How many bars do you have on your chart? If you have a large number, try setting max bars on chart to 5000. And in what cases it slows the terminal down (since, judging from the code, it should not do that)?

 

I changed the bars on the chart down to 500, that did help a lot but still having some stalling problems or lag effect if you like,similar to using to much CPU.

 
john1368:
I changed the bars on the chart down to 500, that did help a lot but still having some stalling problems or lag effect if you like,similar to using to much CPU.

john1368

Here is how the CPU usage looks for my terminal with 5000 bars set and using that indicator (and it is one of a 3 charts currently active in my terminal) So, on my terminal it is not causing any outstanding CPU usage. Maybe something else is doing it to your terminal (just guessing now)

Files:
cpu_usage.gif  73 kb
 

I have the indicator on 4 seperate widows on the one chart with 4-5 charts open, so basically there is 32 windows that are open with the same indicator across 2 platforms,a is there anyway to adjust or clean the code without loosing the performance of the indicator so it uses less CPU ? Thanks for your help.

 
john1368:
I have the indicator on 4 seperate widows on the one chart with 4-5 charts open, so basically there is 32 windows that are open with the same indicator across 2 platforms,a is there anyway to adjust or clean the code without loosing the performance of the indicator so it uses less CPU ? Thanks for your help.

John1368, the cleaned version is here https://www.mql5.com/en/forum/173574/page329

 
Marco320:
Dear Mr Tools,

Thx for your help sofar. Is it possible to get arrows in the main chart together with the dot signals in the separate window for the indicator? It would be very helpful. Which candles do you use in your chart, seems cooperative with the indicator. Can you inform me where to downlo

Thx a lot. Marco

Candles are from here https://www.mql5.com/en/forum/173058/page19

 

Thanks Mr Tools, the settings are different from the GWT+arrows+alerts compared to the one from post 4922 which is the one I am using,so if you are able to cleanup the one from 4922 that would be awesome, that is the one giving me problems.

 
john1368:
Thanks Mr Tools, the settings are different from the GWT+arrows+alerts compared to the one from post 4922 which is the one I am using,so if you are able to cleanup the one from 4922 that would be awesome, that is the one giving me problems.

john

I think that if you have any indicator loaded 32 time it will give you problems. Also, I think that I told already : it is a "normally" coded indicator (it does not recalculate all the bars all the time, like some indicators do, but calculates only the changed bars) so there is no room for optimizing it

 

I tried only 3 charts open with one platform and still having problems,specifically with Crude Oil and Indices, not so much with FX symbols,this was not occuring before,when I try to load the template if freezes and I have to shut it down and restart everytime.

 
john1368:
I tried only 3 charts open with one platform and still having problems,specifically with Crude Oil and Indices, not so much with FX symbols,this was not occuring before,when I try to load the template if freezes and I have to shut it down and restart everytime.

What indicators do you have in template?

I did test that indicator in question and posted the result of the CPU usage and that indicator does not seem to be causing any problem. Here is a version that uses even less CPU than the previous (less loops, and also one possible repaint issue resolved) but even like that 99.99% of the time it calculates only 3 last bars when not in multi time frame mode which can not cause any CPU overload (this versions average is about 1% of CPU time when ticks are coming in fast - tested it on indices too and no problem at all when working with them either)

Reason: