Download MetaTrader 5

Can't draw arrow in backtesting ? - page 2

To add comments, please log in or register
honest_knave
Moderator
2403
honest_knave  

There seems to be a problem using ChartID() rather than 0.

Crude code to prove the concept:

 

#property strict

int OnInit()
  {
   return(INIT_SUCCEEDED);
  }

void OnDeinit(const int reason)
  {
  }

void OnTick()
  {
   if(ObjectFind("Test")>=0) { ObjectDelete("Test"); }
   if(!ObjectCreate(0,"Test",OBJ_ARROW_DOWN,0,Time[1],High[1])) { Print(GetLastError()); }
   ObjectSet("Test",OBJPROP_STYLE,STYLE_SOLID);
   ObjectSet("Test",OBJPROP_ARROWCODE,SYMBOL_ARROWUP);
   ObjectSet("Test",OBJPROP_COLOR,Blue);
  }
Mideel
74
Mideel  
honest_knave:

There seems to be a problem using ChartID() rather than 0.

Crude code to prove the concept:

 

This one works finally....


Thanks mate...

12
To add comments, please log in or register