if you want to test between 23h and 24h
if (Hour()>=23){ //... }
Kenneth Njuguna: What could be wrong with this code? The code within will not execute.
- It executes just fine. It does exactly what you said to do. Don't blame the code or MTx, blame yourself.
if(Hour() > 23 && Hour() < 24)
If Hour is 23 or less first condition is false. Hour will never be 24, second condition is always true. If statement is never true. #1if(Minute()>1 && Minute()<29 && pipe_red==true) { pipe_red=false; } if(Minute() > 31 && Minute()< 59 && pipe_red==false) { what is missing? }
Second if has no result.- What about when Minute equals zero, one, twenty nine (29,) thirty (30,) or fifty nine (59)?
- Simplify your code
pipe_red = Minute() <= 30;
paul selvan:
if you want to test between 23h and 24h
Much appreciated Paul Selvan.
whroeder1:
- It executes just fine. It does exactly what you said to do. Don't blame the code or MTx, blame yourself.
- If Hour is 23 or less first condition is false. Hour will never be 24, second condition is always true. If statement is never true. #1
- Second if has no result.
- What about when Minute equals zero, one, twenty nine (29,) thirty (30,) or fifty nine (59)?
- Simplify your code
What looks like missing bits is actually code to print out certain variables that i need to track at the close of business. The Print() function never gets executed. Will simplify the code as you suggested >=30 , leave it overnight and see if the print command is ran. Thanks much appreciated.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi Folks.
What could be wrong with this code?
The code within will not execute.
Thanks yo'all for reponses.