If you switch to a large TF (e.g. MN1) there might not be 100+ Bars of history. It checks and returns instead of crashing. It means nothing more.
Thanks William, but I think you might be answering the wrong question. My question is much more fundamental.
Let me ask in simpler terms:
If I have some logic in my EA that will run after we "have 100 bars", since my chart is an H1 chart, does this mean that
A) my EA has to wait 100 hours to accumulate 100 bars, or
B) can it just fetch 100 bars from history?
I think the answer is B, but i just want to be sure.
Thanks William, but I think you might be answering the wrong question. My question is much more fundamental.
Let me ask in simpler terms:
If I have some logic in my EA that will run after we "have 100 bars", since my chart is an H1 chart, does this mean that
A) my EA has to wait 100 hours to accumulate 100 bars, or
B) can it just fetch 100 bars from history?
I think the answer is B, but i just want to be sure.
B if you had 100 bars history in your history
Got it, thanks!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I see sometimes, EAs will check if there are enough 'Bars' before executing.
eg. only execute if ( Bars < 100 )
My question is: how do you quantify a bar? Is it based on the time interval you set?
For example: if i am running my EA on an H1 chart (that updates every hour), does that mean it will only execute after 100 hours? Then if i am running on an M1 chart, it will execute only after 100 minutes?