Any ideas why my custom indicators are blank when I start the terminal in the morning? - page 3
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 suspect the problem to be related to how CIndicator handles missing data from its buffer. refer to the source code on Indicator.mqh for the next statements. the Refresh function does not return any value, and ignores the value returned by its buffer. when the buffer refreshes, it runs CopyBuffer. when the returned value is < 0, CIndicator does nothing with that information. supposing that is the failure, I cannot see how that would lead to the indicator deleting the data that already populated the custom indicator buffer, and not thrown any exception/error. I expected for previous buffer content to remain, thus leaving the indicator simply not updating, but still shown on screen.
That sounds an awful lot like the end product of iMA() or iCustom() (Commented out in my code template, above).
Theoretically, your fix should work.
@MetaQuotes, @MetaQuotes Support, when calling a CIndicator object's Refresh function, it is recorded the error CUSTOM_WRONG_PROPERTY(4603) (information retrieved inspecting _LastError value's). after that, the indicator lines vanish, leaving only the indicator's empty separate window.
is that expected?
@MetaQuotes, @MetaQuotes Support, when calling a CIndicator object's Refresh function, it is recorded the error CUSTOM_WRONG_PROPERTY(4603) (information retrieved inspecting _LastError value's). after that, the indicator lines vanish, leaving only the indicator's empty separate window.
is that expected?
That sounds an awful lot like the end product of iMA() or iCustom() (Commented out in my code template, above).
Theoretically, your fix should work.
Correction: For more granular control/testing of CIndicator, the result of GetData should be checked.
Admittedly, this reduces the "simplicity" of using CIndicator.
Please post the full code to reproduce it.
https://www.mql5.com/en/forum/469734/page2#comment_59275814
This code doesn't compile.
this one does
this one does
Your code is buggy. You don't use the class CiMA correctly. Where is the Refresh() ?
Also your indexing is incorrect.
Take a look at this article for example : https://www.mql5.com/en/articles/19341
Your code is buggy. You don't use the class CiMA correctly. Where is the Refresh() ?
Also your indexing is incorrect.
Take a look at this article for example : https://www.mql5.com/en/articles/19341
that was provided separately, on a next message. the complete indicator, with the refreshing:
regardless, that omission would not cause the problem reported. with or without refreshing the indicators, the reported problem persists.
unfortunately, it is an intermittent problem. I could not find a method to deliberately trigger the failure witnessed. the indicator must be left running.
that was provided separately, on a next message.
Yeah, in your Post #20 to be precise.
Forum on trading, automated trading systems and testing trading strategies
Any ideas why my custom indicators are blank when I start the terminal in the morning?
KeyserSoze42, 2026.02.28 01:45
the fragment above does not work as intended. I replaced it by
upon restarting that indicator, the error CUSTOM_WRONG_PROPERTY(4603) briefly appeared, but I could not identify where exactly (before of after indicator refresh, which one?). and now, it does not appear anymore. however, the indicator remained drawn.Forum on trading, automated trading systems and testing trading strategies
Any ideas why my custom indicators are blank when I start the terminal in the morning?
Ryan L Johnson, 2026.02.28 14:18
Correction: For more granular control/testing of CIndicator, the result of GetData should be checked.
Admittedly, this reduces the "simplicity" of using CIndicator.