Again idiotic language or documentation.
I want to just draw stupid arrow on chart. Took code from example. It just does not draw. No fucking error.

mql language.

Just in case somebody knows:

ObjectCreate(name, OBJ_TEXT, 0, 0, 0, 0, 0);
ObjectSetText(name, name);
ObjectSet(name, OBJPROP_COLOR, Green);
//ObjectSet(name, OBJPROP_TIME1, Time[0]+2*Period()*60);
ObjectSet(name, OBJPROP_TIME1, Time[0]);
ObjectSet(name, OBJPROP_PRICE1, High[0]);

this code is in onTick() method.

It looks like there are tons of posts on how to do it but nothing works what I have tested.

I really from time to time think about writing some trading bot but probably thats why I stop doing it because it takes so much time to do simple things with this language.

I could do with languages which I know - php, js , but still if i want to run it with brokers who have metatrader, I would need to know mql language :(

  • 0
    Later noticed that arrow is drawed at the end of tested time. And turned on visual mode - I see arrow moves. I want arrow to stay where are they drawed, so see when signals started.
  • 0
    Found solution:

    string name = "ble" + TimeCurrent();


    ObjectCreate(name, OBJ_ARROW, 0, Time[0], 104.9); //draw an up arrow
    ObjectSet(name , OBJPROP_STYLE, STYLE_SOLID);
    ObjectSet(name, OBJPROP_COLOR, White);
  • 1
    When the duck is the dev itself. LoL
Add Comment