My code looks for an inside bar or an outside bar and should plot a black dot when this occurs.
If I remove the condition I get a plot at zero otherwise I get nothing.
Can someone point me in the right direction?
protected override void Initialize() { Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0")); Add(new Plot(Color.FromKnownColor(KnownColor.Black), PlotStyle.Dot, "Plot1")); CalculateOnBarClose = true; Overlay = false; PriceTypeSupported = false; } protected override void OnBarUpdate() { int insidebar = 0; int outsidebar = 0; if(High[0] <= High[1] && Low[0] >= Low[1]) //Inside Bar {insidebar = 1; } if( High[0] >= High[1] && Low[0] <= Low[1] )//Outside Bar {outsidebar = 1;} if (insidebar > 0 || outsidebar > 0) {Plot1.Set(1);} Plot0.Set(0); }
Comment