Download MetaTrader 5

Help with the MQL4 language

To add comments, please log in or register
Bartlomiej Winter
65
Bartlomiej Winter  

Hello,

Currently I am writing an expert advisor but I am not sure how to code what I want. Essentially I want to measure the difference in the closing price of the latest candle and the opening price of the candle which is five candles back from the latest candle. Then I want to be able to measure the time at which the latest candle occurred and the time at which the candle which is five back from the latest candle occurred. How would I go about doing this? Any help would be greatly appreciated.

 Bart 

Osama Shaban
1589
Osama Shaban  
BartWinter:

Hello,

Currently I am writing an expert advisor but I am not sure how to code what I want. Essentially I want to measure the difference in the closing price of the latest candle and the opening price of the candle which is five candles back from the latest candle. Then I want to be able to measure the time at which the latest candle occurred and the time at which the candle which is five back from the latest candle occurred. How would I go about doing this? Any help would be greatly appreciated.

 Bart 

For easier understanding, Please put a chart and write a little description on the targeted bars.

Your request seems to be easy but not clear.

To add comments, please log in or register