Can't draw arrow in backtesting ?

Back to topics list  | 1 2 To post a new topic, please log in or register
avatar
736
honest_knave 2015.01.31 12:27 #
 

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);
  }
avatar
23
mideel 2015.02.02 16:02 #
 
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...

Back to topics list   | 1 2  

To add comments, please log in or register