- ago
I need more information about the parameters for the sMACDSignal indicator.

CODE:
IndicatorBase sMacdSignal = new sMACDSignal(TimeSeries source, int shorterSma, int longerSma);
So which period parameter above is for the Signal line itself?

And how would I fill in the "other" remaining parameter if I was using this indicator in conjunction with
CODE:
IndicatorBase sMacd = new sMACD(bars.Close,3,10);
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.
0
183
Solved
7 Replies

Reply

Bookmark

Sort
Glitch8
 ( 11.39% )
- ago
#1
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
0
Best Answer
- ago
#2
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:
IndicatorBase indicator = new sMACDSignal(bars.Close,12,26);
because the 9 Signal period is missing altogether.

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?
0
- ago
#3
btw, this is where it came from:

http://www2.wealth-lab.com/WL5WIKI/sMACD.ashx
http://www2.wealth-lab.com/WL5WIKI/TASCNov2013.ashx
0
Glitch8
 ( 11.39% )
- ago
#4
Plug it into an EMA of the period of your choice.
0
- ago
#5
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);    }
0
Glitch8
 ( 11.39% )
- ago
#6
Yes looks good to me.
1
- ago
#7
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);
0

Reply

Bookmark

Sort