iRSI not calculating accurately

 

Here is the code for my iRSI and I have altered the period, RSI period etc and there are no errors with the code but it sets the rsiValue in line 2 as 10 constantly regardless of what the actual in-built RSI is. Any help?


It was working before but I can't find the backup where it worked so I cannot re-compile that one otherwise I would have saved everyone reading this a bunch of time.


 double rsiValue = iRSI(_Symbol, PERIOD_M15, RSIPeriod, PRICE_CLOSE);
    Print("RSI Value: ", rsiValue);
 
The whole EA relies on the RSI retrieving the correct value for the RSI comparison which is annoying 😂😂😂
 
Alexander Sparke:

Here is the code for my iRSI and I have altered the period, RSI period etc and there are no errors with the code but it sets the rsiValue in line 2 as 10 constantly regardless of what the actual in-built RSI is. Any help?


It was working before but I can't find the backup where it worked so I cannot re-compile that one otherwise I would have saved everyone reading this a bunch of time.


Because iRSI returns a handle, use it to access the buffer via CopyBuffer.

Compiler warnings should be investigated.
 
Dominik Egert #:
Because iRSI returns a handle, use it to access the buffer via CopyBuffer.

Compiler warnings should be investigated.


Hi Dominik, there were no warnings anywhere which is why i was so stuck but I found a post on stack overflow w the same query and fixed it. 


Thank you for yoir help