Newbie to Ninjascript but seasoned in C#. Missing something obvious here.
3rd Party Indicator does not support non time based charts like Renko. So, trying to create a custom indicator that adds a secondary time data series and then assign this indicator to that data series so it will fire signals and send back to primary data series chart. (Had added the other data series to the chart and it did draw signals perfectly in both time frames (plot from panel 2 into panel 1) but equidistant (spacing) was horrid!)
2 Problems:
1. My custom indicator does not draw anything on primary chart (tested text in OnBarUpdate and it showed on each bar.)
2. My custom indicator goes into infinite "calculating" on primary chart until you click the chart.
Have tried tons of code in OnBarUpdate event and keep thinking something is needed there?
Here is the core code:
(snip)
else if (State == State.Configure)
{
// Secondary Data
AddDataSeries(Data.BarsPeriodType.Minute, 1);
}
else if (State == State.DataLoaded)
{
// Custom Indicator to Draw Signal
drawSignal = 3rdPartyIndicator(BarsArray[1],false,null,0,etc....)
}
}
protected override void OnBarUpdate()
{
if (CurrentBar < 1) return;
// Something here????
}
(snip)
Thanks,
CQ
Comment