I'm working on my first EA and I need help grabbing the value of RSI(5,3,3). This is what I have so far:
Code:
double RSIMain, RSISignal;
RSIMain = iRSI(NULL,0,5,PRICE_CLOSE,0);
RSISignal = iRSI(NULL,0,3,PRICE_CLOSE,1);
Comment("RSIMain is ",RSIMain,"\n","RSISignal is ",RSISignal);
I just did the Comment thing because I threw this code into a testbed indicator before I put it into my EA.
The F1 help section gives:
Code:
double iRSI( string symbol, int timeframe, int period, int applied_price, int shift)
I've tried changing the applied price enumeration and I've gotten different values but none of them have matched what the indicator attached to a chart gives. I've also tried changing the indicator shift without success, thinking maybe those values are in a different buffer.
I want the same values returned in my EA as shown on a chart with RSI(5,3,3) attached to it. I can't figure out where the %K and %D values are put into the iRSI statement. Obviously I would be doing things with these values besides Comment on a testbed indicator, but I need the correct values first.
Thanks!