PDA

View Full Version : EnterLongLimt() questions


Folls
10-13-2007, 03:21 PM
I want to make a strategy using EnterLongLimit() and other limit orders.

1) Is there an example strategy anywhere using limits?

2) Since the limit orders must be re-entered every tick, what if the limit was for 200 and 100 were filled? Do you need to re-enter at 100 then or still re-enter at 200?

Thanks,

Folls

NinjaTrader_Josh
10-13-2007, 03:27 PM
1) This one here (http://www.ninjatrader-support.com/vb/showthread.php?t=3223) uses EnterLongStop(). It is implemented in the same way you would implement EnterLongLimit() though.

2) I believe you don't need to modify the order when it is resubmitted. NT will understand it was a partial fill and continue to try to fill your original order.

Folls
10-13-2007, 05:06 PM
Thanks!

Folls

ltemme
07-17-2008, 10:45 AM
I want to make sure that in fact the engine does continue to place EnterShortLimit() and EnterLongLimit() orders with a new qty once a partial fill occurs as long as I continue to issue the order every OnBarUpdate() event.

Example:
DefaultQuantity = 2

I am long two contracts and I place EnterShortLimit(DefaultQuantity,price,"GoShort")
) order above market action, two contracts gets filled, I continue to place the EnterShortLimit() order regardless if the Position.MarketPosition == MarketPosition.Flat ... will it know to place an order for net 2 short.

Any variation of the above test perfectly in backtest since it is always assumed that all qty is filled when a fill happens .. I just need to make sure that this does work correctly in live.

-Lars

NinjaTrader_Ray
07-17-2008, 11:00 AM
It is expected to work live however, that's one of the benefits of NinjaTrader. You can test this in real-time using a live feed against the Sim101 account, Market Replay or Simualted Data Feed.

ltemme
07-17-2008, 11:02 AM
Ray,
Does the SIM account, account for, partial fills?
How does it do that?

Example if I have a limit order in the market in real life my placement within the "Order Stack" is an unknown, how does SIM account for this?

-Lars

NinjaTrader_Ray
07-17-2008, 11:10 AM
Without providing the entire algorithm, yes it handles partial fills. If you want to enforce this, go to Tools > Options > Sim and change the settings.