PDA

View Full Version : Custon Indicator and multi-time frame


scjohn
06-08-2007, 09:06 PM
I want to call a custom indicator doing my BarsInProgress section.
if (BarsInProgress == 1)
{
double myCustomIndicator1 = myCustomIndicator();
}
else if (BarsInProgress == 2)
{
double myCustomIndicator2 = myCustomIndicator();
}

Now myCustomIndicator uses the Open, High and low to perform some calculation and returns that value via Plots.

Let's say that BarsInProgress == 1 is a 5 minute bar. When myCustomIndicator is called, when BarsInProgress == 1, are the Open, High and Low that myCustomeIndicator sees for the 5 minute bars?

Thanks

NinjaTrader_Dierk
06-08-2007, 11:34 PM
- indicators do not support multi times. Strategies do: I suppose you embed code below in a strategy
- BarsInProgress start as index 0 not 1
- as you reference an indicator in a multi-series strategy, it's calculated either (a) on the current BarsInProgress context, if you don't provide an explicit input series or (b) on the data series you provide as input
http://www.ninjatrader-support.com/HelpGuideV6/MultiTimeFrameInstruments.html