Help: https://www.mql5.com/en/docs/series/copybuffer
//+------------------------------------------------------------------+ //| CopyBuffer | //| https://www.mql5.com/en/docs/series/copybuffer | //|int CopyBuffer( | //| int indicator_handle, // indicator handle | //| int buffer_num, // indicator buffer number | //| int start_pos, // start position | //| int count, // amount to copy | //| double buffer[] // target array to copy | //|); | //+------------------------------------------------------------------+ double rsi[]; ArraySetAsSeries(rsi,true); int buffer_num = 0; // indicator buffer number int start_pos = 0; // start position int count = 3; // amount to copy if(CopyBuffer(indicator_handle,buffer_num,start_pos,count,rsi)!=count) return; Print(DoubleToString(rsi[0],2));
![Documentation on MQL5: Timeseries and Indicators Access / CopyBuffer Documentation on MQL5: Timeseries and Indicators Access / CopyBuffer](https://c.mql5.com/36/30/documentation-on-mql5-timeseries.png)
Documentation on MQL5: Timeseries and Indicators Access / CopyBuffer
- www.mql5.com
Counting of elements of copied data (indicator buffer with the index buffer_num) from the starting position is performed from the present to the past, i.e., starting position of 0 means the current bar (indicator value for the current bar). When copying the yet unknown amount of data, it is recommended to use a dynamic array as a buffer[]...
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
"CopyBuffer(rsiDefinition,0,0,3,rsiArray);" are giving me the price of the current symbol. I want this 58.31 for the signal of less then 30 and more than 70. thanks in advance.