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
Your code assumes that there will always be an object named "Line0".
If there isn't the code will not be executed.
Also anytime the object is not found the loop will exit. So if there is not an object named "Line4", "Line5" etc will not be deleted.
You would be better off to use
Your code assumes that there will always be an object named "Line0".
If there isn't the code will not be executed.
Also anytime the object is not found the loop will exit. So if there is not an object named "Line4", "Line5" etc will not be deleted.
You would be better off to use
thank you this is the easiest way and worked.
but still is worked only when indicator close from H1 time frame and if indicator close from another one the object still remain.
I do not understand why this is happand.but still is worked only when indicator close from H1 time frame and if indicator close from another one the object still remain.
It should make no difference what the chart time-frame is when the indicator is deleted.
If the objects are not being removed then they are not named beginning with "Line"
May I know your findings around ChartID?
Thank you for Advice. I read that Articles, But i Said it again. I try my code with ChartID, 0 and Symbol() and nothing different between them. all of the method worked perfectly when i use it in the OnInit or OnCalculate. But When i use in OnDeinit nothing happens and the Object Only remove when i Close my Indicator from H1 Time frame.
It should make no difference what the chart time-frame is when the indicator is deleted.
If the objects are not being removed then they are not named beginning with "Line"
I know it But not work. one of the attachment image is part of my code create the objects and other for the time i close indicator from D1 time frame. As you can see the Object remain have Line in the name
I know it But not work. one of the attachment image is part of my code create the objects and other for the time i close indicator from D1 time frame. As you can see the Object remain have Line in the name
Please show the full OnDeinit function that you are currently using. Don't forget to use the code button when pasting code.
Don't edit or change the OnDeinit function, post it exactly as you are using.
Please show the full OnDeinit function that you are currently using. Don't forget to use the code button when pasting code.
Don't edit or change the OnDeinit function, post it exactly as you are using.