We could always add a random number to the mix as well to ensure we have a unique value.
string tag = "FVGUP" + Instrument.Id.ToString() + CurrentBar; string tag = "FVGDOWN" + Instrument.Id.ToString() + CurrentBar;
private void CheckFilledFVGs() { List<FVG> filled = new List<FVG>(); foreach (FVG fvg in fvgList) { if (fvg.filled) continue; if (DrawObjects[fvg.tag] != null && DrawObjects[fvg.tag] is DrawingTools.Rectangle) { //Update EndAnchor of Gap to Expand into future. Rectangle gapRect = (Rectangle)DrawObjects[fvg.tag]; gapRect.EndAnchor.Time = Times[1][0].AddDays(1); if (DisplayCE && DrawObjects[fvg.tag + "_CE"] != null && DrawObjects[fvg.tag + "_CE"] is DrawingTools.Line) { DrawingTools.Line gapLine = (DrawingTools.Line)DrawObjects[fvg.tag + "_CE"]; gapLine.EndAnchor.Time = Times[1][0].AddDays(1); } } if (fvg.type == FVGType.R && (FillType == FVGFillType.CLOSE_THROUGH ? (Closes[1][0] >= fvg.upperPrice) : (Highs[1][0] >= fvg.upperPrice))) {
Comment