Has anyone coded an adjustable RSI with an adjustable Moving average of the RSI that can be used as a condition in a Rule Based Strategy?
Size:
Color:
Size:
Color:
By adjustable I mean to adjust the periods…which WLP has (for RSI and SMA).
When I try to build a rule based strategy using general indicators “indicator crosses indicator” with the statement RSI Series (Close,14) crosses over SMA Series (Close,9) it appears that it is applying the EMA to the chart and not the RSI.
As you know the input is from a menu not manual. I’m guessing there needs to be a menu option that states “SMA Series (RSI(Close,14),9)”…or something like that. Having the same for MACD would be nice as well.
Of course it is highly probable that it is a case operator error.
Thanks, Rick
Size:
Color:
QUOTE:
RSI Series (Close,14) crosses over SMA Series (Close,9) it appears that it is applying the EMA to the chart and not the RSI.
As you know,the rule makes no sense. You can create a general crossover rule with two RSIs, but you'd have to unlock the code and edit it to get “SMA Series (RSI(Close,14),9)”.
Although this particular rule
could be created for the Strategy Builder, generally creating a rule with that uses "indicator of another indicator" is one of it's limitations.
MACD-specific rules are included in a separate group.
Size:
Color:
"As you know,the rule makes no sense". (???)
Using the Total Market ETF-VTI it has given one false signal year to date. That is: When the Wilder’s RSI-14 crosses its 9 day moving average.
... In conjunction with the MACD 8-17 crossing its 9 day moving average as confirmation.
Size:
Color:
I've renamed the topic. Previous title ("Adjustable RSI with an adjustable Moving average of the RSI") was too confusing and did not reflect what the actual question is.
Size:
Color:
Attached image shows what I’m talking about. I misspoke…it had two false signals and 5 positive signals.
Size:
Color:
QUOTE:
"As you know,the rule makes no sense". (???)
It was in reference to what I had quoted, which was RSI(Close) crossing SMA(Close), i.e., not the SMA of the RSI.
By the looks of the image, it seems you've got a good handle on things. What you can do now it to "push" those indicators into the Editor (rightmost Chart Toolbar button) where you can access the series, albeit with some manipulation. Let's go through the exercise.
First, here's the plot code after you push it into the Editor -
CODE:
Please log in to see this code.
The bad news is that Wealth-Lab doesn't make it straightforward to access those series and use the in the strategy. So, the first thing to do is to create simple references to the DataSeries, like the following. Notice that you need the references above the for loop, where the trading signals will go. (I also did a search and replace to add a space behind each comma.)
CODE:
Please log in to see this code.
These two snippets are equivalent. Now adding the buy and sell rules are simple:
CODE:
Please log in to see this code.
Size:
Color:
Wow!! Thank you very much. The results don’t look so good in the long run...shows what I know.
Wonder if you can take into account the slope of the SMA’s? Like flat to slopping up as confirmation?
Thank you very much Cone, I’ll study the post and help files to start learning the coding process.
Rick
Size:
Color: