Also, I have two license keys. One that allows me to Sim and live trade. The other only lets me sim trade, but allows me to develop strategies using the ninjascript editor. However I haven't been able to move my strategies over so I can live trade with them. Any help would be greatly appreciated.
s namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
///<summary>
/// executes trades when 9 and 100 sma cross. utilizes trailing stops
///</summary>
[Description("executes trades when 9 and 100 sma cross. utilizes trailing stops")]
publicclass ninehundred : Strategy
{
#region Variables
// Wizard generated variables
privateint 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>
protectedoverridevoid Initialize()
{
CalculateOnBarClose = false;
}
///<summary>
/// Called on each bar update event (incoming tick)
///</summary>
protectedoverridevoid OnBarUpdate()
{
// Condition set 1
if (CrossAbove(SMA(9), SMA(100), 1))
{
EnterLong(DefaultQuantity, "");
}
// Condition set 2
if (CrossBelow(SMA(9), SMA(100), 1))
{
EnterShort(DefaultQuantity, "");
}
}
#region Properties

Comment