ObjectCreate(name, OBJ_VLINE, 0, 5, 0);
What time do you want the line drawn at?
Five bars behind.
In future please post in the correct section
I will move this topic to the MQL4 and Metatrader 4 section.
whoowl:
Five bars behind.
Five bars behind.
You need to enter a time not the number of bars.
Keith Watford:
Sorry, I don't understand that criterion. My question is not about any Metatrader 4 feature, it's about an indicator I am writing myself.
In future please post in the correct section
I will move this topic to the MQL4 and Metatrader 4 section.
whoowl:
Sorry, I don't understand that criterion. My question is not about any Metatrader 4 feature, it's about an indicator I am writing myself.
Sorry, I don't understand that criterion. My question is not about any Metatrader 4 feature, it's about an indicator I am writing myself.
You are writing an indicator for MT4 using MQL4, so it belongs in the MQL4 and Metatrader 4 section.

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 have a few functions inside void OnTick() {} that run on every tick and draw/update data on the chart. All of them work except this one:
What is wrong with it?
TIA