NinjaScript > Language Reference > Strategy > Order Methods > Managed Approach >


Print this Topic Previous pageReturn to chapter overviewNext page

Generates a sell short limit order to enter a short position.


Method Return Value

An IOrder read-only object that represents the order. Reserved for experienced programmers, additional information can be found within the Advanced Order Handling section.


EnterShortLimit(double limitPrice)
EnterShortLimit(double limitPrice, string signalName)

EnterShortLimit(int quantity, double limitPrice)

EnterShortLimit(int quantity, double limitPrice, string signalName)


The following method variation is for experienced programmers who fully understand Advanced Order Handling concepts.


EnterShortLimit(int barsInProgressIndex, bool liveUntilCancelled, int quantity, double limitPrice, string signalName)




User defined signal name identifying the order generated. Max 50 characters.


The limit price of the order.


Entry order quantity.


The order will NOT expire at the end of a bar, but instead remain live until the CancelOrder() method is called or its time in force has been reached.


The index of the Bars object the order is to be submitted against. See the BarsInProgress property. This determines what instrument the order is submitted for.




protected override void OnBarUpdate()
    if (CurrentBar < 20)
    // Only enter if at least 10 bars has passed since our last entry
    if (BarsSinceEntry() > 10 && CrossAbove(SMA(10), SMA(20), 1))
         EnterShortLimit(GetCurrentAsk(), "SMA Cross Entry");



Tips (also see Overview)

If using a method signature that does not have the parameter quantity, the order quantity will be taken from the quantity value set in the strategy dialog window when running or backtesting a strategy