You are not using some of the commands correctly. For instance, i is not a time. You should have:
ObjectSet("Text",OBJPROP_TIME,Time[i]);
Also, it's good practice to convert integers to text:
ObjectSetString(0,"Text",OBJPROP_TEXT,IntegerToString(SwingCount));

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 wrote a custom indicator that finds the swing highs and lows.
Currently it puts an arrow object point to the price level and the time bar. Green for High and Red for Low.
I would like to change it to text that shows a count variable.
Here is a portion of the code I created but it isnt showing the text.
Can someone show me what is wrong. Thanx.