[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 271
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Well, that's it then:
Well actually only removed the algorithms for selecting and determining the right item.
Didn't you miss that after the first recalculation (on the first tick after loading the indicator), the next one will happen when the 1st candle is 8 o'clock?
That's what I need. Once a day at 8 o'clock it draws. But when I put an indicator, did something there, closed MT with an indicator, the next day I open, when 8 o'clock bar has already passed, the indicator still remains on the old 8 o'clock bar, until I reload it or change period. Although it has to find the one that has passed, as I told it to do in the loop. It needs this condition so that it draws a new one when the indy is open to the 8 o'clock bar.
After the line:
{//Тут y будет не корректным, когда запускаешь МТ с уже повешенным индюком
Add
Run the test in visualisation mode (i.e. you can test some empty EA and throw the indicator onto the chart with your hands) and show what the log shows.Why. When I run MT, the code is executed once. It locates the bar in the history and draws from it.
It is understandable.
You are saying that the indicator does not re-run. And it "re-executes" when the 1st bar is at eight o'clock.
This is the situation that needs to be modelled.
Although y should be 13 by now. Why is it stuck in time?
2011.10.18 21:01:17 ResistDay EURUSD,H1: y=12
Although y should be 13 by now. Why is it stuck in time?
and it is supposed to be 13? No missing bars?