I've created an indicator that put automatically orizontal lines on the mt4 platform in oder to indentify targets. But, if later i draw a separated
trendline and then I change timeframe,the trendline and everythings else I have on the platforms (like comments) goes away... Is there
someone that knows how to solve this problem?
- Trend indicators
- HELP with Proofreading comment
- Multi Timeframe Indicators
You have code that deletes them in deinit/OnDeinit. Change your indicators/EA to only delete what they put on the chart.
William Roeder:
You have code that deletes them in deinit/OnDeinit. Change your indicators/EA to only delete what they put on the chart.
You have code that deletes them in deinit/OnDeinit. Change your indicators/EA to only delete what they put on the chart.
Thank you for your reply but
The onDenit function eliminate specified objects that I've created with codes.
void OnDeinit(const int reason)
{
//---
ObjectDelete(0,"Res1");
ObjectDelete(0,"Res2");
}
Why it eliminates also objects that are not related to the code? like the trendline that i draw later?
Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions
- www.mql5.com
//| Expert initialization function | //| Expert deinitialization function | //| Expert tick function | //| test1 |...
GreenKobra: Why it eliminates also objects that are not related
to the code? like the trendline that i draw later?
That code doesn't.
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