Case:
15 min bar chart
If you have a strategy and you call from within BIP=1 (1 minute added period) the strategy Indicator(BarsArray[0])
And then within Indicator.cs
Another Added Period Type of 1 min is added
And within BIP=1.....The Value.Set will plot a different value on the screen versus a print statement located within either the strategy or the indicator.
This can be a bit hard to follow, but the value that is plotted on the chart is given a different value than if you Print(Value.ToString()); within the same indicator. So the issue has something to do with adding another time frame to an indicator and then laying it on top of a chart with a less granular time frame.
I questioned this from day one, as i do not have all the code listed but enough to show the issue - our ProfitFactor went to about 60 Out of sample with about 2 trades a day with this indicator "logic ---likely illogic" added to the code.
protected override void Initialize()
{
Add(PeriodType.Minute,1); // index
CalculateOnBarClose = false;
Add(new Plot(Color.Blue, PlotStyle.Line, "Plot0"));
Add(new Plot(Color.Red,PlotStyle.Line, "Plot1"));
Overlay = true;
//Add(PeriodType.Minute,1);
}
protected override void OnBarUpdate()
{
if (BarsInProgress == 1)
{
if (CurrentBars[0] < 5)
return;
Value.Set(Highs[1][0]);
// WITH NO VALUE.SET Ninja Defaults to the Close of the BIP of the Chart, so index 0
// value is only printing every 15 minutes even though its inside of a 1 min bip index
[B]NOTE: VALUE.TOSTRING() and VALUE= plotted on chart are not the same[/B]
Print(ToTime(Time[0]) + " valuebip=1 " + Value.ToString () + " Highs[0][0] " + Highs[0][0]);
//Plot1.Set(Highs[1][0]);
//Plot0.Set(value9);
} // end bip 1

"
Comment