#region Variables
// Wizard generated variables
privateint myInput0 = 1; // Default setting for MyInput0
// User defined variables (add any user defined variables below)
privatestring atmStrategyId = string.Empty;
privatestring orderId = string.Empty;
#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 (ToTime(Time[0]) > ToTime(013, 59, 58)
&& ToTime(Time[0]) < ToTime(14, 00, 10))
{
atmStrategyId = GetAtmStrategyUniqueId();
orderId = GetAtmStrategyUniqueId();
AtmStrategyCreate(Action.Sell, OrderType.StopLimit, Open[0] - 1 * TickSize, Open[0] - 1 * TickSize,TimeInForce.Day, orderId, "TEST DOWN", atmStrategyId);
}
}
#region Properties
[Description("")]
[Category("Parameters")]
publicint MyInput0
{
get { return myInput0; }
set { myInput0 = Math.Max(1, value); }
}
#endregion
}
}
Comment