All it does is draw an arrow below price when a condition is met: price crosses above 50-per SMA.
I followed instructions from video in this post:
#2
I'm getting some odd behavior though:
As I move through the chart, the arrow positions change, along with the plotted SMA (meaning the SMA moves vertically as the chart scrolls, and does not maintain it's fixed position, relative to price).
And, dragging the mouse in the price axis does not compress/expand price graph as expected, but only moves SMA and arrows up and down.
I tried setting 'Auto Scale' both on and off, and neither setting worked properly.
Can someone explain how to get this working (see relevant code below).
else if (State == State.DataLoaded) { SMA1 = SMA(Close, 50); SMA1.Plots[0].Brush = Brushes.DarkGray; AddChartIndicator(SMA1); } } protected override void OnBarUpdate() { if (BarsInProgress != 0) return; if (CurrentBars[0] < 1) return; // Set 1 if (CrossAbove(Close, SMA1, 1)) { Draw.ArrowUp(this, @"ArrowTest Arrow up_1 " + Convert.ToString(CurrentBars[0]), true, 0, (Low[0] + (-1 * TickSize)) , Brushes.LimeGreen); } }
Comment