Hi Chief
The usual problem with indicators is that the range over which they operate is not setup correctly. In your case it looks like it is operating only on the recent 8 bars so check if one of your inputs is 8 like an MA period that will back up what I am saying then you can look at the limits on the loops to see which varialbe is not being set high enough.
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
I am encountering a continual problem with redisplaying custom indicators when the timeframe changes or the MT4 platform is loaded after being shut down. The custom indicators will load but the lines and objects will not be redisplayed properly, even though the indicators work just fine the rest of the time. By switching timeframes back and forth, or calling up the indicator properties window and clicking ok, the indicator display will straighten out.
I have programmed numerous indicators and have encountered this problem continually, so I have come to the conclusion that it is a problem in the way MT4 handles the init() function on a change of timeframe, or reload after a rest. I have attached to screenshots to show the problem and what it looks like after.
ScreenShot #1 - indicator is displaying only the most recent bars.
Screenshot #2 - The indicator displaying all the bars properly after reloading with the Indicator Properties box.
I know MT4 indicators don't have this problem, so there must be a way to handle it. If anyone knows how, I would be very grateful.
Thank You
Chief1Oar