Developers Help Needed

 

hi, in order to complete my own EA, I need the open,close,high and low prices of last 4 candles.

which function is used to get these different prices(each candle's ) in MQL5? I'm not using any Indicators.. just following candlestick patterns

what will be the code to get the following

1. candle 1(just closed candle) 's HIGH PRICE

2. candle 1 's LOW PRICE 

3. candle 1 's OPEN PRICE 

 4. candle 1 's CLOSE PRICE

AND THE SAME FOR BALANCE 3 Candles 

 

 

 

 

Thanks in advance, 

 
xxx8840: hi, in order to complete my own EA, I need the open,close,high and low prices of last 4 candles. which function is used to get these different prices(each candle's ) in MQL5? I'm not using any Indicators.. just following candlestick patterns

what will be the code to get the following

  1. candle 1(just closed candle) 's HIGH PRICE
  2. candle 1 's LOW PRICE 
  3. candle 1 's OPEN PRICE 
  4. candle 1 's CLOSE PRICE

AND THE SAME FOR BALANCE 3 Candles.

The short answer is found in the documentation here: https://www.mql5.com/en/docs/series

But it is not that simple! You first need to learn the underlying concepts and how MQL5 is structured. In reality, you will have to analyse many a sample code, such as those EAs provided by MetaQuotes or those found in the CodeBase, so that you can understand how to use those concepts in your code and how to code an EA.

You will need to apply yourself and do a lot of research and experimentation! The learning curve can be long!

Documentation on MQL5: Timeseries and Indicators Access
Documentation on MQL5: Timeseries and Indicators Access
  • www.mql5.com
Timeseries and Indicators Access - Reference on algorithmic/automated trading language for MetaTrader 5
 
xxx8840:

hi, in order to complete my own EA, I need the open,close,high and low prices of last 4 candles.

which function is used to get these different prices(each candle's ) in MQL5? I'm not using any Indicators.. just following candlestick patterns

what will be the code to get the following

1. candle 1(just closed candle) 's HIGH PRICE

2. candle 1 's LOW PRICE 

3. candle 1 's OPEN PRICE 

 4. candle 1 's CLOSE PRICE

AND THE SAME FOR BALANCE 3 Candles 


CopyRates().
Reason: