
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
wow, Perfect.
I Have To Use This Under OnCalculate; Right?
Yes that sounds right
Yes that sounds right
still, not working...
it's keep time value to false.
look :
Yes that sounds right
Note : it's an MT5 indicator.
Note : it's an MT5 indicator.
This line needs to be called every time at the start of OnCalculate - at the moment you are setting it once at the beginning instead of checking the latest time (the print statement should reveal the time is not changing)
Also I cannot see where you use the variable 'time' to control the program logic - at the moment you are just storing true or falseThis line needs to be called every time at the start of OnCalculate - at the moment you are setting it once at the beginning instead of checking the latest time
If you mean, Use That Line Under OnCalculate; Try This Before; But Didnt Work , Look :
If you mean, Use That Line Under OnCalculate; Try This Before; But Didnt Work , Look :
Please share the output of the print statements - a few executions please
Please share the output of the print statements - a few executions please
I tested it in OnCalulate() - works fine for me:
2023.12.06 22:36:16.745 time = true
2023.12.06 22:36:18.277 SecsSinceMidnight = 68777 TimeSinceMidnight = 19:06:17 [start = 09:00:00 end = 23:00:00]
2023.12.06 22:36:18.277 time = true
2023.12.06 22:36:19.642 SecsSinceMidnight = 68778 TimeSinceMidnight = 19:06:18 [start = 09:00:00 end = 23:00:00]
2023.12.06 22:36:19.642 time = true
2023.12.06 22:36:19.787 SecsSinceMidnight = 68778 TimeSinceMidnight = 19:06:18 [start = 09:00:00 end = 23:00:00]
2023.12.06 22:36:19.787 time = true
Changing to 21:00
2023.12.06 22:36:29.492 SecsSinceMidnight = 68788 TimeSinceMidnight = 19:06:28 [start = 21:00:00 end = 23:00:00]
2023.12.06 22:36:29.492 time = false
2023.12.06 22:36:29.605 SecsSinceMidnight = 68788 TimeSinceMidnight = 19:06:28 [start = 21:00:00 end = 23:00:00]
2023.12.06 22:36:29.605 time = false
2023.12.06 22:36:29.667 SecsSinceMidnight = 68788 TimeSinceMidnight = 19:06:28 [start = 21:00:00 end = 23:00:00]
2023.12.06 22:36:29.667 time = false
2023.12.06 22:36:29.732 SecsSinceMidnight = 68788 TimeSinceMidnight = 19:06:28 [start = 21:00:00 end = 23:00:00]
2023.12.06 22:36:29.732 time = false
I tested it in OnCalulate() - works fine for me:
2023.12.06 22:36:16.745 time = true
2023.12.06 22:36:18.277 SecsSinceMidnight = 68777 TimeSinceMidnight = 19:06:17 [start = 09:00:00 end = 23:00:00]
2023.12.06 22:36:18.277 time = true
2023.12.06 22:36:19.642 SecsSinceMidnight = 68778 TimeSinceMidnight = 19:06:18 [start = 09:00:00 end = 23:00:00]
2023.12.06 22:36:19.642 time = true
2023.12.06 22:36:19.787 SecsSinceMidnight = 68778 TimeSinceMidnight = 19:06:18 [start = 09:00:00 end = 23:00:00]
2023.12.06 22:36:19.787 time = true
Changing to 21:00
2023.12.06 22:36:29.492 SecsSinceMidnight = 68788 TimeSinceMidnight = 19:06:28 [start = 21:00:00 end = 23:00:00]
2023.12.06 22:36:29.492 time = false
2023.12.06 22:36:29.605 SecsSinceMidnight = 68788 TimeSinceMidnight = 19:06:28 [start = 21:00:00 end = 23:00:00]
2023.12.06 22:36:29.605 time = false
2023.12.06 22:36:29.667 SecsSinceMidnight = 68788 TimeSinceMidnight = 19:06:28 [start = 21:00:00 end = 23:00:00]
2023.12.06 22:36:29.667 time = false
2023.12.06 22:36:29.732 SecsSinceMidnight = 68788 TimeSinceMidnight = 19:06:28 [start = 21:00:00 end = 23:00:00]
2023.12.06 22:36:29.732 time = false
maybe Im using time recall in a wrong place :
Are you sure you want to stop the indicator?😄
If you want to ignore bars whose times are outside the time range you specify, then you should analyze the times of the bars, not the current time