Print("IsBullishFVGInLastBars(10)"+(IsBullishFVGIn L astBars(10) ));
protected override void OnBarUpdate() { Print("IsBullishFVGInLastBars(7)"+(IsBullishFVGInL astBars(7) )); if (IsBullishFVGInLastBars(10)) EnterLong(1,PositionSize, "Long Entry"); } bool IsBullishFVGInLastBars(int lookbackBars) { for (int i = 1; i <= lookbackBars; i++) { if (IsBullishFVG(i)) { return true; } } return false; } private bool IsBullishFVG(int index) { return (Close[3] > Open[3] && Close[2] > Open[2] && Close[1] > Open[1]) && Low[1] > High[3] && (Math.Abs(Low[1] - High[3]) >= minFvgSizeStrategy); }
Comment