//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if (orderIdL.Length > 0)
{
string[] status = GetAtmStrategyEntryOrderStatus(orderIdL);
// If the status call can't find the order specified, the return array length will be zero otherwise it will hold elements
if (status.GetLength(0) > 0)
{
// Print out some information about the order to the output window
Print("The entry order average fill price is: " + status[0]);
Print("The entry order filled amount is: " + status[1]);
Print("The entry order order state is: " + status[2]);
// If the order state is terminal, reset the order id value
if (status[2] == "Filled" || status[2] == "Cancelled" || status[2] == "Rejected")
orderIdL = string.Empty;
}
} // If the strategy has terminated reset the strategy id
else if (atmStrategyIdL.Length > 0 && GetAtmStrategyMarketPosition(atmStrategyIdL) == Cbi.MarketPosition.Flat)
atmStrategyIdL = string.Empty;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if (orderIdS.Length > 0)
{
string[] status = GetAtmStrategyEntryOrderStatus(orderIdS);
// If the status call can't find the order specified, the return array length will be zero otherwise it will hold elements
if (status.GetLength(0) > 0)
{
// Print out some information about the order to the output window
Print("The entry order average fill price is: " + status[0]);
Print("The entry order filled amount is: " + status[1]);
Print("The entry order order state is: " + status[2]);
// If the order state is terminal, reset the order id value
if (status[2] == "Filled" || status[2] == "Cancelled" || status[2] == "Rejected")
orderIdS = string.Empty;
}
} // If the strategy has terminated reset the strategy id
else if (atmStrategyIdS.Length > 0 && GetAtmStrategyMarketPosition(atmStrategyIdS) == Cbi.MarketPosition.Flat)
atmStrategyIdS = string.Empty;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if (atmStrategyIdL.Length > 0)
{
// You can change the stop price
if (GetAtmStrategyMarketPosition(atmStrategyIdL) != MarketPosition.Flat)
AtmStrategyChangeStopTarget(0, Low[0] - 3 * TickSize, "STOP1", atmStrategyIdL);
// Print some information about the strategy to the output window, please note you access the ATM strategy specific position object here
// the ATM would run self contained and would not have an impact on your NinjaScript strategy position and PnL
Print("The current ATM Strategy market position is: " + GetAtmStrategyMarketPosition(atmStrategyIdL));
Print("The current ATM Strategy position quantity is: " + GetAtmStrategyPositionQuantity(atmStrategyIdL));
Print("The current ATM Strategy average price is: " + GetAtmStrategyPositionAveragePrice(atmStrategyIdL));
Print("The current ATM Strategy Unrealized PnL is: " + GetAtmStrategyUnrealizedProfitLoss(atmStrategyIdL));
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if (atmStrategyIdS.Length > 0)
{
// You can change the stop price
if (GetAtmStrategyMarketPosition(atmStrategyIdS) != MarketPosition.Flat)
AtmStrategyChangeStopTarget(0, Low[0] - 3 * TickSize, "STOP1", atmStrategyIdS);
// Print some information about the strategy to the output window, please note you access the ATM strategy specific position object here
// the ATM would run self contained and would not have an impact on your NinjaScript strategy position and PnL
Print("The current ATM Strategy market position is: " + GetAtmStrategyMarketPosition(atmStrategyIdS));
Print("The current ATM Strategy position quantity is: " + GetAtmStrategyPositionQuantity(atmStrategyIdS));
Print("The current ATM Strategy average price is: " + GetAtmStrategyPositionAveragePrice(atmStrategyIdS));
Print("The current ATM Strategy Unrealized PnL is: " + GetAtmStrategyUnrealizedProfitLoss(atmStrategyIdS));
}
}
}
}}
Can you help answer these questions from other members on futures io?