looking at youtube video I tried to create an indicator which will print arrow when price cross sma. but I am getting an error in that, can someone please help me with the code....
else if (State == State.Configure)
{
SMA1 = SMA(Close, 14);
}
}
protected override void OnBarUpdate()
{
if (BarsInProgress != 0)
return;
if (CurrentBars[0] < 70)
return;
// Set 1
if (CrossAbove(Close, SMA1, 1))
{
Draw.ArrowUp(this, @"Smacross Arrow up_1", false, 0, (Low[0] + (-4 * TickSize)) , Brushes.Lime);
//EnterLong(Convert.ToInt32(DefaultQuantity), "");
}
// Set 2
if (CrossBelow(Close, SMA1, 1))
{
Draw.ArrowDown(this, @"Smacross Arrow down_1", false, 0, (High[0] + (4 * TickSize)) , Brushes.Red);
//EnterShort(Convert.ToInt32(DefaultQuantity), "");
Comment