MT4 Offline chart not updating Custom Indicator

 

Hi community, I'm using one of my custom indicators on an offline chart but I have to constantly re-select it and hit "ok" to get the most recent signals. Is that just the nature of using an offline chart or is there a solution to make the indicator work "properly." I am currently on Build 625, thanks.

 
Jaquanburton:
Hi community, I'm using one of my custom indicators on an offline chart but I have to constantly re-select it and hit "ok" to get the most recent signals. Is that just the nature of using an offline chart or is there a solution to make the indicator work "properly." I am currently on Build 625, thanks.

Jaquanburton

The problem can be caused by three things :
- your indicator has a problem (but then it would have a problem on the regular charts too - check that out)

- the offline chart generating code does not sent appropriate messages to offline chart to update data, in which case every indicator on that offline chart should work the same way as your indicator

- metatrader had a bug : when it reached the maximum number of bars on chart in the offline history it started to behave weirdly. Did not check that in the new build, but if it is working with offline charts the same ways as older builds, then you have to increase the maximum number of bars on chart to avoid that problem

 

Ok I my indicator works normal on normal charts, every other indicator is functioning normally. How do I increase the maximum number of bars on chart in the offline history?

 
Jaquanburton:
Ok I my indicator works normal on normal charts, every other indicator is functioning normally. How do I increase the maximum number of bars on chart in the offline history?

Go to tools->options and change it in the charts tab (like on the picture)

Be advised that increasing the number of bars to big number can slow down your metatrader

Files:
max_bars.gif  19 kb
 
mladen:
Go to tools->options and change it in the charts tab (like on the picture)

Be advised that increasing the number of bars to big number can slow down your metatrader

Ok thanks mladen. If I was to ever reach 250000 is there a way to delete previous bars?

 
Jaquanburton:
Ok thanks mladen. If I was to ever reach 250000 is there a way to delete previous bars?

No "normal" way (one way would be to limit the offline data generating to some number of bars, but that is not such a simple task as it looks at the first sight. The other would be to delete the data in the history center, but you might end up with it regenerated on the next start of the terminal - so you would have to do that all over every time you restart the terminal)

 
mladen:
No "normal" way (one way would be to limit the offline data generating to some number of bars, but that is not such a simple task as it looks at the first sight. The other would be to delete the data in the history center, but you might end up with it regenerated on the next start of the terminal - so you would have to do that all over every time you restart the terminal)

Ok, that makes sense. Uh, I have a decompiled version of the indicator I'm having trouble with using on the offline charts. Could you take a look at it or would the post just get deleted. Online the only available version of this indicator is .exe which doesn't wont work.

 
Jaquanburton:
Ok, that makes sense. Uh, I have a decompiled version of the indicator I'm having trouble with using on the offline charts. Could you take a look at it or would the post just get deleted. Online the only available version of this indicator is .exe which doesn't wont work.

:):)

Jaquanburton

As a rule of thumb I do not alter decompiled code. If it is not a proprietary indicator, if you can, post the ex4 file so that some more people can test what is the exact problem with it

 
mladen:
:):):)

Jaquanburton

As a rule of thumb I do not alter decompiled code. If it is not a proprietary indicator, if you can, post the ex4 file so that some more people can test what is the exact problem with it

Oh, ok that makes sense. And yeah the attached indicator is below. The orange and blue bars don't update when attached to an offline chart. It should be noted that I'm using the periodcon indicator to make the offline charts.

Files:
 
Jaquanburton:
Oh, ok that makes sense. And yeah the attached indicator is below. The orange and blue bars don't update when attached to an offline chart. It should be noted that I'm using the periodcon indicator to make the offline charts.

Jaquanburton

As far as I see that is a zero lag macd and it is working correctly (I tested it on some of the offline charts I have and all worked OK - values were updated with no problems).

PS: I am using build 628

 

PS: what I have is a period converter that is compiled with build 628 (this one : p4l_periodcon_1.02.ex4 ( and it work OK on my terminal

Files: