This is what I have:
else if (State == State.Configure)
{
AddDataSeries(Data.BarsPeriodType.Minute, 5);
AddDataSeries(Data.BarsPeriodType.Minute, 15);
/* there's other stuff, but these are the only data series inputs */
}
If I'm correct in understanding this:
protected override void OnBarUpdate()
{
if (logic){
gapUpLong = EnterLongLimit(1, true,(int)orderQuantity,getSecondFib(PriorDayOHLC( ).PriorClose[0], CurrentDayOHL().CurrentHigh[0]),GapUpLong);
Print("Gap Up Same Day"+ Position.Instrument+ " At current price: "+GetCurrentBid() + "At current bar: " + CurrentBar);
}
"1" stands for looking at the 5-minute data series here, and this should only be tested once.
However, when I get printouts, I get subsequent values as such:
Gap Up Same DayPRCP Default At current price: 7.27At current bar: 682
Gap Up Same DayPRCP Default At current price: 6.26At current bar: 460
Gap Up Same DayPRCP Default At current price: 5.86At current bar: 685
Gap Up Same DayPRCP Default At current price: 5.6At current bar: 465
The entries are also ONLY made at 683 and 685 if everything works out fine / etc. I have it set to sell on the next bar while I'm testing this.
If I remove the second data series, then I don't get the additional bar calculations, but I'm curious as to WHY am I seeing them populate my output window?
Or is the situation here that we're running an index on everything?
However, if that's the case, then why am I not seeing current bars for time frame with 1 minute, since "BarsInProgress" default is relevant at 0, and is always there. I have to specify 1 in my case, to ensure it's looking at the 5-minute case.
Thank you
Comment