I am somewhat new to NinjaScript and I am trying to find a way to pass a variable value from OnBarUpdate into the SubmitOrderUnmanaged housed within the OnExecutionMethod. How can I acheive this?
{
....OnBarUpdate method double LSL = code for value; ....OnExecutionUpdate method stopLossLong = SubmitOrderUnmanaged(0, OrderAction.Sell, OrderType.StopMarket, Position.Quantity, 0, Position.AveragePrice - LSL, oco, "StopLossLong");
Comment