I have taken a std RSI and coloured it over 75 and under 25 - when I checked it against an ordinary rsi the figures are all different. Here's the code - can anybody tell me why this should produce different figures?
Announcement
Collapse
No announcement yet.
Weird RSI
Collapse
X
-
As seen here the RSIStandard.efs differs from the RSI under the Basic Studies menu. I'm investigating the difference, but you will also see that RSIEnhanced.efs has the same values.
Attached is an EFS that gets the RSI data a bit differently (and a bit more efficiently.) Instead of a Call to RSIStandard.efs, this creates an object called "study" and uses the getValue member to grab the RSI value.
if (study == null) study = new RSIStudy(nInputLength, "Close");
var vValue = study.getValue(RSIStudy.RSI);Attached FilesRegards,
Jay F.
Product Manager
_____________________________________
Have a suggestion to improve our products?
Click Support --> Request a Feature in eSignal 11
Comment
-
RE: Reply to post 'Weird RSI'
Yes I can see there is a difference between enhanced and standard. Thank you
-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: 19 March 2003 17:34
To: [email protected]
Subject: Reply to post 'Weird RSI'
Hello Russell,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment
-
Lack of trigger alerts
I am not getting any trigger alerts from the attached. I think its set so that an ob/os true/false flag sets up when both rsi and stochastic goes over 65 or under 30. Its then released (triggered) when the macd crosses the zero line.
Does anyone have any ideas on this one.
Will attach chart in next commentAttached FilesLast edited by Russell; 03-19-2003, 12:35 PM.
Comment
-
I suspect the "&& !Strategy.isLong()" is the culprit. I suspect that Strategy.isLong() is true because of earlier signals being run through the formula. Are you using the eSignal Back Tester on this study? If not you could rem out all the Strategy. stuff. If you are using the Back Tester then you could do this...
Add the following to global variables section at the top...
PHP Code:var vLoading = true;
PHP Code:if (getBarState() == BARSTATE_ALLBARS) vLoading = false;
if (vLoading == false) {
if (vOverSoldFlag == true && vHist > 0 && !Strategy.isLong()) {
Strategy.doLong("Over Sold", Strategy.MARKET, Strategy.THISBAR);
vOverSoldFlag = false;
Alert.addToList(getSymbol(), "Go Long "+close(), Color.black, Color.green);
Alert.playSound("swoosh.wav");
}
if (vOverBoughtFlag == true && vHist < 0 && !Strategy.isShort()) {
Strategy.doShort("Over Bought", Strategy.MARKET, Strategy.THISBAR);
vOverBoughtFlag = false;
Alert.addToList(getSymbol(), "Go Short "+close(), Color.black, Color.red);
Alert.playSound("train.wav");
}
}
Attached FilesRegards,
Jay F.
Product Manager
_____________________________________
Have a suggestion to improve our products?
Click Support --> Request a Feature in eSignal 11
Comment
-
Looks like I had an error in my logic.
This line...
PHP Code:if (getBarState() == BARSTATE_ALLBARS) vLoading = false;
PHP Code:if (getBarState() != BARSTATE_ALLBARS) vLoading = false;
Attached FilesRegards,
Jay F.
Product Manager
_____________________________________
Have a suggestion to improve our products?
Click Support --> Request a Feature in eSignal 11
Comment
-
RE: Reply to post 'Weird RSI'
I would like to backtest the final version I get to so I will try this - and
thanks
-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: 19 March 2003 20:52
To: [email protected]
Subject: Reply to post 'Weird RSI'
Hello Russell,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment
-
Hi Russell,
I had the same problem months ago with the standardRSI creating different values than a normal RSI - all i did was use the enhancedRSI in all of my .efs studies.
If you create the study in the formula wizard using the RSI calculation there - it should produce the normal RSI figures.
Paul
Comment
-
RE: Reply to post 'Weird RSI'
Thanks - I assumed RSI was standard until Jay pointed it out. Obvious
really!
-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: 20 March 2003 12:19
To: [email protected]
Subject: Reply to post 'Weird RSI'
Hello Russell,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment
-
Russell,
To review for the group, you had mentioned that you believed there were 5 missed triggers. Based on your screenshot, I don't believe this is the case. On the far left of the RSI in the screenshot, there are no RSI values outside the bands at the same time the Stoch is OB or OS in order to set those flags to watch for a MACD cross. I can't tell about the other arrow because the Triggered Alert list is covering it.
My best suggestion is to use the debugPrintLn() function to send values to the EFS Output Window. For instance...
PHP Code:if (vValue > 65 && vSLOW > 65) vOverBoughtFlag = true;
if (vValue < 30 && vSLOW < 30) vOverSoldFlag = true;
// debug code
debugPrintLn("The value of vOverBoughtFlag is " + vOverBoughtFlag);
debugPrintLn("The value of vOverSoldFlag is " + vOverSoldFlag);
~JayRegards,
Jay F.
Product Manager
_____________________________________
Have a suggestion to improve our products?
Click Support --> Request a Feature in eSignal 11
Comment
Comment