price close

 
I want to add some features in my robot. I just want bar closing code. Is it enough for me to write iclose? how should i define it? can you help me?
 
Kutluhan Yesilkaya :
I want to add some features in my robot. I just want bar closing code. Is it enough for me to write iclose ? how should i define it? can you help me?

If you only need one price - then 'iClose' will suffice. If you need to compare not only the 'Close' price, but for example the 'Open' price, then you need to use the 'CopyRates' function.

Documentation on MQL5: Timeseries and Indicators Access / CopyRates
Documentation on MQL5: Timeseries and Indicators Access / CopyRates
  • www.mql5.com
CopyRates - Timeseries and Indicators Access - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Kutluhan Yesilkaya:
I want to add some features in my robot. I just want bar closing code. Is it enough for me to write iclose? how should i define it? can you help me?

search for  "new bar function"   when a new bar is formed then you know the last bar has closed, there are plenty of examples around