Definition

Method Return Value

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

Syntax

EnterLong() EnterLong(stringsignalName)

EnterLong(intquantity)

EnterLong(intquantity, stringsignalName)

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

EnterLong(intbarsInProgressIndex, intquantity, stringsignalName)

Note: 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

Examples

protectedoverridevoidOnBarUpdate(){if(CurrentBar<20)return;// Only enter if at least 10 bars has passed since our last entryif((BarsSinceEntryExecution()>10||BarsSinceEntryExecution()==-1)&&CrossAbove(SMA(10),SMA(20),1))EnterLong(5,"SMA Cross Entry");}