ObjectCreate(Current_Chart_ID,Name,OBJ_VLINE,0,CurrentTime,Price);
.
Cheers! I've fixed and works great!
string Name = IntegerToString(i); : ObjectCreate(Current_Chart_ID,Name,OBJ_VLINE,CurrentTime,Price);
- Do not use a bar index in a obtect name. The moment a new bar forms you're going to try to create another object with the same name. Use the bar's time, which is unique.
- After the first tick, you're going to try to create the same object again. How to do your lookbacks correctly.
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
Hi I'm new to Mql4 and I have problems with ObjectCreate() function.
I want to create script that gonna show me some events on the chart via drawing vertical lines. I came up with that
But this doesn't draw any line.
So how can I have line on every bar that has been met the criteria in the if operator ?