- ago
I'm not quite sure if it's my fault. But it does not even work with the showing workarounds in the screenshot:

0
318
Solved
3 Replies

Reply

Bookmark

Sort
Cone8
 ( 6.17% )
- ago
#1
You're not showing all the code. Variable declarations are important to know the type your passing to functions.

This should work fine -

CODE:
         IndicatorBase marketSmooth = new IndOnInd(bars, new HMA(bars.Close, 13), new TEMA(bars.AveragePriceHLCC, 13));          PlotIndicator(marketSmooth );


In this context, it doesn't matter what you pass to TEMA as long as it's a TimeSeries. TEMA will be applied to the result of HMA.

In any case, if you're coding it yourself, you don't need IndOnInd.. Just stick the HMA in a TEMA.
CODE:
         IndicatorBase marketSmooth2 = new TEMA(new HMA(bars.Close, 13), 13);          PlotIndicator(marketSmooth2);
0
Best Answer
- ago
#2
JPEG screenshots look terrible, please always use PNG for that. Thanks.

QUOTE:
I'm not quite sure if it's my fault.

No, it's not your fault. The indicator is working per se but pushing it to C# code doesn't. I've just fixed this for B36.

CODE:
//B35, wrong //ind1 = new IndOnInd(bars,new HMA(bars.Close,20),new TEMA(AveragePriceOHLC,20)); //B36 should produce the following correct output: ind1 = new IndOnInd(bars,new HMA(bars.Close,20),new TEMA(bars.AveragePriceOHLC,20));
0
- ago
#3
Thanks for your response - this works:
CODE:
IndicatorBase marketSmooth; marketSmooth = new HMA(new TEMA(bars.AveragePriceHLCC, 13), 13); PlotIndicator(marketSmooth, WLColor.DarkRed, PlotStyle.Line, suppressLabels: false);

Greetings from Austria!
0

Reply

Bookmark

Sort