When writing EAs, how do you quantify a Bar?

 

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?  

 
kasinath: I see sometimes, EAs will check if there are enough 'Bars' before executing. 

eg. only execute if ( Bars < 100 ) 
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.
 
William Roeder:
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. 

 
kasinath:

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
 
Ahmet Metin Yilmaz:
B if you had 100 bars history in your history

Got it, thanks!

Reason: