- Writing Indicators and Strategies
- Importing Instruments
- Environment and Error Reporting
- Extending Equilla
-
Meta Properties
- Meta
- AlertEnabled
- Author
- AutoScale
- BackBuffer
- Categories
- DataOptions
- DisplayUnit
- DynamicInlineSymbols
- EnhancedBufferDetection
- WarningForAutoConversionToSeries
- Legend
- Longname
- MoveWithParent
- OutputLotSize
- OutputTickSize
- EvaluateOnHistoricUpdates
- OutputTimeStamps
- ShareValueScale
- ShortCode
- ShowLegend
- SubChart
- Synopsis
- TrigMode
- ValueAxisLabel
- WebLink
- Drawing
- Alerts and Output
-
Color
- All Colors
- Color Functions
- Standard Color Constants
-
Extended Color Constants
- ColorAliceBlue
- ColorAntiqueWhite
- ColorAqua
- ColorAquamarine
- ColorAzure
- ColorBeige
- ColorBisque
- ColorBlack
- ColorBlanchedAlmond
- ColorBlue
- ColorBlueViolet
- ColorBrown
- ColorBurlyWood
- ColorCadetBlue
- ColorChartreuse
- ColorChocolate
- ColorCoral
- ColorCornflowerBlue
- ColorCornsilk
- ColorCrimson
- ColorCyan
- ColorDarkBlue
- ColorDarkCyan
- ColorDarkGoldenRod
- ColorDarkGray
- ColorDarkGreen
- ColorDarkKhaki
- ColorDarkMagenta
- ColorDarkOliveGreen
- ColorDarkOrange
- ColorDarkOrchid
- ColorDarkRed
- ColorDarkSalmon
- ColorDarkSeaGreen
- ColorDarkSlateBlue
- ColorDarkSlateGray
- ColorDarkTurquoise
- ColorDarkViolet
- ColorDeepPink
- ColorDeepSkyBlue
- ColorDimGray
- ColorDodgerBlue
- ColorFeldspar
- ColorFireBrick
- ColorFloralWhite
- ColorForestGreen
- ColorFuchsia
- ColorGainsboro
- ColorGhostWhite
- ColorGold
- ColorGoldenRod
- ColorGray
- ColorGreen
- ColorGreenYellow
- ColorHoneyDew
- ColorHotPink
- ColorIndianRed
- ColorIndigo
- ColorIvory
- ColorKhaki
- ColorLavender
- ColorLavenderBlush
- ColorLawnGreen
- ColorLemonChiffon
- ColorLightBlue
- ColorLightCoral
- ColorLightCyan
- ColorLightGoldenRodYellow
- ColorLightGrey
- ColorLightGreen
- ColorLightPink
- ColorLightSalmon
- ColorLightSeaGreen
- ColorLightSkyBlue
- ColorLightSlateBlue
- ColorLightSlateGray
- ColorLightSteelBlue
- ColorLightYellow
- ColorLime
- ColorLimeGreen
- ColorLinen
- ColorMagenta
- ColorMaroon
- ColorMediumAquaMarine
- ColorMediumBlue
- ColorMediumOrchid
- ColorMediumPurple
- ColorMediumSeaGreen
- ColorMediumSlateBlue
- ColorMediumSpringGreen
- ColorMediumTurquoise
- ColorMediumVioletRed
- ColorMidnightBlue
- ColorMintCream
- ColorMistyRose
- ColorMoccasin
- ColorNavajoWhite
- ColorNavy
- ColorOldLace
- ColorOlive
- ColorOliveDrab
- ColorOrange
- ColorOrangeRed
- ColorOrchid
- ColorPaleGoldenRod
- ColorPaleGreen
- ColorPaleTurquoise
- ColorPaleVioletRed
- ColorPapayaWhip
- ColorPeachPuff
- ColorPeru
- ColorPink
- ColorPlum
- ColorPowderBlue
- ColorPurple
- ColorRed
- ColorRosyBrown
- ColorRoyalBlue
- ColorSaddleBrown
- ColorSalmon
- ColorSandyBrown
- ColorSeaGreen
- ColorSeaShell
- ColorSienna
- ColorSilver
- ColorSkyBlue
- ColorSlateBlue
- ColorSlateGray
- ColorSnow
- ColorSpringGreen
- ColorSteelBlue
- ColorTan
- ColorTeal
- ColorThistle
- ColorTomato
- ColorTurquoise
- ColorViolet
- ColorWheat
- ColorWhite
- ColorWhiteSmoke
- ColorYellow
- ColorYellowGreen
-
Data and Properties
- Instrument Properties
- Series Data Fields
- Script
- Portfolio Support
-
Quote Fields
- Ask
- AskDate
- AskDatetime
- AskDateEx
- AskExchange
- AskSize
- AskTime
- AskTimeEx
- Bid
- BidDate
- BidDatetime
- BidDateEx
- BidExchange
- BidSize
- BidTime
- BidTimeEx
- BidDirectionNNM
- TodaysClose
- TodaysHigh
- TodaysLow
- TodaysOpen
- TodaysTrades
- TodaysTradesDown
- TodaysTradesUnchanged
- TodaysTradesUp
- TodaysVolume
- TodaysVolumeDown
- TodaysVolumeUnchanged
- TodaysVolumeUp
- DividendFreq
- DivYield
- EPS
- EPSEstimate
- PERatio
- ExpDateEx
- ExpStyle
- FND
- FNDEx
- High52Wk
- Low52Wk
- LEAPYear
- TradeDirectionSeries
- VWAP
- Last
- LastTradeDate
- LastTradeDateEx
- LastTradeDateTime
- PreviousClose
- PreviousOpenInt
- PreviousVolume
- Settlement
- SharesOut
- SICCode
- SymbolRoot
- TradeDate
- TradeDateEx
- TradeDateTime
- TradeExchange
- TradeTime
- TradeTimeEx
- TradeVolume
- Underlying
- CallOpenInt
- CallVolume
- q_IVolatility
- PutOpenInt
- PutVolume
- StrikePrice
- Level II
- Sessions and Holidays
- News
- Trader Information
- Date and Time
- Math Functions
- Strings
- Bar Information
-
Trading
- About Trading
- Order Processing
- Order Commands
-
Position Management
- BarsSinceEntry
- BarsSinceExit
- EntryDate
- EntryDateTime
- EntryPrice
- EntryAmount
- EntryCount
- ExitCount
- ExitLabel
- ExitAmount
- FilledOrderAmount
- FilledOrderCount
- FilledOrderDate
- FilledOrderDateTime
- FilledOrderId
- FilledOrderIsEntry
- FilledOrderIsExit
- FilledOrderLabel
- FilledOrderPrice
- FilledOrderTime
- EntryLabel
- EntryTime
- ExitDate
- ExitDateTime
- ExitPrice
- ExitTime
- InitialCapital
- MarketPosition
- MaxContracts
- MaxEntries
- MaxPositionLoss
- MaxPositionProfit
- MaxContractProfit
- PositionProfit
- AvgEntryPrice
- CurrentContracts
- CurrentEntries
- GetDefaultQuantity
- SetDefaultQuantity
- Profit and Loss
- Risk Management
-
Statistics
- GetStrategyName
- TotalTrades
- NumLosTrades
- NumWinTrades
- PercentProfit
- GrossProfit
- GrossLoss
- AvgBarsLosTrade
- AvgBarsWinTrade
- LargestLosTrade
- LargestWinTrade
- MaxConsecLosers
- MaxConsecWinners
- MaxContractsHeld
- TotalBarsLosTrade
- TotalBarsWinTrade
- AvgLosTrade
- AvgWinTrade
- TotalPositions
- TotalClosedPositions
- GlobalStatisticsCurrency
- GlobalStatisticsCurrencyMode
- GlobalStatisticsCurrencyFactor
- Active Order Tracking
- Order Generation
-
Trading Properties
- About TradeProps
- StartDate
- EndDate
- InitialCapital
- TickSimulationPercent
- OrderGenerationMode
- FieldsForRealTimeFillPriceGeneration
- SlippagePerTradeMode
- SlippagePerTradeValue
- SlippagePerUnitMode
- SlippagePerUnitValue
- CommissionPerTradeMode
- CommissionPerTradeValue
- CommissionPerUnitMode
- CommissionPerUnitValue
- CommissionMin
- CommissionMax
- DefaultTradeQuantity
- MaxTotalPositionSize
- PyramidingMode
- MaxOpenEntries
- DefaultStopMode
- DefaultProfitTarget
- DefaultStopLoss
- DefaultBreakEvenStop
- DefaultProfitTrailingStop
- DefaultPercentTrailingFloor
- DefaultPercentTrailingPercentage
- UseCommissionAndSlippageInAutomatedStops
-
Order Routing
- GetFilledAccountOrderCount
- GetFilledAccountOrderCommand
- GetFilledAccountOrderPrice
- GetFilledAccountOrderQuantity
- GetFilledAccountOrderDetails
- GetFilledAccountOrderDateTime
- GetFilledAccountOrderDate
- GetFilledAccountOrderTime
- GetBarFilledAccountOrderCount
- GetBarFilledAccountOrderCommand
- GetBarFilledAccountOrderPrice
- GetBarFilledAccountOrderQuantity
- GetBarFilledAccountOrderDetails
- GetBarFilledAccountOrderDateTime
- GetBarFilledAccountOrderDate
- GetBarFilledAccountOrderTime
- GetPendingAccountOrderCount
- GetPendingAccountOrderCommand
- GetPendingAccountOrderPrice
- GetPendingAccountOrderQuantity
- GetPendingAccountOrderDetails
- GetPendingAccountOrderDateTime
- GetPendingAccountOrderDate
- GetPendingAccountOrderTime
- CreateAccountOrder
- GetAccountPosition
- IsAccountConnected
- BarsSinceAccountUpdate
-
Tools
- Tools
- DrawTrendline
- DrawRectangle
- ToolDelete
- ToolGetType
- ToolGetFlags
- ToolSetFlags
- ToolGetStartDate
- ToolGetStartDateTime
- ToolGetStartTime
- ToolGetStartValue
- ToolGetEndDate
- ToolGetEndDateTime
- ToolGetEndTime
- ToolGetEndValue
- ToolSetStart
- ToolSetEnd
- ToolGetColor
- ToolGetWidth
- ToolGetStyle
- ToolSetColor
- ToolSetWidth
- ToolSetStyle
- ToolGetFirst
- ToolGetNext
- ToolGetExtLeft
- ToolSetExtLeft
- ToolGetExtRight
- ToolSetExtRight
- ToolGetExtTop
- ToolSetExtTop
- ToolGetExtBottom
- ToolSetExtBottom
-
Arrays
- Array Functions
- ArrayLength
- SetArrayLength
- GetArrayDimensions
- SetValRangeArray
- FillArray
- InsertAtArray
- InsertSortedArray
- RemoveAtArray
- ClearArray
- CopyArray
- Array_Copy
- AppendArray
- HighestArray
- LowestArray
- IndexOfHighestArray
- IndexOfLowestArray
- SortArray
- Array_Sort
- SearchArray
- BinarySearchArray
- CompareArray
- Array_GetType
- Sort2DArray
- CreateSortedIndexArray
- CreateSortedIndexArrayLegacy
- Array_Sum
- SummationArray
- SummationRecArray
- SummationSqrArray
- MedianArray
- AverageArray
- AvgDeviationArray
- HarmonicMeanArray
- KurtosisArray
- SkewnessArray
- StdDeviationArray
- StdErrorArray
- VarianceArray
-
Vectors
- Vector
- GlobalVector
- ReadVector
- WriteVector
- ReadVectorIndirect
- WriteVectorIndirect
- CreateSortedIndexVector
- VectorLength
- SortVector
- CopyVector
- CompareVector
- SetValRangeVector
- SetMaxIndexVector
- SummationVector
- SummationSqrVector
- SummationRecVector
- VarianceVector
- StdErrorVector
- StdDeviationVector
- MedianVector
- LowestVector
- IndexOfLowestVector
- HighestVector
- IndexOfHighestVector
- AverageVector
- AvgDeviationVector
- KurtosisVector
- SkewnessVector
- HarmonicMeanVector
- SearchVector
- BinarySearchVector
- FillVector
- AppendVector
- ClearVector
-
Errors and Warnings
- Errors and Warnings
-
Compiler Errors
- C1000
- C1001
- C1002
- C1003
- C1004
- C1005
- C1006
- C1007
- C1008
- C1009
- C1010
- C1011
- C1012
- C1013
- C1014
- C1015
- C1016
- C1017
- C1018
- C1019
- C1020
- C1021
- C1022
- C1023
- C1024
- C1025
- C1026
- C1027
- C1028
- C1029
- C1030
- C1031
- C1032
- C1033
- C1034
- C1035
- C1036
- C1037
- C1039
- C1040
- C1041
- C1042
- C1043
- C1044
- C1045
- C1046
- C1047
- C1048
- C1049
- C1050
- C1051
- C1052
- C1053
- C1054
- C1055
- C1056
- C1057
- C1058
- C1059
- C1060
- C1061
- C1062
- C1063
- C1064
- C1065
- C1066
- C1068
- C1069
- C1070
- C1071
- C1072
- C1073
- Compiler Warnings
-
Runtime Errors
- E3000
- E3001
- E3002
- E3003
- E3004
- E3005
- E3006
- E3007
- E3008
- E3009
- E3010
- E3011
- E3012
- E3013
- E3014
- E3015
- E3016
- E3017
- E3018
- E3019
- E3020
- E3021
- E3022
- E3023
- E3024
- E3025
- E3026
- E3027
- E3028
- E3029
- E3030
- E3031
- E3032
- E3033
- E3034
- E3035
- E3036
- E3037
- E3038
- E3039
- E3040
- E3041
- E3042
- E3043
- E3044
- E3045
- E3046
- E3047
- E3048
- E3049
- E3050
- E3051
- E3052
- E3053
- E3054
- E3055
- E3056
About Trading
Equilla is providing a number of functions and statistic variables to help you to define your trading strategies.
Order Commands
Buy | Enters a new long position. |
Short | Enters a new short position. |
Cover | Decreases or closes a short position. |
Sell | Decreases or closes a long position. |
ExitPosition | Decreases or closes a long or short position. |
Profit and Loss
ClosedEquity | Returns the closed equity for a specific instrument. |
Commission | Calculates commissions. |
GlobalClosedEquity | Returns the closed equity for all instruments. |
GlobalOpenEquity | Returns the open equity for all instruments. |
OpenEquity | Returns the open equity for a specific instrument. |
OpenPosition | Returns the open position for a specific instrument. |
Slippage | Calculates a slippage value. |
Position Management
AvgEntryPrice | Returns the average entry price of all entries in the current position. |
BarsSinceEntry | Returns the number of bars elapsed since a position has been entered. |
BarsSinceExit | Returns the number of bars elapsed since a position has been closed. |
CurrentContracts | Returns the number of contracts in the current position. |
CurrentEntries | Returns the number of open entries in the current position. |
EntryAmount | Returns the quantity of an entry order in a position. |
EntryCount | Returns the total number of entries order in a given position. |
EntryDate | Returns the Date of an entry order in a position. |
EntryDateTime | Returns the DateTime of an entry order in a position. |
EntryLabel | Returns the label of an entry order in a position. |
EntryPrice | Returns the price of an entry order in a position. |
EntryTime | Returns the Time of an entry order in a position. |
ExitAmount | Returns the quantity of an exit order in a position. |
ExitCount | Returns the total number of exit orders in a given position. |
ExitDate | Returns the Date of an exit order in a position. |
ExitDateTime | Returns the DateTime of an exit order in a position. |
ExitLabel | Returns the label of an exit order in a position. |
ExitPrice | Returns the price of an exit order in a position. |
ExitTime | Returns the Time of an exit order in a position. |
FilledOrderAmount | Returns the quantity of a filled order in a position. |
FilledOrderCount | Returns the total number of filled orders in a given position. |
FilledOrderDate | Returns the Date of a filled order in a position. |
FilledOrderDateTime | Returns the DateTime of a filled order in a position. |
FilledOrderId | Returns the unique identifier of a filled order in a position. |
FilledOrderIsEntry | Returns true if a given filled order in a position is an entry order. |
FilledOrderIsExit | Returns true if a given filled order in a position is an exit order. |
FilledOrderLabel | Returns the label of a filled order in a position. |
FilledOrderPrice | Returns the price of a filled order in a position. |
FilledOrderTime | Returns the Time of a filled order in a position. |
GetDefaultQuantity | Returns the currently active default quantity. |
InitialCapital | Returns the value of the Initial Capital property. |
MarketPosition | Returns the current market position. |
MaxContractProfit | Returns the maximum profit per contract of a position. |
MaxContracts | Returns the maximum number of shares/contracts held in a position. |
MaxEntries | Returns the maximum number of entries in a position. |
MaxPositionLoss | Returns the maximum loss of a position. |
MaxPositionProfit | Returns the maximum profit of a position. |
PositionProfit | Returns the latest profit of a position. |
SetDefaultQuantity | Sets the default trading quantity for an instrument. |
Statistics
Statistic Function | Statistic Variable | Description |
AvgBarsLosTrade | AllTrades::AvgBarsLoser | Returns the average number of bars that elapsed during losing trades. |
AvgBarsWinTrade | AllTrades::AvgBarsWinner | Returns the average number of bars that elapsed during winning trades. |
AvgLosTrade | AllTrades::AvgLosTrade | Returns the average losing trade. |
AvgWinTrade | AllTrades::AvgWinTrade | Returns the average winning trade. |
GetStrategyName | Returns the name of the current strategy. See also GetScriptName. | |
GrossLoss | AllTrades::GrossLoss | Returns the total amount of all closed losing trades. |
GrossProfit | AllTrades::GrossProfit | |
LargestLosTrade | AllTrades::LargestLosTrade | Returns the total amount of all closed winning trades. |
LargestWinTrade | AllTrades::LargestWinTrade | Returns the amount of the largest closed winning trade. |
MaxConsecLosers | AllTrades::MaxConsecLoser | Returns the largest number of consecutive losing closed trades. |
MaxConsecWinners | AllTrades::MaxConsecWinner | Returns the largest number of consecutive winning closed trades. |
MaxContractsHeld | AllTrades::MaxContractsHeld | The maximum number of shares/contracts held at any one time. |
NumLosTrades | AllTrades::NumberLoseTrades | Returns the number of losing trades. |
NumWinTrades | AllTrades::NumberWinTrades | Returns the number of winning trades. |
PercentProfit | AllTrades::PercentProfitable | Returns the precentage of closed-out trades that were profitable. |
TotalBarsLosTrade | AllTrades::LosingBars | Returns the total bars that elapsed during losing trades for all closed trades. |
TotalBarsWinTrade | AllTrades::WinningBars | Returns the total bars that elapsed during winning trades for all closed trades. |
TotalClosedPositions | AllTrades::TotalClosedPositions | Returns the total number of position changes to date, counting up the most recent flat position. |
TotalPositions | AllTrades::TotalPositions | Returns the total number of position changes to date. |
TotalTrades | AllTrades::TotalTrades | Returns the total number of trades made to date. |
Risk Management
SetStopContract | Sets the evaluation mode for build in stops to contract mode. |
SetStopMode | Sets the evaluation mode for build in stops. |
SetStopPosition | Sets the evaluation mode for build in stops to position mode. |
SetStopBreakEven | Activates the build in break even stop. |
SetStopLoss | Activates the build in stop loss. |
SetStopPercentTrailing | Activates the build in percent trailing stop. |
SetStopProfitTarget | Activates the build in profit target stop. |
SetStopProfitTrailing | Activates the build in profit trailing stop. |
SetTradingStatus | Controls how the trading engine is handling orders. |
GetTradingStatus | Returns the current state of the trading engine. |
Active Order Tracking
GetActiveOrderCommand | Returns the order command of an active order. |
GetActiveOrderCount | Returns the number of active orders. |
GetActiveOrderDate | Returns the Date value of an active order. |
GetActiveOrderDateTime | Returns the DateTime value of an active order. |
GetActiveOrderDetails | Returns the name of an active order. |
GetActiveOrderId | Returns the identifier of an active order. |
GetActiveOrderPrice | Returns the price attached to an active order. |
GetActiveOrderQuantity | Returns the quantity specified for an active order. |
GetActiveOrderTime | Returns the Time value of an active order. |
GetActiveOrderType | Returns the type of an active order. |
IsActiveImplicitExitOrder | Checks if an active order is an implicit exit order. |
Order Generation
IsStrategyOrdersActive | Returns true if orders can be generated on the current bar. |
TradingStartDate | Returns the date at which the trading engine starts trading. |
TradingEndDate | Returns the date at which the trading engine stops trading. |
Trading Properties
TradeProps::StartDate | Returns the date from which the trading engine started trading. |
TradeProps::EndDate | Returns the date at which the trading engine should stop trading. |
TradeProps::InitialCapital | Returns the specific percentage of the bar range used to create an artificial tick when a stop or limit order has been filled. |
TradeProps::TickSimulationPercent | Returns the specific percentage of the bar range used to create an artificial tick when a stop or limit order has been filled. |
TradeProps::OrderGenerationMode | Returns the mode which specifies when the strategies should generate new orders. |
TradeProps::FieldsForRealTimeFillPriceGeneration | Returns the fields from which prices are used to fill orders in realtime mode. |
TradeProps::SlippagePerTradeMode | Returns whether the specified slippage per trade is in percentage value or in absolute value. |
TradeProps::SlippagePerTradeValue | Returns What per trade slippage is be applied to each order when calculating profit. |
TradeProps::SlippagePerUnitMode | Returns whether the specified slippage per traded unit is in percentage value or in absolute value. |
TradeProps::SlippagePerUnitValue | Returns What per trade slippage is be applied to each traded unit when calculating profit. |
TradeProps::CommissionPerTradeMode | Returns whether the specified Commission per trade is in percentage value or in absolute value. |
TradeProps::CommissionPerTradeValue | Returns What per trade Commission is be applied to each order when calculating profit. |
TradeProps::CommissionPerUnitMode | Returns whether the specified Commission per traded unit is in percentage value or in absolute value. |
TradeProps::CommissionPerUnitValue | Returns What per trade Commission is be applied to each traded unit when calculating profit.] |
TradeProps::CommissionMin | Returns the minimum commission that can be applied to a single order. |
TradeProps::CommissionMax | Returns the Maximum commission that can be applied to a single order. |
TradeProps::DefaultTradeQuantity | Returns the default number of shares/contracts that will be traded with each order. |
TradeProps::MaxTotalPositionSize | Returns What the maximum position size should be. Orders that take the position beyond the specified size will not get placed. |
TradeProps::PyramidingMode | Returns whether orders are allowed to increase the current position without closing or reversing it. |
TradeProps::MaxOpenEntries | Returns maximum number of trades per order that can be opened at the same time. |
TradeProps::DefaultStopMode | Returns whether profit calculations for automatic exits should be based on the position profit or the per contract/share profit. |
TradeProps::DefaultProfitTarget | Returns the open profit that needs to be reached before the current position is exited. |
TradeProps::DefaultStopLoss | Returns what loss (calculated with the current open profit and the entry price) must be reached to automatically exit the position. |
TradeProps::DefaultBreakEvenStop | Returns value for open profit, which a stoploss is set to ensure that the trade breaks even. |
TradeProps::DefaultProfitTrailingStop | Returns what loss should occur from the current open profit before the position is exited. |
TradeProps::DefaultPercentTrailingFloor | Returns What open profit target needs to be reached before the percent trailiing stop is activated. |
TradeProps::DefaultPercentTrailingPercentage | Returns what percentage of the current open profit needs to be lost before the current position is exited. |
TradeProps::UseCommissionAndSlippageInAutomatedStops | Returns whether the commission and slippage values are to be taken into account when setting the prices and activation of stops and profit targets. |