I have the Pivots indicator running on a 5 min chart and it works fine. I like what I see on the chart.
I noticed on the chart it calculates the values when the second bar starts to be drawn and not on the first, not sure why that is.
In any event, I wanted to use the values of this indicator in Ninjascript strategy.
This if from the online reference page for the indicator:
if (Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 0, 0, 0, 20).PP.ContainsValue(0))
{
// Prints the current pivot point value
double value = Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 0, 0, 0, 20).PP[0];
Print("The current Pivots' pivot value is " + value.ToString());
}
When I use it without the IF block it produces zero.
When I use it with the IF block it doesn't produce anything since it appears the block is not executed.
BTW, I am using AMP CQG as a provider and my daily chart draws without a problem.
I read many posts suggesting this indicator is not working well with DailyBars and to use CalcFromIntradayData method instead for priorDayHLC. On the chart I am using DailyBars which seems to be the default.
I have tried that but the values I get are completely different from the values I get on the chart and are useless.
So, why can't Ninjatrader provide a way to get the same values from an indicator in ninjascript strategy as the ones on a chart?
I am running 7.0.1000.42
I also read that the above limitations of the indicator would be resolved (this was on some old posts and wonder if that was ever completed).
Wonder also if version 8 has the same problem.
Thanks,
-George
Comment