I'm trying to replicate the way ATM handles orders though a NinjaScript Strategy. The reason that I am just not using ATM is because I need to dynamically modify my share quantity. That said, I am having trouble figuring out a way that I can do it without doubling the commission that I incur upon my entry.
Here's my problem:
When I enter an order with ATM to buy 100 shares then set two profit targets (each for 50 shares). The 100 share order is treated as a single order (thus one commission). Unfotunately, when I try to replicate this in NinjaScript, I find that since I can only specify the fromEntrySignal name in SetProfitTarget(), I must enter my 100 shares in two orders of 50 shares in order to set the two profit targets.... thus generating 2 commissions, instead of the 1 when using the ATM. If I could specify the number of shares at the Profit Target then I could do it, but that is not available.
Scenario 1: Two entries: (Is this the only way?)
EnterLong(50, 32.50, "LongEntry1");
SetProfitTarget("LongEntry1",CalculationMode.Price , 34)
EnterLong(50, 32.50, "LongEntry2");
SetProfitTarget("LongEntry2",CalculationMode.Price , 40)
Scenario 2: Single entry: (I know this won't work, as is, but is there another way to enter once, but exit twice?)
EnterLong(100, 32.50, "LongEntry1");
SetProfitTarget("LongEntry1",CalculationMode.Price , 34) //Exit 50 shares
SetProfitTarget("LongEntry1",CalculationMode.Price , 34) //Exit remaining 50 shares
Is there some way that I can do this? Otherwise, for EACH profit target I wish to have, I must enter the position as a separate order? From a commission standpoint, that can be very costly (i.e., effectively doubling ones commissions). Please tell me that there is a way to "Enter once, but exit twice" using NinjaScript.
Thanks.
fosch

Comment