Download MetaTrader 5
To add comments, please log in or register
Publish the program in the Market and sell it to millions of traders!
AYMERIC75
112
AYMERIC75 2014.08.22 10:42 

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

Alain Verleyen
Moderator
28652
Alain Verleyen 2014.08.22 11:02  
Didn't you learn from your previous topic ?
Keith Watford
Moderator
7985
Keith Watford 2014.08.22 11:04  
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
Keith Watford
Moderator
7985
Keith Watford 2014.08.22 11:05  
angevoyageur:
Didn't you learn from your previous topic ?

I thought that this seemed familiar
AYMERIC75
112
AYMERIC75 2014.08.22 11:27  
Yes indeed my bad... thank you anyway :-)
/
To add comments, please log in or register