need help how to count events

 

can someone help me how to count event. for example:

if(Delta >=100) cnt_b=1;

i dont know whats next... how can i count event like this? 

i try like this..  for(cnt=0; cnt >=cnt_b; cnt++) but not work..

 
What are you trying to do with the Count ?
 
ubzen:
What are you trying to do with the Count ?


im trying to count event.. is it possible? 

if(Delta >=100) is one count... and then so on.. 

 
05121981: im trying to count event.. is it possible? 
Yes. Vague question = vague response.
 

Who knows what Delta is ???  no mindreaders 

I checked your other topic and the program there to find out if i could find something

now i know what delta is for you 

extern int shift1 = 10;                           // initial level
extern int shift2 = 80;
extern int shift3 = 200;  




Start()
  {
  string symb = Symbol();
  double val1=MathAbs(iClose(symb,PERIOD_M1,shift1));
  double val2=MathAbs(iClose(symb,PERIOD_M1,shift2));
  double val3=MathAbs(iClose(symb,PERIOD_M1,shift3));
  double Level=MathAbs((val1+val2+val3)/3);
  int Delta = NormalizeDouble((Bid-Level)/Point,0);

but still don't know what you try to do with that count 

 
05121981:

can someone help me how to count event. for example:

if(Delta >=100) cnt_b=1;

i dont know whats next... how can i count event like this? 

i try like this..  for(cnt=0; cnt >=cnt_b; cnt++) but not work..


You mean like this ?

if(Delta >=100) cnt_b++;
 
int cnt_b;
int init(){ cnt_b = 0; }
int start(){
  if(Delta >= 100) cnt_b++;
 
WHRoeder:


thanks raptor & roeder, its working..

im trying to make a condition that if i reach to that count i will close an order & open another one..

thanks guys it help a lot.. 

 
WHRoeder:


hello guys,, can you check my ea... i want to put a line where the level is so that i can see where it is.. can anyone tell me how can i make it.. please check attached ea.. thanks
 
05121981:

hello guys,, can you check my ea... i want to put a line where the level is so that i can see where it is.. can anyone tell me how can i make it.. please check attached ea.. thanks

You need to read and implement what is talked about in these threads:

What are Function return values ? How do I use them ?

Loops and Closing or Deleting Orders  you must count down when Closing or Deleting orders.

 
RaptorUK:

You need to read and implement what is talked about in these threads:

What are Function return values ? How do I use them ?

Loops and Closing or Deleting Orders  you must count down when Closing or Deleting orders.


 thanks raptor.. im thinking of it for the fast days why they are closing like that...  anyway can you help me how can i make a line where the level is.. thanks again..
Reason: