My Strategy is calculating Order size dynamically. It will usually open 3 orders with the same Entry Price but vary the Profit Target for each order. The strategy uses only Managed Approach orders of EntryLongLimit() , SetProfitTarget() and SetStopLoss(), etc...
For my testing I am using NT 64 bit 7.0.1000.16 (Live) and:
Account: Replay101
Buying Power: 200,000.00
Cash Value: 100,000.00
Excess Equity: 200,000.00
Initial Margin: 0.00
As an example:
Where SPY Close[0] = 179.16... Submit 3 orders with an Entry Limit price at 178.44, StopLoss price at 178.27 and Profit Targets at 178.92, 179.17 and 180.69. Order #1 Size= 706 shares, Order #2 Size= 1059, Order #3 Size = 1764. Therefore the total Position Size = 3,529 shares. The 3 orders break out the Order Sizes to take profit at different price points. THIS ABOVE example WORKS just fine.
BUT when the strategy submits the following same order BUT with different order sizes for each of the 3 orders it fails with this error:
"Market Replay Connection. Order has exceeded available account equity: Please reduce order size affected Order: Buy 2117 Limit @ 178.44"
This is the example of the Order that failed:
Where SPY Close[0] = 179.16... Submit 3 orders with an Entry Limit price at 178.44, StopLoss price at 178.27 and Profit Targets at 178.92, 179.17 and 180.69. Order #1 Size= 706 shares, Order #2 Size= 706, Order #3 Size = 2117. The total Position Size is the same (3,529 shares) as before yet an individual order has exceeded "some NT internal" limit.
Can you please explain How I can calculate or determine the Maximum individual order size for the strategy to use to prevent NT from failing the order/strategy.
Thank you

Comment