PDA

View Full Version : Bad scaling in strategy analyzer if indicator on indicator


maxima
12-22-2009, 03:27 PM
if I add an indicator in Initialize in a strategy - everything is fine.

if I write :

Add(EMA(Momentum(momLen), 3));

The chart tab after running the Backtest looks really bad. I cant adjust it anyhow (it seems that NT is trying to plot the indicator on the same panel as the price itself).

I think Panel parameter is needed in Add method, firstly to avoid this problem, secondly it is handy to be able to superimpose things as you want it.

NinjaTrader_Ray
12-23-2009, 07:50 AM
We will look into this.

NinjaTrader_Christian
12-23-2009, 09:03 AM
Hi maxima !

You could select the indicator in the chart clicking on the indicator's plot and drag & drop it into the left scale (move the the very left of chart) or into a new panel (move to bottom slightly above the x axis).

Alternatively you could change the scale justification in the code before adding to your strategy:

protected override void Initialize()
{
...

EMA(Momentum(5), 3).ScaleJustification = ScaleJustification.Left;
Add(EMA(Momentum(momLen), 3));
}

Kind regards,
Christian