Your code has two problems.
1. Your parameter "2009/11/04" should be the window number for the line to be drawn in, e.g. 0.
2. The format for the datetime constant "2009/11/04" is wrong. It should be D'2009.11.04 15:00'.
Also, the 5th parameter is unused.
All this can be found in the "Dictionary" tab in the editor.
// int counted_bars=IndicatorCounted();
datetime When = D'2009.11.04 1:00';
int Unused = 0;
// ObjectCreate(LineName, OBJ_VLINE, "2009/11/04","15:00", Bid);
ObjectCreate(LineName, OBJ_VLINE, 0, D'2009.11.04 1:00', Unused );
ObjectSet(LineName, OBJPROP_STYLE, LineStyle);
ObjectSet(LineName, OBJPROP_COLOR, LineColor);
I have no experience in coding and I have this indi, but would not work on new MT4. Is there anyone who has the new indi or could help fix it?
Thanks in advance.
To add comments, please log in or register