d110 & d111 work fine, however d112 does not. It outputs the same value as d111.
Can anyone please see where I went wrong with my logic?
protected override void OnBarUpdate() { if (CurrentBar < 1) return; d110 = (CurrentDayOHL().CurrentHigh[0] + CurrentDayOHL().CurrentLow[0] + Close[0] ) / 3; // Current days live pivot if(PriorDayOHLC().PriorHigh[0] != 0 || PriorDayOHLC().PriorLow[0] != 0 || PriorDayOHLC().PriorClose[0] != 0) d111 = (PriorDayOHLC().PriorHigh[0] + PriorDayOHLC().PriorLow[0] + PriorDayOHLC().PriorClose[0] ) / 3; // Prior days pivot if(PriorDayOHLC().PriorHigh[1] != 0 || PriorDayOHLC().PriorLow[1] != 0 || PriorDayOHLC().PriorClose[1] != 0) d112 = (PriorDayOHLC().PriorHigh[1] + PriorDayOHLC().PriorLow[1] + PriorDayOHLC().PriorClose[1] ) / 3; //[B]2 days back's pivot[/B] }
Comment