I have been playing around with MQL for a little bit and want to know the best way of comparing bars.
I currently have a loop that runs through the last 100 bars. Each run goes through several if then statements.
For example:
This is the simplest method of comparing two bars. However is this the best? And how would I compare a range?
Also, how would I go about identifying the midpoint of a bar...
These must seem like such basic questions but cannot seem to find anything that explains this... what is the most helpful resource to answer these. I have searched google and the forum but am not sure most of the time what I am looking for!
I currently have a loop that runs through the last 100 bars. Each run goes through several if then statements.
For example:
Inserted Code
CurrentLow = Low[i] PreviousLow = Low[i+1] If (CurrentLow > Previous Low) Then Bullish Else Bearish
This is the simplest method of comparing two bars. However is this the best? And how would I compare a range?
Also, how would I go about identifying the midpoint of a bar...
Inserted Code
Midpoint = ( (High[i] - Low[i])/2 ) + Low[i]; Or Midpoint = ( (High[i] - Low[i])*0.50 ) + Low[i]
These must seem like such basic questions but cannot seem to find anything that explains this... what is the most helpful resource to answer these. I have searched google and the forum but am not sure most of the time what I am looking for!