problem with my EA

 

Hi,


  I made an EA wich should display a THUMB_UP for each tick at the following coordinates : Time[0] and Kijun_value. Here it is :

double Tenkan_value = iIchimoku(NULL, 0,9,26,52, MODE_TENKANSEN, 1);
double Kijun_value = iIchimoku(NULL,0,9,26,52, MODE_KIJUNSEN, 1);
double Chinkou_value =iIchimoku(NULL,0,9,26,52, MODE_CHINKOUSPAN, 26);
double senkouA=iIchimoku(NULL,0,9,26,52,3,1);
double senkouB=iIchimoku(NULL,0,9,26,52,4,1);

int count=0;


int OnInit()
  {
//---
   
//---
   return(INIT_SUCCEEDED);
  }

void OnDeinit(const int reason)
  {
//---
   
  }

int start()
{


  ObjectCreate(NULL,"fleche"+(string)count, OBJ_ARROW_THUMB_UP,NULL,Time[0], Kijun_value);
  
  count ++;
     
  return 0;

}


The problem is that the THUMBS are displayed at Time[0] but alwats at the same ordinate, as you can see on the following picture.



Thank you


Aymeric

 
Didn't you learn from your previous topic ?
 
double Tenkan_value = iIchimoku(NULL, 0,9,26,52, MODE_TENKANSEN, 1);
double Kijun_value = iIchimoku(NULL,0,9,26,52, MODE_KIJUNSEN, 1);
double Chinkou_value =iIchimoku(NULL,0,9,26,52, MODE_CHINKOUSPAN, 26);
double senkouA=iIchimoku(NULL,0,9,26,52,3,1);
double senkouB=iIchimoku(NULL,0,9,26,52,4,1);
This should be in start() and you should also be updating only on new bars or you create a new object every tick
 
angevoyageur:
Didn't you learn from your previous topic ?

I thought that this seemed familiar
 
Yes indeed my bad... thank you anyway :-)