Hi guys.
I am currently struggling with a little problem and I hoping someone can help please.
I am currently coding a very simple indicator which returns an arrow on an MA cross.
But I would now like to include a time filter to the indicator.
I would like for the indicator to only be active during two periods during the day:
Period 1 = 8:00 - 11:00
Period 2 = 13:00 - 16:00
So I am trying to define these two time ranges/periods of time and save them into an array and use them as part of my indicator signal logic, but unfortunately, I don't have the solution.
Can you please help?
I think the problems are my StartHour1/LastHour1/StartHour2/LastHour2 integers and:
I am also using TimeHour(iTime(NULL,0,i)) within a for loop to return the hour of a candle. But this is not working.
The current code is below. Any help would be appreciated.
Figured it out, thanks anyway...
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi guys.
I am currently struggling with a little problem and I hoping someone can help please.
I am currently coding a very simple indicator which returns an arrow on an MA cross.
But I would now like to include a time filter to the indicator.
I would like for the indicator to only be active during two periods during the day:
Period 1 = 8:00 - 11:00
Period 2 = 13:00 - 16:00
So I am trying to define these two time ranges/periods of time and save them into an array and use them as part of my indicator signal logic, but unfortunately, I don't have the solution.
Can you please help?
I think the problems are my StartHour1/LastHour1/StartHour2/LastHour2 integers and:
I am also using TimeHour(iTime(NULL,0,i)) within a for loop to return the hour of a candle. But this is not working.
The current code is below. Any help would be appreciated.