if Statement stop's running after first time
I also wrote a switch operator that works fine.
int start() { int BFM; int now = Hour(); switch(now) { case 1:BFM = now ;break; case 2:BFM = now ;break; case 3:BFM = now ;break; case 4:BFM = now ;break; case 5:BFM = now ;break; case 6:BFM = now ;break; case 7:BFM = now ;break; case 8:BFM = now ;break; default: BFM = 8 ;break; } Comment("Bars from Midnight =",BFM); return(0); }
But, i still like to solve the if statement.
PieroNetto:
I also wrote a switch operator that works fine.
But, i still like to solve the if statement.
What do you want to solve/correct?
Or simplify further
int start(){ int BFM = MathMax(8, Hour() ); Comment("Bars from Midnight =",BFM); return(0); }
whroeder1:
Or simplify further
Hi whroeder1!Or simplify further
Finally time again to check up on things, check your code and was following up was it does and i took MathMin(), works like a charme.
Thanks a lot for your Help, looking up to you, thanks again.
Having the feeling getting somewhere with your help, keep up the great work,wish you the best.
Regards Piero
Hi Everyone!
if Statement stop's running after first day, only works one's on the drup on chart.
pls,need the hint here