I need more information about the parameters for the sMACDSignal indicator.
And how would I fill in the "other" remaining parameter if I was using this indicator in conjunction with
CODE:So which period parameter above is for the Signal line itself?
IndicatorBase sMacdSignal = new sMACDSignal(TimeSeries source, int shorterSma, int longerSma);
And how would I fill in the "other" remaining parameter if I was using this indicator in conjunction with
CODE:For anyone interested, I'm implementing the MACD/SMA 3-10 Oscillator trading strategy discussed in https://www.youtube.com/watch?v=uxNQDwjREuc It's based on Price action only, so it should be simple to implement and one can augment it with other indicators for better performance.
IndicatorBase sMacd = new sMACD(bars.Close,3,10);
Rename
This is an indicator from TASC magazine. The two parameters are fast and slow moving average periods. The signal line period is a hard-coded 9 but if you’d like access to it we can expose it as a new parameter. More info here:
https://wealth-lab.com/Discussion/MACD-crossing-below-the-zero-line-8826
https://wealth-lab.com/Discussion/MACD-crossing-below-the-zero-line-8826
QUOTE:
The signal line period is a hard-coded 9 but if you’d like access to it we can expose it as a new parameter.
Ahh. That explains why the sMACDSignal example returns
CODE:because the 9 Signal period is missing altogether.
IndicatorBase indicator = new sMACDSignal(bars.Close,12,26);
You must have watched the YouTube video because it requires a 16 for the Signal parameter, so a hardcoded 9 won't work. Yes, if you could add the third Signal parameter as optional, that would be great.
Until then, if I wanted to use the sMACD indicator to create a sMACDSignal line with a Signal parameter of 16, how would I do it?
btw, this is where it came from:
http://www2.wealth-lab.com/WL5WIKI/sMACD.ashx
http://www2.wealth-lab.com/WL5WIKI/TASCNov2013.ashx
http://www2.wealth-lab.com/WL5WIKI/sMACD.ashx
http://www2.wealth-lab.com/WL5WIKI/TASCNov2013.ashx
Plug it into an EMA of the period of your choice.
Well, I need an SMA, not an EMA, according to the video. But you're saying the code below is correct?
CODE:
public override void Initialize(BarHistory bars) { sMacd = new sMACD(bars.Close,3,10); PlotIndicator(sMacd, WLColor.Purple); sMacdSignal = new SMA(sMacd, 16); PlotIndicator(sMacdSignal, WLColor.Green, paneTag: sMacd.PaneTag); }
Yes looks good to me.
The enhanced sMACDSignal(....) indicator with the optional Signal period at the end (third period parameter) works great. Thanks for including it. Below are the parameters discussed in the MACD/SMA 3-10 Oscillator YouTube link of the main post above.
CODE:
IndicatorBase sMacdSignal = new sMACDSignal(bars.Close, 3, 10, 16);
Your Response
Post
Edit Post
Login is required