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
maybe Im using time recall in a wrong place :
That should work, but it is fiddly - you could just exit if time is false
Also OnCalculate has an input array called time
So you should rename your variable to something which does not conflict
PrintFormat("time = %s", string(time)); if (!time) return(rates_total);
Im really really appreciate for what you do for me.
Look, This is my main indicator code and I want it work from 9AM to 23PM; Could You Please Edit this code for me,
Please?
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
No, I just want to print fractals on a specific time.
No, I just want to print fractals on a specific time.
You are trying to change the condition for defining a fractal:
Forum on trading, automated trading systems and testing trading strategies
Set Limit Hours For An Indicator
p4rnak, 2023.12.06 17:23
This code fills the indicator buffers.
If you want to apply a time range to printing to a journal, then apply it to printing to a journal and do not touch the calculation of indicator buffers.
But I still don't understand what you mean by "print fractals on a specific time".
[EDIT]
It looks like you want to be notified of new fractals that will appear within the time range you specify. In this case, you still shouldn't change the code that calculates the buffer values
You are trying to change the condition for defining a fractal:
This code fills the indicator buffers.
If you want to apply a time range to printing to a journal, then apply it to printing to a journal and do not touch the calculation of indicator buffers.
But I still don't understand what you mean by "print fractals on a specific time".
[EDIT]
It looks like you want to be notified of new fractals that will appear within the time range you specify. In this case, you still shouldn't change the code that calculates the buffer values
Got u, But I Try To Use if(time == true); Before The "for" function; but still it didnt work.
OK, Let Me Explain :
This Indicator Print Fractal Arrows after calculating the price; So, I want to start calculating and printing from 9AM (broker time) to 11PM.
I Mean, I want this indicator work just in this time range (9-23).
This code calculates buffers:
Forum on trading, automated trading systems and testing trading strategies
Set Limit Hours For An Indicator
p4rnak, 2023.12.06 18:30
If you want to somehow use information about fractals (printing, for example), then analyze the indicator buffers after they are calculated. That is, after the code above and before "return(rates_total);"
Got u, But I Try To Use if(time == true); Before The "for" function; but still it didnt work.
OK, Let Me Explain :
This Indicator Print Fractal Arrows after calculating the price; So, I want to start calculating and printing from 9AM (broker time) to 11PM.
I Mean, I want this indicator work just in this time range (9-23).
Still don't understand what you are trying to do.
I want to start calculating and printing from 9AM (broker time) to 11PM
Still don't understand what you are trying to do.
yes, that's right sir.
I Want To Show Fractal in an specific time range. (09:00 - 23:00).
This code calculates buffers:
If you want to somehow use information about fractals (printing, for example), then analyze the indicator buffers after they are calculated. That is, after the code above and before "return(rates_total);"
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
yes, that's right sir.
I Want To Show Fractal in an specific time range. (09:00 - 23:00).
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)
Forum on trading, automated trading systems and testing trading strategies
Set Limit Hours For An Indicator
R4tna C, 2023.12.06 18:09