Thanks, this works well. =)
I noticed that when I removed the indicator the pivots and comments were remaining on the chart. I assume putting the following in the deinit function is the way to do this. Is this the 'correct' way to do this? If I have other indicators that have comments on them, this method seems to erase the comments that are on the chart. Is there a better way to clear the comments from this indicator?
Comment("");
ObjectDelete("P_Line");
ObjectDelete("S1_Line");
ObjectDelete("R1_Line");
ObjectDelete("S2_Line");
ObjectDelete("R2_Line");
ObjectDelete("S3_Line");
ObjectDelete("R3_Line");
ObjectDelete("S0.5_Line");
ObjectDelete("R0.5_Line");
ObjectDelete("S1.5_Line");
ObjectDelete("R1.5_Line");
Comment("");
ObjectDelete("P_Line");
ObjectDelete("S1_Line");
ObjectDelete("R1_Line");
ObjectDelete("S2_Line");
ObjectDelete("R2_Line");
ObjectDelete("S3_Line");
ObjectDelete("R3_Line");
ObjectDelete("S0.5_Line");
ObjectDelete("R0.5_Line");
ObjectDelete("S1.5_Line");
ObjectDelete("R1.5_Line");
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
This is my first program in the new syntax, so there is probably room for improvement in the coding.