I'm trying to use the CiRSI class from Oscilators.mqh, everything seems fine with the exception that when I try to get the value for the buffer using the Main() function it always returns EMPTY_VALUE.
Here's a code snippet for a test Script.
#include <Indicators/Oscilators.mqh>
voidOnStart() {
CiRSI rsi;
rsi.Create(_Symbol, PERIOD_CURRENT,14, PRICE_CLOSE);
double rsi_value = rsi.Main(
0 ); //I have tried to use other indexes
Alert("RSI Value: " + (rsi_value == EMPTY_VALUE ? "EMPTY VALUE" : (string) rsi_value));
}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Hello Community,
I'm trying to use the CiRSI class from Oscilators.mqh, everything seems fine with the exception that when I try to get the value for the buffer using the Main() function it always returns EMPTY_VALUE.
Here's a code snippet for a test Script.
Any Idea why this might be happening?
Thank you for your,
Jusi