first project. is show a green arrow above current bar when bid exceeds upper bollinger band.
strategy seemed to compile ok, and i was able to apply it to my chart.
here is the code. do you see what is not correct.?
// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
/// <summary>
/// Enter the description of your strategy here
/// </summary>
[Description("Enter the description of your strategy here")]
public class BlineTradingStrategy : Strategy
{
#region Variables
// Wizard generated variables
private int myInput0 = 1; // Default setting for MyInput0
// User defined variables (add any user defined variables below)
#endregion
/// <summary>
/// This method is used to configure the strategy and is called once before any strategy method is called.
/// </summary>
protected override void Initialize()
{
CalculateOnBarClose = true;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Condition set 1
if (GetCurrentBid() >= Bollinger(2, 22).Upper[0])
{
DrawArrowUp("My up arrow" + CurrentBar, true, 0, 0, Color.Lime);
}
}
#region Properties
[Description("")]
[GridCategory("Parameters")]
public int MyInput0
{
get { return myInput0; }
set { myInput0 = Math.Max(1, value); }
}
#endregion
}
}
#region Wizard settings, neither change nor remove
/*@
<?xml version="1.0" encoding="utf-16"?>
<NinjaTrader>
<Name>BlineTradingStrategy</Name>
<CalculateOnBarClose>True</CalculateOnBarClose>
<Description>Enter the description of your strategy here</Description>
<Parameters>
<Parameter>
<Default1>
</Default1>
<Default2>1</Default2>
<Default3>
</Default3>
Comment