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
If I understand you correctly and you want to hide fractals whose bar time does not fall within the range you specify, then you need to analyze the time of the bars (on which the fractals are located), and not the current time
[EDIT]
Apply your algorithm (below) not to TimeCurrent(), but to time[i]
(I did not check the correctness of the algorithm, and in this case it is better to remove the prints, otherwise you will get a million of them)
Bro What I Want is really really simple.
this indicator work all day long and print fractals arrows; I Want to work just from 9am to 11pm instead of all day long.
I think Vladislav has a very good point - perhaps the timing control should come after the exit from Oncalculate()
If it is just a matter of printing, then the timing code should be elsewhere
OK, But This Indicator Print arrow, in OnCalculate(). After That, How We Can Control The Operation Time?
OK, But This Indicator Print arrow, in OnCalculate(). After That, How We Can Control The Operation Time?
I a guessing here, but you could put the timing and print statement at the end of OnCalculate()
The rest of the indicator code can run every time, the print code can be timed
I will be offline now until tomorrow, so I hope that helps for now
At the moment a new fractal appears, print something in the journal if the current time is in the range 09:00-23:00
In the settings, the time of prints is set, not the time of fractals
I just took the standard indicator, then added prints and filtered prints by timeIn the settings, the time of prints is set, not the time of fractals
Yes, the code below can be simplified. This function is several years old, I'm too lazy to change and test it.
In the settings, the time of prints is set, not the time of fractals
I just took the standard indicator, then added prints and filtered prints by timethanks a lot mate.
but this one still print all day long...
Of course, it doesn't. OnStart is only for scripts, not indicators.
Of course, it doesn't. OnStart is only for scripts, not indicators.
Yes, You right.
But I try other codes; no one works.
thanks a lot mate.
but this one still print all day long...
Log file?
It works correctly for me.
I ran it again with the settings 14:00-23:00, all prints are within the specified range:
Log file?
It works correctly for me.
I ran it again with the settings 14:00-23:00, all prints are within the specified range:
I share my screenshot.