switch does not work?

To add comments, please log in or register
pascalboy
238
pascalboy  
at the below program.
case zero does not work and Alert("ITERATION................0")  does not realize.
but case 1 occurs continuously.
why does not case zero does not work ?


//VELOCITY//

////////////////////////////////////////////
////////--- VELOCITY_ASAGI>VELOCITY_YUKARI (EN AZ UC KEZ)
////////    YON_ASAGI=1,YON YUKARI=0
////////    SAT

////////--- VELOCITY_YUKARI>VELOCITY_ASAGI (EN AZ UC KEZ)
////////    YON YUKARI=1,YON_ASAGI=0
////////    AL       
////////

extern double  VELOCITY_ASAGI,VELOCITY_YUKARI;
extern bool    YON_ASAGI,YON_YUKARI;
extern double price1,price2;
double time1,time2;
int n=0;
double fiyat_farki;
double zaman_farki;

int start()
{
Print("zaaaaaman","  ",GetTickCount());  


switch(n)


{
case 0:
Alert("ITERATION................0");
price1=100000*(Bid);
time1=GetTickCount();
Print("price1","  ",price1);
Print("time1","   ",time1);
n++;
break;


case 1:
Alert("ITERATION................1");
price2=100000*(Bid);
time2=GetTickCount();
Print("price2","  ",price2);
Print("time2","   ",time2);
fiyat_farki=price2-price1;
zaman_farki=time2-time1;
Print("fiyat farkı","  ",1000*fiyat_farki);
Print ("zaman farki","  ",1000*zaman_farki);
Print("HIZ","  ",fiyat_farki*1000/zaman_farki);

n=0;
break;

default:Print("aksi hal");
break;


}
return;
}
Simon Gniadkowski
17610
Simon Gniadkowski  
pascalboy:

at the below program.

case zero does not work and Alert("ITERATION................0") does not realize.

but case 1 occurs continuously.

Case zero does work . . . see for yourself.

2013.07.23 18:26:27 pascalboy1 GBPUSD,H1: Alert: ITERATION................1

2013.07.23 18:26:27 pascalboy1 GBPUSD,H1: zaaaaaman -371987799

2013.07.23 18:26:23 pascalboy1 GBPUSD,H1: time1 -371991621

2013.07.23 18:26:23 pascalboy1 GBPUSD,H1: price1 153740

2013.07.23 18:26:23 pascalboy1 GBPUSD,H1: Alert: ITERATION................0

2013.07.23 18:26:23 pascalboy1 GBPUSD,H1: zaaaaaman -371991621

2013.07.23 18:26:17 pascalboy1 GBPUSD,H1: HIZ -6.9841

2013.07.23 18:26:17 pascalboy1 GBPUSD,H1: zaman farki 1575000

2013.07.23 18:26:17 pascalboy1 GBPUSD,H1: fiyat farki -11000

2013.07.23 18:26:17 pascalboy1 GBPUSD,H1: time2 -371998158

2013.07.23 18:26:17 pascalboy1 GBPUSD,H1: price2 153732

2013.07.23 18:26:17 pascalboy1 GBPUSD,H1: Alert: ITERATION................1

2013.07.23 18:26:17 pascalboy1 GBPUSD,H1: zaaaaaman -371998158

2013.07.23 18:26:15 pascalboy1 GBPUSD,H1: time1 -371999733

2013.07.23 18:26:15 pascalboy1 GBPUSD,H1: price1 153743

2013.07.23 18:26:15 pascalboy1 GBPUSD,H1: Alert: ITERATION................0

2013.07.23 18:26:15 pascalboy1 GBPUSD,H1: zaaaaaman -371999765

2013.07.23 18:26:05 pascalboy1 GBPUSD,H1 inputs: VELOCITY_ASAGI=0; VELOCITY_YUKARI=0; YON_ASAGI=false; YON_YUKARI=false; price1=0; price2=0;

2013.07.23 18:26:04 pascalboy1 GBPUSD,H1: loaded successfully


To add comments, please log in or register