Quant Share Language
Quant Share Language
Table of contents
1. QuantShare Language
1.1 Application Info
1.1.1 NbGroups
1.1.2 NbIndexes
1.1.3 NbIndustries
1.1.4 NbInGroup
1.1.5 NbInIndex
1.1.6 NbInIndustry
1.1.7 NbInMarket
1.1.8 NbInSector
1.1.9 NbMarkets
1.1.10 NbSectors
1.2 Candlestick Pattern
1.2.1 Cdl2crows (0)
1.2.2 Cdl2crows (1)
1.2.3 Cdl3blackcrows (0)
1.2.4 Cdl3blackcrows (1)
1.2.5 Cdl3inside (0)
1.2.6 Cdl3inside (1)
1.2.7 Cdl3linestrike (0)
1.2.8 Cdl3linestrike (1)
1.2.9 Cdl3outside (0)
1.2.10 Cdl3outside (1)
1.2.11 Cdl3staRsinsouth (0)
1.2.12 Cdl3staRsinsouth (1)
1.2.13 Cdl3whitesoldiers (0)
1.2.14 Cdl3whitesoldiers (1)
1.2.15 CdlAbandonedbaby (0)
1.2.16 CdlAbandonedbaby (1)
1.2.17 CdlAdvanceblock (0)
1.2.18 CdlAdvanceblock (1)
1.2.19 CdlBelthold (0)
1.2.20 CdlBelthold (1)
1.2.21 CdlBreakaway (0)
1.2.22 CdlBreakaway (1)
1.2.23 CdlClosingmarubozu (0)
1.2.24 CdlClosingmarubozu (1)
1.2.25 CdlConcealbabyswall (0)
1.2.26 CdlConcealbabyswall (1)
1.2.27 CdlCounterattack (0)
1.2.28 CdlCounterattack (1)
1.2.29 CdlDarkcloudcover (0)
1.2.30 CdlDarkcloudcover (1)
1.2.31 CdlDoji (0)
1.2.32 CdlDoji (1)
1.2.33 CdlDojistar (0)
1.2.34 CdlDojistar (1)
1.2.35 CdlDragonflydoji (0)
1.2.36 CdlDragonflydoji (1)
1.2.37 CdlEngulfing (0)
1.2.38 CdlEngulfing (1)
1.2.39 CdlEveningdojistar (0)
1.2.40 CdlEveningdojistar (1)
1.2.41 CdlEveningstar (0)
1.2.42 CdlEveningstar (1)
1.2.43 CdlGapsidesidewhite (0)
1.2.44 CdlGapsidesidewhite (1)
1.2.45 CdlGravestonedoji (0)
1.2.46 CdlGravestonedoji (1)
1.2.47 CdlHammer (0)
1.2.48 CdlHammer (1)
1.2.49 CdlHangingman (0)
1.2.50 CdlHangingman (1)
1.2.51 CdlHarami (0)
1.2.52 CdlHarami (1)
1.2.53 CdlHaramicross (0)
1.2.54 CdlHaramicross (1)
1.2.55 CdlHighwave (0)
1.2.56 CdlHighwave (1)
1.2.57 CdlHikkake (0)
1.2.58 CdlHikkake (1)
1.2.59 CdlHikkakemod (0)
1.2.60 CdlHikkakemod (1)
1.2.61 CdlHomingpigeon (0)
1.2.62 CdlHomingpigeon (1)
1.2.63 CdlIdentical3crows (0)
1.2.64 CdlIdentical3crows (1)
1.2.65 CdlInneck (0)
1.2.66 CdlInneck (1)
1.2.67 CdlInvertedhammer (0)
1.2.68 CdlInvertedhammer (1)
1.2.69 CdlKicking (0)
1.2.70 CdlKicking (1)
1.2.71 CdlKickingbylength (0)
1.2.72 CdlKickingbylength (1)
1.2.73 CdlLadderbottom (0)
1.2.74 CdlLadderbottom (1)
1.2.75 CdlLongleggeddoji (0)
1.2.76 CdlLongleggeddoji (1)
1.2.77 CdlLongline (0)
1.2.78 CdlLongline (1)
1.2.79 CdlMarubozu (0)
1.2.80 CdlMarubozu (1)
1.2.81 CdlMatchinglow (0)
1.2.82 CdlMatchinglow (1)
1.2.83 CdlMathold (0)
1.2.84 CdlMathold (1)
1.2.85 CdlMorningdojistar (0)
1.2.86 CdlMorningdojistar (1)
1.2.87 CdlMorningstar (0)
1.2.88 CdlMorningstar (1)
1.2.89 CdlOnneck (0)
1.2.90 CdlOnneck (1)
1.2.91 CdlPiercing (0)
1.2.92 CdlPiercing (1)
1.2.93 CdlRickshawman (0)
1.2.94 CdlRickshawman (1)
1.2.95 CdlRisefall3methods (0)
1.2.96 CdlRisefall3methods (1)
1.2.97 CdlSeparatinglines (0)
1.2.98 CdlSeparatinglines (1)
1.2.99 CdlShootingstar (0)
1.2.100 CdlShootingstar (1)
1.2.101 CdlShortline (0)
1.2.102 CdlShortline (1)
1.2.103 CdlSpinningtop (0)
1.2.104 CdlSpinningtop (1)
1.2.105 CdlStalledpattern (0)
1.2.106 CdlStalledpattern (1)
1.2.107 CdlSticksandwich (0)
1.2.108 CdlSticksandwich (1)
1.2.109 CdlTakuri (0)
1.2.110 CdlTakuri (1)
1.2.111 CdlTasukigap (0)
1.2.112 CdlTasukigap (1)
1.2.113 CdlThrusting (0)
1.2.114 CdlThrusting (1)
1.2.115 CdlTristar (0)
1.2.116 CdlTristar (1)
1.2.117 CdlUnique3river (0)
1.2.118 CdlUnique3river (1)
1.2.119 CdlUpsidegap2crows (0)
1.2.120 CdlUpsidegap2crows (1)
1.2.121 CdlXsidegap3methods (0)
1.2.122 CdlXsidegap3methods (1)
1.3 Charting
1.3.1 Plot1
1.3.2 Plot (0)
1.3.3 Plot (1)
1.3.4 Plot (2)
1.3.5 Plot (3)
1.3.6 PlotArrow
1.3.7 PlotCandleStick1
1.3.8 PlotCandleStick
1.3.9 PlotFixed
1.3.10 PlotSymbol
1.3.11 Print
1.3.12 PrintChart
1.3.13 SetHatchBrush
1.3.14 SetMaxScale
1.3.15 SetMinScale
1.3.16 SetPercentScale
1.3.17 SetScale
1.3.18 UpdateColor
1.3.19 UpdatePrintSettings
1.3.20 UpdateSettings
1.4 Columns
1.4.1 AddColumn (0)
1.4.2 AddColumn (1)
1.4.3 SetColumnColor
1.5 Composite
1.5.1 AddComposite
1.5.2 Comp (0)
1.5.3 Comp (1)
1.5.4 Comp (2)
1.5.5 Comp (3)
1.6 Database
1.6.1 GetData (0)
1.6.2 GetData (1)
1.6.3 GetData (2)
1.6.4 GetDataCount (0)
1.6.5 GetDataCount (1)
1.6.6 GetDataCountInside
1.6.7 GetDataExtern
1.6.8 GetDataIndex
1.6.9 GetDataIndexDP
1.6.10 GetDataInside
1.6.11 GetDataStringCount (0)
1.6.12 GetDataStringCount (1)
1.6.13 GetDataStringCountInside
1.6.14 IsDataExists
1.7 Date-Time
1.7.1 Year
1.7.2 Date
1.7.3 DateTicks
1.7.4 Day
1.7.5 DayOfWeek
1.7.6 DayOfYear
1.7.7 Hour
1.7.8 Interval
1.7.9 Minute
1.7.10 Month
1.7.11 NbDays
1.7.12 Now
1.7.13 Second
1.7.14 TimeTicks
1.7.15 Week
1.8 Divers
1.8.1 GetSeries (0)
1.8.2 GetSeries (1)
1.8.3 Output
1.8.4 OutputList
1.8.5 States
1.8.6 Ticker
1.8.7 Ticker1
1.9 Indicators
1.9.1 Ad (0)
1.9.2 Ad (1)
1.9.3 AdOsc (0)
1.9.4 AdOsc (1)
1.9.5 Adx (0)
1.9.6 Adx (1)
1.9.7 Adxr (0)
1.9.8 Adxr (1)
1.9.9 Apo (0)
1.9.10 Apo (1)
1.9.11 AroonDown (0)
1.9.12 AroonDown (1)
1.9.13 AroonOsc (0)
1.9.14 AroonOsc (1)
1.9.15 AroonUp (0)
1.9.16 AroonUp (1)
1.9.17 Atr (0)
1.9.18 Atr (1)
1.9.19 AvgPrice (0)
1.9.20 AvgPrice (1)
1.9.21 BbandsLower (0)
1.9.22 BbandsLower (1)
1.9.23 BbandsMiddle (0)
1.9.24 BbandsMiddle (1)
1.9.25 BbandsUpper (0)
1.9.26 BbandsUpper (1)
1.9.27 Bop (0)
1.9.28 Bop (1)
1.9.29 Cci (0)
1.9.30 Cci (1)
1.9.31 Cmo (0)
1.9.32 Cmo (1)
1.9.33 Correl (0)
1.9.34 Correl (1)
1.9.35 Dema (0)
1.9.36 Dema (1)
1.9.37 Dx (0)
1.9.38 Dx (1)
1.9.39 Ema (0)
1.9.40 Ema (1)
1.9.41 Fama (0)
1.9.42 Fama (1)
1.9.43 GapDown
1.9.44 GapUp
1.9.45 Hhv (0)
1.9.46 Hhv (1)
1.9.47 Ht_Dcperiod (0)
1.9.48 Ht_Dcperiod (1)
1.9.49 Ht_Dcphase (0)
1.9.50 Ht_Dcphase (1)
1.9.51 Ht_Leadsine (0)
1.9.52 Ht_Leadsine (1)
1.9.53 Ht_Phasorphase (0)
1.9.54 Ht_Phasorphase (1)
1.9.55 Ht_Phasorquadrature (0)
1.9.56 Ht_Phasorquadrature (1)
1.9.57 Ht_Sine (0)
1.9.58 Ht_Sine (1)
1.9.59 Ht_Trendline (0)
1.9.60 Ht_Trendline (1)
1.9.61 Ht_Trendmode (0)
1.9.62 Ht_Trendmode (1)
1.9.63 Inside
1.9.64 Kama (0)
1.9.65 Kama (1)
1.9.66 LinearReg (0)
1.9.67 LinearReg (1)
1.9.68 LinearReg_Angle (0)
1.9.69 LinearReg_Angle (1)
1.9.70 LinearReg_Intercept (0)
1.9.71 LinearReg_Intercept (1)
1.9.72 LinearReg_Slope (0)
1.9.73 LinearReg_Slope (1)
1.9.74 Llv (0)
1.9.75 Llv (1)
1.9.76 Ma (0)
1.9.77 Ma (1)
1.9.78 Macd (0)
1.9.79 Macd (1)
1.9.80 MacdExt (0)
1.9.81 MacdExt (1)
1.9.82 MacdExtHist (0)
1.9.83 MacdExtHist (1)
1.9.84 MacdExtSignal (0)
1.9.85 MacdExtSignal (1)
1.9.86 MacdHist (0)
1.9.87 MacdHist (1)
1.9.88 MacdSignal (0)
1.9.89 MacdSignal (1)
1.9.90 Mama (0)
1.9.91 Mama (1)
1.9.92 MedPrice (0)
1.9.93 MedPrice (1)
1.9.94 Mfi (0)
1.9.95 Mfi (1)
1.9.96 MidPoint (0)
1.9.97 MidPoint (1)
1.9.98 MidPrice (0)
1.9.99 MidPrice (1)
1.9.100 Minus_Di (0)
1.9.101 Minus_Di (1)
1.9.102 Minus_Dm (0)
1.9.103 Minus_Dm (1)
1.9.104 Mom (0)
1.9.105 Mom (1)
1.9.106 Natr (0)
1.9.107 Natr (1)
1.9.108 Obv (0)
1.9.109 Obv (1)
1.9.110 Outside
1.9.111 Plus_Di (0)
1.9.112 Plus_Di (1)
1.9.113 Plus_Dm (0)
1.9.114 Plus_Dm (1)
1.9.115 Ppo (0)
1.9.116 Ppo (1)
1.9.117 Roc (0)
1.9.118 Roc (1)
1.9.119 Rocp (0)
1.9.120 Rocp (1)
1.9.121 Rocr100 (0)
1.9.122 Rocr100 (1)
1.9.123 Rocr (0)
1.9.124 Rocr (1)
1.9.125 Rsi (0)
1.9.126 Rsi (1)
1.9.127 Sar (0)
1.9.128 Sar (1)
1.9.129 SarExt (0)
1.9.130 SarExt (1)
1.9.131 Sma (0)
1.9.132 Sma (1)
1.9.133 Stddev (0)
1.9.134 Stddev (1)
1.9.135 StochFastd (0)
1.9.136 StochFastd (1)
1.9.137 StochFastk (0)
1.9.138 StochFastk (1)
1.9.139 StochRsiFastd (0)
1.9.140 StochRsiFastd (1)
1.9.141 StochRsiFastk (0)
1.9.142 StochRsiFastk (1)
1.9.143 StochSlowd (0)
1.9.144 StochSlowd (1)
1.9.145 StochSlowk (0)
1.9.146 StochSlowk (1)
1.9.147 T3 (0)
1.9.148 T3 (1)
1.9.149 Tema (0)
1.9.150 Tema (1)
1.9.151 Trange (0)
1.9.152 Trange (1)
1.9.153 Trima (0)
1.9.154 Trima (1)
1.9.155 Trix (0)
1.9.156 Trix (1)
1.9.157 Tsf (0)
1.9.158 Tsf (1)
1.9.159 TypPrice (0)
1.9.160 TypPrice (1)
1.9.161 UltOsc (0)
1.9.162 UltOsc (1)
1.9.163 Var (0)
1.9.164 Var (1)
1.9.165 WclPrice (0)
1.9.166 WclPrice (1)
1.9.167 Willr (0)
1.9.168 Willr (1)
1.9.169 Wma (0)
1.9.170 Wma (1)
1.10 Math
1.10.1 Absolute
1.10.2 Atan
1.10.3 Avg (0)
1.10.4 Avg (1)
1.10.5 Ceil
1.10.6 Cos
1.10.7 Cosh
1.10.8 DivRem
1.10.9 Exp
1.10.10 Floor
1.10.11 Frac
1.10.12 IeeeRemainder
1.10.13 Int
1.10.14 Log10
1.10.15 Log
1.10.16 Max
1.10.17 Min
1.10.18 Pow
1.10.19 Random
1.10.20 Round
1.10.21 Sharpe
1.10.22 Sign
1.10.23 Sin
1.10.24 Sinh
1.10.25 Sqrt
1.10.26 Sum (0)
1.10.27 Sum (1)
1.10.28 Tan
1.10.29 Tanh
1.11 Optimal Signal
1.11.1 BSignal
1.11.2 BSignalLong
1.11.3 BSignalShort
1.11.4 EntryLongProfit
1.11.5 EntryLongProfitCond
1.11.6 EntryLongProfitCondExitRule
1.11.7 EntryLongProfitExitRule
1.11.8 EntryLongProfitPerBar
1.11.9 EntryLongProfitPerBarCond
1.11.10 EntryLongProfitPerBarCondExitRule
1.11.11 EntryLongProfitPerBarExitRule
1.11.12 EntryShortProfit
1.11.13 EntryShortProfitCond
1.11.14 EntryShortProfitCondExitRule
1.11.15 EntryShortProfitExitRule
1.11.16 EntryShortProfitPerBar
1.11.17 EntryShortProfitPerBarCond
1.11.18 EntryShortProfitPerBarCondExitRule
1.11.19 EntryShortProfitPerBarExitRule
1.12 Pre-calculated-value
1.12.1 GetPreCalculatedGlobal
1.12.2 GetPreCalculatedValue (0)
1.12.3 GetPreCalculatedValue (1)
1.12.4 GetPreCalculatedValueString (0)
1.12.5 GetPreCalculatedValueString (1)
1.12.6 PVal (0)
1.12.7 PVal (1)
1.12.8 PValG
1.12.9 PValS (0)
1.12.10 PValS (1)
1.13 Predictions
1.13.1 Predict
1.13.2 PredictSymbol
1.14 Ranking
1.14.1 Ranking
1.15 Rules
1.15.1 ApplyRule
1.16 Simulator
1.16.1 BuyPrice (0)
1.16.2 BuyPrice (1)
1.16.3 CoverPrice (0)
1.16.4 CoverPrice (1)
1.16.5 Drawdown
1.16.6 Equity
1.16.7 Optimize
1.16.8 SellPrice (0)
1.16.9 SellPrice (1)
1.16.10 SetSimCommission
1.16.11 SetSimLongRank
1.16.12 SetSimPeriods
1.16.13 SetSimRefSymbol
1.16.14 SetSimSetting
1.16.15 SetSimShortRank
1.16.16 SetSimStop
1.16.17 SetSimTiming
1.16.18 ShortPrice (0)
1.16.19 ShortPrice (1)
1.17 String
1.17.1 GetDataString
1.17.2 GetDataStringIndex
1.17.3 GetDataStringInside
1.17.4 IffStr
1.17.5 StringContains
1.17.6 StringEqual
1.17.7 StringExtract
1.17.8 StringExtractEnds
1.17.9 StringExtractStart
1.17.10 StringInsert
1.17.11 StringLength
1.17.12 StringReplace
1.18 Symbol Info
1.18.1 Address
1.18.2 Country
1.18.3 Currency
1.18.4 FullName
1.18.5 Group
1.18.6 Index
1.18.7 Industry
1.18.8 IsInList
1.18.9 Market
1.18.10 Name1
1.18.11 Name2
1.18.12 Name3
1.18.13 Name
1.18.14 Sector
1.18.15 Website
1.19 Technical
1.19.1 AMA
1.19.2 AvgIf (0)
1.19.3 AvgIf (1)
1.19.4 BarsSince
1.19.5 Count
1.19.6 Cross
1.19.7 GFun
1.19.8 GroupBy (0)
1.19.9 GroupBy (1)
1.19.10 GroupBy (2)
1.19.11 HhvLb (0)
1.19.12 HhvLb (1)
1.19.13 HighestSince (0)
1.19.14 HighestSince (1)
1.19.15 HighestSinceBars (0)
1.19.16 HighestSinceBars (1)
1.19.17 HistoPrice (0)
1.19.18 HistoPrice (1)
1.19.19 Iff
1.19.20 IsFalse
1.19.21 IsLastBar
1.19.22 IsNaN
1.19.23 IsNoNaN
1.19.24 IsNoZero
1.19.25 IsNull
1.19.26 IsTrue
1.19.27 LastNotNullValue
1.19.28 LastValue
1.19.29 LlvLb (0)
1.19.30 LlvLb (1)
1.19.31 LowestSince (0)
1.19.32 LowestSince (1)
1.19.33 LowestSinceBars (0)
1.19.34 LowestSinceBars (1)
1.19.35 LSwitch
1.19.36 NaNtoLast
1.19.37 NaNtoZero
1.19.38 Peak (0)
1.19.39 Peak (1)
1.19.40 PeakBars (0)
1.19.41 PeakBars (1)
1.19.42 Perf
1.19.43 PerfD
1.19.44 Rank
1.19.45 Ref
1.19.46 RefZero
1.19.47 RemoveSameSignals (0)
1.19.48 RemoveSameSignals (1)
1.19.49 RFun
1.19.50 SumIf (0)
1.19.51 SumIf (1)
1.19.52 TotalBars
1.19.53 Trough (0)
1.19.54 Trough (1)
1.19.55 TroughBars (0)
1.19.56 TroughBars (1)
1.19.57 Value
1.19.58 ValueWhen (0)
1.19.59 ValueWhen (1)
1.19.60 ZigZag
1.20 Time-frame
1.20.1 TimeframeApply
1.20.2 TimeframeCompress
1.20.3 TimeframeDecompress
1.20.4 TimeframeGetSeries1 (0)
1.20.5 TimeframeGetSeries1 (1)
1.20.6 TimeframeGetSeries
1.20.7 TimeframeRestore
1.20.8 TimeframeSet
1. QuantShare Language
1.1 Application Info
1.1.1 NbGroups
NBGROUPS Application Info
Number of groups
SYNTAX NbGroups()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the number of groups
ADDITIONAL
INFO
EXAMPLE NbGroups()
[TOP]
1.1.2 NbIndexes
NBINDEXES Application Info
Number of indices
SYNTAX NbIndexes()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the number of indexes
ADDITIONAL
INFO
EXAMPLE NbIndexes()
[TOP]
1.1.3 NbIndustries
NBINDUSTRIES Application Info
Number of industries
SYNTAX NbIndustries()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the number of industries
ADDITIONAL
INFO
EXAMPLE NbIndustries()
[TOP]
1.1.4 NbInGroup
NBINGROUP Application Info
Number of symbols in the specified group
1.1.5 NbInIndex
NBININDEX Application Info
Number of symbols in the specified index
1.1.6 NbInIndustry
NBININDUSTRY Application Info
Number of symbols in the specified industry
1.1.7 NbInMarket
NBINMARKET Application Info
Number of symbols in the specified market
1.1.8 NbInSector
NBINSECTOR Application Info
Number of symbols in the specified sector
1.1.9 NbMarkets
NBMARKETS Application Info
Number of markets
SYNTAX NbMarkets()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the number of markets
ADDITIONAL
INFO
EXAMPLE NbMarkets()
[TOP]
1.1.10 NbSectors
NBSECTORS Application Info
Number of sectors
SYNTAX NbSectors()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the number of sectors
ADDITIONAL
INFO
EXAMPLE NbSectors()
[TOP]
SYNTAX Cdl2crows()
RETURNS NUMERIC ARRAY
DESCRIPTION Two Crows, The Two Crows Pattern is a 3-day pattern.
ADDITIONAL Signal: Bearish
INFO Pattern: Reversal
Reliability: Medium
During an uptrend we see the market closing lower after an opening gap. Then
we see a black day that fills the gap creating the Bearish Two Crows Pattern. It
suggests the erosion of the uptrend, and warns about a possible trend reversal.
EXAMPLE Cdl2crows()
[TOP]
SYNTAX Cdl2crows( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Two Crows, The Two Crows Pattern is a 3-day pattern.
ADDITIONAL Signal: Bearish
INFO Pattern: Reversal
Reliability: Medium
During an uptrend we see the market closing lower after an opening gap. Then
we see a black day that fills the gap creating the Bearish Two Crows Pattern. It
suggests the erosion of the uptrend, and warns about a possible trend reversal.
EXAMPLE Cdl2crows(open, high, low, close)
[TOP]
SYNTAX Cdl3blackcrows()
RETURNS NUMERIC ARRAY
DESCRIPTION Three Black Crows, The Three Black Crows got their name from the
resemblance of three crows looking down from their perch from a tree.
ADDITIONAL Signal: Bearish
INFO Pattern: reversal
Reliability: high
Three long black days with each successive open being within the body of the
previous day and each successive close being below the previous day's and
near the day's low.
EXAMPLE Cdl3blackcrows()
[TOP]
SYNTAX Cdl3inside()
RETURNS NUMERIC ARRAY
DESCRIPTION Three Inside Up/Down, Note that after the long candle day that is in the same
direction of the trend that the Harami pattern occurs.
ADDITIONAL Signal: Bullish
INFO Pattern: reversal
Reliability: high
A bullish Harami pattern is followed by a white day that has a higher close than
the second day.
EXAMPLE Cdl3inside()
[TOP]
SYNTAX Cdl3inside( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Three Inside Up/Down, Note that after the long candle day that is in the same
direction of the trend that the Harami pattern occurs.
ADDITIONAL Signal: Bullish
INFO Pattern: reversal
Reliability: high
A bullish Harami pattern is followed by a white day that has a higher close than
the second day.
EXAMPLE Cdl3inside(open, high, low, close)
[TOP]
SYNTAX Cdl3linestrike()
RETURNS NUMERIC ARRAY
DESCRIPTION Three-Line Strike : This function is contained within the Pattern Recognition
set of indicators.
ADDITIONAL Three Line Strike Bullish
INFO Signal: Bullish
Pattern: continuation
Reliability: low
Identification
Three long white days with consecutively higher closes are followed by a
fourth day that gaps open in the direction of the trend and closes below the
open of the first day.
Three Line Strike Bearish
Signal: Bearish
Pattern: continuation
Reliability: low
Identification
Three long black days with consecutively lower closes is followed by a fourth
day that gaps in the direction of the trend and closes above the open of the first
day.
EXAMPLE Cdl3linestrike()
[TOP]
SYNTAX Cdl3linestrike( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Three-Line Strike : This function is contained within the Pattern Recognition
set of indicators.
ADDITIONAL Three Line Strike Bullish
INFO Signal: Bullish
Pattern: continuation
Reliability: low
Identification
Three long white days with consecutively higher closes are followed by a
fourth day that gaps open in the direction of the trend and closes below the
open of the first day.
Three Line Strike Bearish
Signal: Bearish
Pattern: continuation
Reliability: low
Identification
Three long black days with consecutively lower closes is followed by a fourth
day that gaps in the direction of the trend and closes above the open of the first
day.
EXAMPLE Cdl3linestrike(open, high, low, close)
[TOP]
SYNTAX Cdl3outside()
RETURNS NUMERIC ARRAY
DESCRIPTION Three Outside Up/Down : This function is contained within the Pattern
Recognition set of indicators.
ADDITIONAL Three Outside Down
INFO Signal: Bearish
Pattern: reversal
Reliability: high
Identification
A bearish Engulfing pattern is followed by a black day whose close is lower
than the second day.
Three Outside Up
Signal: Bullish
Pattern: reversal
Reliability: high
Identification
A bullish Engulfing pattern is followed by a white day whose close is higher
than the second day.
EXAMPLE Cdl3outside()
[TOP]
SYNTAX Cdl3outside( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Three Outside Up/Down : This function is contained within the Pattern
Recognition set of indicators.
ADDITIONAL Three Outside Down
INFO Signal: Bearish
Pattern: reversal
Reliability: high
Identification
A bearish Engulfing pattern is followed by a black day whose close is lower
than the second day.
Three Outside Up
Signal: Bullish
Pattern: reversal
Reliability: high
Identification
A bullish Engulfing pattern is followed by a white day whose close is higher
than the second day.
EXAMPLE Cdl3outside(open, high, low, close)
[TOP]
SYNTAX Cdl3staRsinsouth()
RETURNS NUMERIC ARRAY
DESCRIPTION Three Stars In The South, The slow down of the trend is visually obvious.
ADDITIONAL Signal: Bullish
INFO Pattern: reversal
Reliability: moderate
A long black day with a long lower shadow is followed by a similar but smaller
black day whose lower shadow is shallower than the first day. The third day is
a small Black Marubozu (open is the high of the day and the close is the low of
the day) that lies within the second day�s trading range.
EXAMPLE Cdl3staRsinsouth()
[TOP]
SYNTAX Cdl3whitesoldiers()
RETURNS NUMERIC ARRAY
DESCRIPTION Three Advancing White Soldiers, The Three White Soldiers (also known as
The Advancing Three White Soldiers) is a healthy market reversal pattern.
ADDITIONAL Signal: Bullish
INFO Pattern: reversal
Reliability: high
Three long white days with each successive open being within the body of the
previous day and each successive close being higher than the previous day and
near the day�s high.
EXAMPLE Cdl3whitesoldiers()
[TOP]
SYNTAX CdlAdvanceblock()
RETURNS NUMERIC ARRAY
DESCRIPTION Advance Block, The Advance Block is somewhat indicative as the Three White
Soldiers but it is a bearish signal.
ADDITIONAL Signal: Bearish
INFO Pattern: reversal
Reliability: moderate
Three white days. Each successive day opens within the body of the previous
day and closes above the previous day. The bodies of the candles get
progressively smaller with the upper shadows of day 2 and 3 getting
progressively longer.
EXAMPLE CdlAdvanceblock()
[TOP]
SYNTAX CdlBelthold()
RETURNS NUMERIC ARRAY
DESCRIPTION Belt-hold, The Belt Hold lines are formed by single candlesticks.
ADDITIONAL Belt Hold Bearish
INFO Signal: Bearish
Pattern: reversal
Reliability: low
Identification
A black day occurs with no upper shadow and a close near the day's low.
Belt Hold Bullish
Signal: Bullish
Pattern: reversal
Reliability: low
Identification
A white day occurs with no lower shadow and a close near the day�s high.
EXAMPLE CdlBelthold()
[TOP]
SYNTAX CdlBelthold( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Belt-hold, The Belt Hold lines are formed by single candlesticks.
ADDITIONAL Belt Hold Bearish
INFO Signal: Bearish
Pattern: reversal
Reliability: low
Identification
A black day occurs with no upper shadow and a close near the day's low.
Belt Hold Bullish
Signal: Bullish
Pattern: reversal
Reliability: low
Identification
A white day occurs with no lower shadow and a close near the day�s high.
EXAMPLE CdlBelthold(open, high, low, close)
[TOP]
SYNTAX CdlBreakaway()
RETURNS NUMERIC ARRAY
DESCRIPTION Breakaway, If a trend has been evident, the breakaway pattern, whether bullish
or bearish initially indicates the acceleration of that trend.
ADDITIONAL Bullish Breakaway
INFO Signal: Bullish
Pattern: Reversal
Reliability: Medium
Identification
There is a downtrend but we also see that the prices bottom out and level off
now. The result is a long white candlestick that however does not close the
initial downward gap of the first and second days. This suggests a short-term
reversal.
Bearish Breakaway
Signal: Bearish
Pattern: Reversal
Reliability: Medium
Identification
We see this pattern during an uptrend marked with a bullish surge that
eventually weakens. This weakening is illustrated by a long black candlestick
that is unable to close the gap into the body of the first day. These events warn
us about a short-term reversal.
EXAMPLE CdlBreakaway()
[TOP]
SYNTAX CdlBreakaway( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Breakaway, If a trend has been evident, the breakaway pattern, whether bullish
or bearish initially indicates the acceleration of that trend.
ADDITIONAL Bullish Breakaway
INFO Signal: Bullish
Pattern: Reversal
Reliability: Medium
Identification
There is a downtrend but we also see that the prices bottom out and level off
now. The result is a long white candlestick that however does not close the
initial downward gap of the first and second days. This suggests a short-term
reversal.
Bearish Breakaway
Signal: Bearish
Pattern: Reversal
Reliability: Medium
Identification
We see this pattern during an uptrend marked with a bullish surge that
eventually weakens. This weakening is illustrated by a long black candlestick
that is unable to close the gap into the body of the first day. These events warn
us about a short-term reversal.
EXAMPLE CdlBreakaway(open, high, low, close)
[TOP]
SYNTAX CdlClosingmarubozu()
RETURNS NUMERIC ARRAY
DESCRIPTION Closing Marubozu, a Closing Marubozu has no shadow at it's closing end.
ADDITIONAL Black Closing marubozu
INFO Signal: Bearish
Pattern: Reversal/Continuation
Reliability: Low
Identification:
The Black Closing Marubozu is a single candlestick pattern characterized by its
long black body. It does not have a lower shadow but it has an upper shadow. It
is an extremely strong bearish candlestick pattern.
White Closing Marubozu
Signal: Bullish
Pattern: Reversal/Continuation
Reliability: Low
Identification:
The White Closing Marubozu is a single candlestick pattern characterized by a
long white body with no upper shadow. This is an extremely strong bullish
candlestick pattern.
EXAMPLE CdlClosingmarubozu()
[TOP]
SYNTAX CdlConcealbabyswall()
RETURNS NUMERIC ARRAY
DESCRIPTION Concealing Baby Swallow, The first two days of the signal, two Black
Marubozus, demonstrate the continuation of the downtrend.
ADDITIONAL Signal: Bullish
INFO Pattern: reversal
Reliability: high
The first two days are Black Marubozu days (open is the high of the day and
the close is the low of the day). The following day is a black day that gaps in
the same direction but trades up into the body of the second day. The final day
is a Black Marubozu that gaps up and sells off to engulf the third day.
EXAMPLE CdlConcealbabyswall()
[TOP]
SYNTAX CdlCounterattack()
RETURNS NUMERIC ARRAY
DESCRIPTION Counterattack, Meeting Lines (or Counterattack Lines) are formed when
opposite coloured bodies have the same closing price.
ADDITIONAL A counter attack pattern is formed when opposite colour candles share the same
INFO clse.
This two candle pattern can be bullish or bearish depending where the pattern
appears.
The counter attack pattern warns that the tide is turning.
EXAMPLE CdlCounterattack()
[TOP]
SYNTAX CdlDoji()
RETURNS NUMERIC ARRAY
DESCRIPTION Doji, the Doji is one of the most important signals in candlestick analysis.
ADDITIONAL Doji
INFO Signal: Indecision
Pattern: Reversal/Continuation
Reliability: Low
Identification:
If a security has virtually equal opening and closing prices, this leads to a Doji.
The length of the upper and lower shadows of a Doji can vary and
consequently the resulting candlestick may look like a cross, inverted cross or a
plus sign. Doji, taken alone, is a neutral pattern.
EXAMPLE CdlDoji()
[TOP]
SYNTAX CdlDoji( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Doji, the Doji is one of the most important signals in candlestick analysis.
ADDITIONAL Doji
INFO Signal: Indecision
Pattern: Reversal/Continuation
Reliability: Low
Identification:
If a security has virtually equal opening and closing prices, this leads to a Doji.
The length of the upper and lower shadows of a Doji can vary and
consequently the resulting candlestick may look like a cross, inverted cross or a
plus sign. Doji, taken alone, is a neutral pattern.
EXAMPLE CdlDoji(open, high, low, close)
[TOP]
SYNTAX CdlDojistar()
RETURNS NUMERIC ARRAY
DESCRIPTION Doji Star, Upon seeing a Doji in an overbought or oversold condition, an
extremely high probability reversal situation becomes evident.
ADDITIONAL Doji Star Bullish
INFO Signal: Bullish
Pattern: reversal
Reliability: moderate
Identification
A long black day is followed by a Doji that gaps in the direction of the trend.
The shadows of the Doji should not be long.
Doji Star Bearish
Signal: Bearish
Pattern: reversal
Reliability: moderate
Identification
A long white day is followed by a Doji that gaps in the direction of the trend.
The shadows of the Doji should not be long.
EXAMPLE CdlDojistar()
[TOP]
SYNTAX CdlDojistar( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Doji Star, Upon seeing a Doji in an overbought or oversold condition, an
extremely high probability reversal situation becomes evident.
ADDITIONAL Doji Star Bullish
INFO Signal: Bullish
Pattern: reversal
Reliability: moderate
Identification
A long black day is followed by a Doji that gaps in the direction of the trend.
The shadows of the Doji should not be long.
Doji Star Bearish
Signal: Bearish
Pattern: reversal
Reliability: moderate
Identification
A long white day is followed by a Doji that gaps in the direction of the trend.
The shadows of the Doji should not be long.
EXAMPLE CdlDojistar(open, high, low, close)
[TOP]
SYNTAX CdlDragonflydoji()
RETURNS NUMERIC ARRAY
DESCRIPTION Dragonfly Doji, The Dragonfly Doji occurs when trading opens, trades lower,
then closes at the open price which is the high of the day.
ADDITIONAL Dragonfly Doji Bearish
INFO Signal: Bearish
Pattern: reversal
Reliability: low/moderate
Identification
A Doji forms at the upper end of a trading range with a long lower shadow (the
longer the more bearish) with no, or almost no upper shadow.
Dragonfly Doji Bullish
Signal: Bullish
Pattern: reversal
Reliability: low/moderate
Identification
A Doji forms at the upper end of the trading range with a long lower shadow
(the longer the more bullish).
EXAMPLE CdlDragonflydoji()
[TOP]
SYNTAX CdlEngulfing()
RETURNS NUMERIC ARRAY
DESCRIPTION Engulfing Pattern, Two of the most compelling candlestick signals are the
Bullish Engulfing Pattern and Bearish Engulfing Pattern.
ADDITIONAL Engulfing Bullish
INFO Signal: Bullish
Pattern: reversal
Reliability: moderate
Identification
A black day is completely �engulfed� by a large white day that gaps
below the black day�s low and rallies to close above its high.
Engulfing Bearish
Signal: Bearish
Pattern: reversal
Reliability: moderate
Identification
A white day is then completely �engulfed� by a large black day which
gaps above the white day's high and closes below its low.
EXAMPLE CdlEngulfing()
[TOP]
SYNTAX CdlEngulfing( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Engulfing Pattern, Two of the most compelling candlestick signals are the
Bullish Engulfing Pattern and Bearish Engulfing Pattern.
ADDITIONAL Engulfing Bullish
INFO Signal: Bullish
Pattern: reversal
Reliability: moderate
Identification
A black day is completely �engulfed� by a large white day that gaps
below the black day�s low and rallies to close above its high.
Engulfing Bearish
Signal: Bearish
Pattern: reversal
Reliability: moderate
Identification
A white day is then completely �engulfed� by a large black day which
gaps above the white day's high and closes below its low.
EXAMPLE CdlEngulfing(open, high, low, close)
[TOP]
SYNTAX CdlGapsidesidewhite()
RETURNS NUMERIC ARRAY
DESCRIPTION Up/Down-gap side-by-side white lines, The Up Side By Side White Lines
Pattern appears in a bullish market.
ADDITIONAL Side By Side White Lines Bearish
INFO Signal: Bearish
Pattern: continuation
Reliability: moderate
Identification
A black day is followed by a white day that gaps in the direction of the trend.
The third candle is also white and is almost identical to the previous day.
Side by Side White Lines Bullish
Signal: Bullish
Pattern: reversal
Reliability: high
Identification
A white day is followed by another white day that gaps in the direction of the
trend. The third candle is also white and is almost identical to the previous day.
EXAMPLE CdlGapsidesidewhite()
[TOP]
SYNTAX CdlGravestonedoji()
RETURNS NUMERIC ARRAY
DESCRIPTION Gravestone Doji, The Gravestone Doji is formed when the open and the close
occur at the low end of the trading range.
ADDITIONAL Gravestone Doji Bearish
INFO Signal: Bearish
Pattern: reversal
Reliability: low/moderate
Identification
A Doji forms at the lower end of the trading range. The upper shadow is
usually long while the lower shadow is small or almost nonexistent.
Gravestone Doji Bullish
Signal: Bullish
Pattern: reversal
Reliability: low/moderate
Identification
A Doji forms at the lower end of the trading range. The upper shadow is
usually long while the lower shadow is small or almost nonexistent.
EXAMPLE CdlGravestonedoji()
[TOP]
SYNTAX CdlHammer()
RETURNS NUMERIC ARRAY
DESCRIPTION Hammer, The Hammer is comprised of one candle.
ADDITIONAL Hammer Bullish
INFO Signal: Bullish
Pattern: reversal
Reliability: low/moderate
Identification
A small real body forms at the upper end of a trading range with a long lower
shadow (the longer the more bullish) with no, or almost no upper shadow.
EXAMPLE CdlHammer()
[TOP]
SYNTAX CdlHammer( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Hammer, The Hammer is comprised of one candle.
ADDITIONAL Hammer Bullish
INFO Signal: Bullish
Pattern: reversal
Reliability: low/moderate
Identification
A small real body forms at the upper end of a trading range with a long lower
shadow (the longer the more bullish) with no, or almost no upper shadow.
EXAMPLE CdlHammer(open, high, low, close)
[TOP]
SYNTAX CdlHangingman()
RETURNS NUMERIC ARRAY
DESCRIPTION Hanging Man, The Hanging Man is also comprised of one candle.
ADDITIONAL Hanging Man Bearish
INFO Signal: Bearish
Pattern: reversal
Reliability: low/moderate
Identification
A small real body forms at the upper end of the trading range with a long lower
shadow (the longer the more bearish) with no, or almost no upper shadow.
EXAMPLE CdlHangingman()
[TOP]
SYNTAX CdlHarami()
RETURNS NUMERIC ARRAY
DESCRIPTION Harami Pattern, The Harami is an often seen formation.
ADDITIONAL Harami Bullish
INFO Signal: Bullish
Pattern: reversal
Reliability: low
Identification
A long black day is followed by a white day which gaps opposite the trend and
is completely engulfed by the real body of the first day.
EXAMPLE CdlHarami()
[TOP]
SYNTAX CdlHarami( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Harami Pattern, The Harami is an often seen formation.
ADDITIONAL Harami Bullish
INFO Signal: Bullish
Pattern: reversal
Reliability: low
Identification
A long black day is followed by a white day which gaps opposite the trend and
is completely engulfed by the real body of the first day.
EXAMPLE CdlHarami(open, high, low, close)
[TOP]
SYNTAX CdlHaramicross()
RETURNS NUMERIC ARRAY
DESCRIPTION Harami Cross Pattern, A two day pattern similar to the Harami (see
CDLHARAMI() ), the difference is that the last day is a Doji.
ADDITIONAL Harami Cross Bullish
INFO Signal: Bullish
Pattern: reversal
Reliability: low
Identification
A long black day is followed by a Doji which gaps opposite the trend and is
completely engulfed by the real body of the first day.
Harami Cross Bearish
Signal: Bearish
Pattern: reversal
Reliability: moderate
Identification
A long white day is followed by a Doji that gaps down and is completely
engulfed by the real body of the first day.
EXAMPLE CdlHaramicross()
[TOP]
SYNTAX CdlHighwave()
RETURNS NUMERIC ARRAY
DESCRIPTION High-Wave Candle : This function is contained within the Pattern Recognition
set of indicators.
ADDITIONAL High Wave
INFO Signal: Indecision
Pattern: Reversal
Reliability: Medium
Identification:
High Wave is a type of candlestick characterized with either a very long upper
or a lower shadow. It has only a short real body. A group of these patterns may
signal a market turn.
EXAMPLE CdlHighwave()
[TOP]
SYNTAX CdlHighwave( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION High-Wave Candle : This function is contained within the Pattern Recognition
set of indicators.
ADDITIONAL High Wave
INFO Signal: Indecision
Pattern: Reversal
Reliability: Medium
Identification:
High Wave is a type of candlestick characterized with either a very long upper
or a lower shadow. It has only a short real body. A group of these patterns may
signal a market turn.
EXAMPLE CdlHighwave(open, high, low, close)
[TOP]
SYNTAX CdlHikkake()
RETURNS NUMERIC ARRAY
DESCRIPTION Hikkake Pattern
ADDITIONAL
INFO
EXAMPLE CdlHikkake()
[TOP]
SYNTAX CdlHikkake( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Hikkake Pattern
ADDITIONAL
INFO
EXAMPLE CdlHikkake(open, high, low, close)
[TOP]
SYNTAX CdlHikkakemod()
RETURNS NUMERIC ARRAY
DESCRIPTION Modified Hikkake Pattern
ADDITIONAL
INFO
EXAMPLE CdlHikkakemod()
[TOP]
SYNTAX CdlHomingpigeon()
RETURNS NUMERIC ARRAY
DESCRIPTION Homing Pigeon, The Homing Pigeon is the same as the Harami, except for the
colour of the second day's body.
ADDITIONAL Homing Pigeon bullish
INFO Signal: Bullish
Pattern: reversal
Reliability: moderate
Identification
A long black day is followed by another black day which gaps opposite the
trend and is completely engulfed by the real body of the first day.
EXAMPLE CdlHomingpigeon()
[TOP]
SYNTAX CdlIdentical3crows()
RETURNS NUMERIC ARRAY
DESCRIPTION Identical Three Crows, The Three Identical Crows have the same criteria as the
Three Black Crows.
ADDITIONAL Identical Three Crows Bearish
INFO Signal: Bearish
Pattern: reversal
Reliability: high
Identification
Three black days with each day opening where the previous day closed.
EXAMPLE CdlIdentical3crows()
[TOP]
SYNTAX CdlInneck()
RETURNS NUMERIC ARRAY
DESCRIPTION In-Neck Pattern, The In Neck pattern is almost a Meeting Line pattern.
ADDITIONAL In Neck Bearish
INFO Signal: Bearish
Pattern: continuation
Reliability: moderate
Identification
A long black day is followed by a long white day that gaps down at the open
and closes at the same price as the black day.
EXAMPLE CdlInneck()
[TOP]
SYNTAX CdlInneck( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION In-Neck Pattern, The In Neck pattern is almost a Meeting Line pattern.
ADDITIONAL In Neck Bearish
INFO Signal: Bearish
Pattern: continuation
Reliability: moderate
Identification
A long black day is followed by a long white day that gaps down at the open
and closes at the same price as the black day.
EXAMPLE CdlInneck(open, high, low, close)
[TOP]
SYNTAX CdlInvertedhammer()
RETURNS NUMERIC ARRAY
DESCRIPTION Inverted Hammer, The Inverted Hammer is comprised of one candle.
ADDITIONAL Inverted Hammer Bullish
INFO Signal: Bullish
Pattern: reversal
Reliability: low/moderate
Identification
A small real body forms at the lower end of the trading range. The upper
shadow is usually no more than twice as long as the real body and there is no or
almost no lower shadow.
EXAMPLE CdlInvertedhammer()
[TOP]
SYNTAX CdlKicking()
RETURNS NUMERIC ARRAY
DESCRIPTION Kicking, The Kicker signal is the most powerful signal of all.
ADDITIONAL Kicking Bearish
INFO Signal: Bearish
Pattern: reversal
Reliability: high
Identification
A White Marubuzo (opens at low and closes at high) is followed by a Black
Marubuzo (opens at high and closes at low) that gaps down.
Kicking Bullish
Signal: Bullish
Pattern: reversal
Reliability: high
Identification:
A Black Marubuzo (open is the high of the day and the close is the low of the
day) day is followed by a White Marubuzo (open is the low of the day and the
close is the high of the day) day that gaps in the opposite direction.
EXAMPLE CdlKicking()
[TOP]
SYNTAX CdlKicking( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Kicking, The Kicker signal is the most powerful signal of all.
ADDITIONAL Kicking Bearish
INFO Signal: Bearish
Pattern: reversal
Reliability: high
Identification
A White Marubuzo (opens at low and closes at high) is followed by a Black
Marubuzo (opens at high and closes at low) that gaps down.
Kicking Bullish
Signal: Bullish
Pattern: reversal
Reliability: high
Identification:
A Black Marubuzo (open is the high of the day and the close is the low of the
day) day is followed by a White Marubuzo (open is the low of the day and the
close is the high of the day) day that gaps in the opposite direction.
EXAMPLE CdlKicking(open, high, low, close)
[TOP]
SYNTAX CdlKickingbylength()
RETURNS NUMERIC ARRAY
DESCRIPTION Kicking - bull/bear determined by the longer marubozu, The Kicker signal is
the most powerful signal of all.
ADDITIONAL
INFO
EXAMPLE CdlKickingbylength()
[TOP]
SYNTAX CdlLadderbottom()
RETURNS NUMERIC ARRAY
DESCRIPTION Ladder Bottom, The downtrend is finishing with four consecutive black
candles, each closing lower than the previous day.
ADDITIONAL Ladder Bottom Bullish
INFO Signal: Bullish
Pattern: reversal
Reliability: moderate
Identification
Three black days with successive lower opens and lower closes. Then a black
day forms with some noticeably upper shadow. The final day is a white day
that gaps against the trend and opens above the body of the fourth day.
EXAMPLE CdlLadderbottom()
[TOP]
SYNTAX CdlLongleggeddoji()
RETURNS NUMERIC ARRAY
DESCRIPTION Long Legged Doji, The Long-legged Doji is composed of long upper and lower
shadows.
ADDITIONAL Long Legged Doji
INFO Signal: Indecision
Pattern: Reversal
Reliability: Medium
Identification:
Long Legged Doji is characterized by very long shadows. It is an important
reversal signal.
Bullish Long Legged Doji
Signal: Bullish
Pattern: Reversal
Reliability: Medium
Identification:
Long Legged Doji is a doji characterized with very long shadows. It shows the
indecision of the buyers and sellers. It is one of the important reversal signals.
Bearish Long Legged Doji
Signal: Bearish
Pattern: Reversal
Reliability: Medium
Identification:
Long Legged Doji is a doji characterized by very long shadows. It shows the
indecision of the buyers and sellers and it is an important reversal signal.
EXAMPLE CdlLongleggeddoji()
[TOP]
SYNTAX CdlLongline()
RETURNS NUMERIC ARRAY
DESCRIPTION Long Line Candle, A long day (LONGLINE) represents a large price move
from open to close.
ADDITIONAL Long Line Candle
INFO Signal: Indecision
Pattern: Reversal
Reliability: Low
Identification:
A long day (Long Line Candle) represents a large price move from open to
close.
EXAMPLE CdlLongline()
[TOP]
SYNTAX CdlLongline( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Long Line Candle, A long day (LONGLINE) represents a large price move
from open to close.
ADDITIONAL Long Line Candle
INFO Signal: Indecision
Pattern: Reversal
Reliability: Low
Identification:
A long day (Long Line Candle) represents a large price move from open to
close.
EXAMPLE CdlLongline(open, high, low, close)
[TOP]
SYNTAX CdlMarubozu()
RETURNS NUMERIC ARRAY
DESCRIPTION Marubozu, in Japanese, Marubozu means close cropped or close-cut.
ADDITIONAL Black Marubozu
INFO Signal: Bearish
Pattern: Reversal/Continuation
Reliability: Low
Identification:
The Black Marubozu is a single candlestick pattern characterized by a long
black body. It does not have any shadows on either end. It is an extremely
strong bearish candlestick pattern.
White Marubozu
Signal: Bullish
Pattern: Reversal/Continuation
Reliability: Low
Identification:
The White Marubozu is a single candlestick pattern characterized with a long
white body having no shadows on either end. It is an extremely strong bullish
candlestick pattern.
EXAMPLE CdlMarubozu()
[TOP]
SYNTAX CdlMarubozu( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Marubozu, in Japanese, Marubozu means close cropped or close-cut.
ADDITIONAL Black Marubozu
INFO Signal: Bearish
Pattern: Reversal/Continuation
Reliability: Low
Identification:
The Black Marubozu is a single candlestick pattern characterized by a long
black body. It does not have any shadows on either end. It is an extremely
strong bearish candlestick pattern.
White Marubozu
Signal: Bullish
Pattern: Reversal/Continuation
Reliability: Low
Identification:
The White Marubozu is a single candlestick pattern characterized with a long
white body having no shadows on either end. It is an extremely strong bullish
candlestick pattern.
EXAMPLE CdlMarubozu(open, high, low, close)
[TOP]
SYNTAX CdlMatchinglow()
RETURNS NUMERIC ARRAY
DESCRIPTION Matching Low, The Matching Low pattern is similar to the Homing Pigeon
patter, the exception being that the two days of the pattern close on their lows,
at the same level.
ADDITIONAL Matching Low Bullish
INFO Signal: Bullish
Pattern: reversal
Reliability: high
Identification
A long black day is followed by another black day with equivalent closes both
days.
EXAMPLE CdlMatchinglow()
[TOP]
SYNTAX CdlMathold( ARRAY open, ARRAY high, ARRAY low, ARRAY close,
ARRAY penetration)
RETURNS NUMERIC ARRAY
DESCRIPTION Mat Hold, The pattern appears during an uptrend, which is further confirmed
by the first long white candlestick.
ADDITIONAL Mat Hold Bullish
INFO Signal: Bullish
Pattern: continuation
Reliability: high
Identification
A long white day in an uptrend is followed by a relatively small black day that
gaps in the direction of the trend. The next two days continue the brief pullback
and are small days that stay within the range of the first day. The fifth day is a
long white day that closes above the close of the first day and continues the
uptrend.
EXAMPLE CdlMathold(open, high, low, close, 14)
[TOP]
SYNTAX CdlOnneck()
RETURNS NUMERIC ARRAY
DESCRIPTION On-Neck Pattern, The On Neck Line pattern is almost a 'meeting line pattern',
but the critical term is 'almost'.
ADDITIONAL On Neck Bearish
INFO Signal: Bearish
Pattern: continuation
Reliability: moderate
Identification
A long black day is followed by a long white day that gaps down at the open
and closes below the close of the black day.
EXAMPLE CdlOnneck()
[TOP]
SYNTAX CdlOnneck( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION On-Neck Pattern, The On Neck Line pattern is almost a 'meeting line pattern',
but the critical term is 'almost'.
ADDITIONAL On Neck Bearish
INFO Signal: Bearish
Pattern: continuation
Reliability: moderate
Identification
A long black day is followed by a long white day that gaps down at the open
and closes below the close of the black day.
EXAMPLE CdlOnneck(open, high, low, close)
[TOP]
SYNTAX CdlPiercing()
RETURNS NUMERIC ARRAY
DESCRIPTION Piercing Pattern, The Piercing Pattern is composed of a two-candle formation
in a down trending market.
ADDITIONAL Piercing Line Bullish
INFO Signal: Bullish
Pattern: reversal
Reliability: moderate
Identification
A long black day is followed by a white day that gaps below the black day�s
low and closes within and above the midpoint of the black day�s body.
EXAMPLE CdlPiercing()
[TOP]
SYNTAX CdlPiercing( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Piercing Pattern, The Piercing Pattern is composed of a two-candle formation
in a down trending market.
ADDITIONAL Piercing Line Bullish
INFO Signal: Bullish
Pattern: reversal
Reliability: moderate
Identification
A long black day is followed by a white day that gaps below the black day�s
low and closes within and above the midpoint of the black day�s body.
EXAMPLE CdlPiercing(open, high, low, close)
[TOP]
SYNTAX CdlRickshawman()
RETURNS NUMERIC ARRAY
DESCRIPTION Rickshaw Man, Rickshaw man is a specific type of long-legged doji where the
open and close are in the middle of the price range.
ADDITIONAL Rickshaw Man
INFO Signal: Indecision
Pattern: Reversal
Reliability: Medium
Identification:
Rickshaw man is a specific type of long-legged doji where the open and close
are in the middle of the price range.
EXAMPLE CdlRickshawman()
[TOP]
SYNTAX CdlRisefall3methods()
RETURNS NUMERIC ARRAY
DESCRIPTION Rising/Falling Three Methods, The Falling Three Method is basically the
opposite of the Rising Three Method, The market has been in a downtrend.
ADDITIONAL Rising Three Methods Bullish
INFO Signal: Bullish
Pattern: continuation
Reliability: high
Identification
A long white day in an uptrend is followed by three relatively small candles
that move opposite the overall trend but stay within the range of the first day.
The fifth day is a long white day that closes above the close of the first day and
continues the uptrend.
Fallling Three Methods Bearish
Signal: Bearish
Pattern: continuation
Reliability: high
Identification
A long black day in a downtrend is followed by three relatively small candles
that move opposite the overall trend but stay within the range of the first day.
The fifth day is a long black day that closes below the close of the first day and
continues the downtrend.
EXAMPLE CdlRisefall3methods()
[TOP]
SYNTAX CdlSeparatinglines()
RETURNS NUMERIC ARRAY
DESCRIPTION Separating Lines, You can identify it from the following points: The first day is
a long white candle.
ADDITIONAL Separating Lines Bullish
INFO Signal: Bullish
Pattern: continuation
Reliability: low
Identification
A black day is followed by a white day that has the same opening price.
Separating Lines Bearish
Signal: Bearish
Pattern: continuation
Reliability: low
Identification
A white day is followed by a black day that has the same opening price.
EXAMPLE CdlSeparatinglines()
[TOP]
SYNTAX CdlShootingstar()
RETURNS NUMERIC ARRAY
DESCRIPTION Shooting Star, The Shooting Star is comprised of one candle.
ADDITIONAL Shooting Star Bearish
INFO Signal: Bearish
Pattern: reversal
Reliability: low/moderate
Identification
A small body forms at the lower end of the trading range. The upper shadow is
usually long while the lower shadow is small or almost nonexistent.
EXAMPLE CdlShootingstar()
[TOP]
SYNTAX CdlShortline()
RETURNS NUMERIC ARRAY
DESCRIPTION Short Line Candle, Short days (SHORTLINES) can be interpreted by the same
analytical process of the long candles.
ADDITIONAL Short Line Candle
INFO Signal: Indecision
Pattern: Reversal
Reliability: Low
Identification:
Short days (Short Line Candle) represents a small price move from open to
close.
EXAMPLE CdlShortline()
[TOP]
SYNTAX CdlShortline( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Short Line Candle, Short days (SHORTLINES) can be interpreted by the same
analytical process of the long candles.
ADDITIONAL Short Line Candle
INFO Signal: Indecision
Pattern: Reversal
Reliability: Low
Identification:
Short days (Short Line Candle) represents a small price move from open to
close.
EXAMPLE CdlShortline(open, high, low, close)
[TOP]
SYNTAX CdlSpinningtop()
RETURNS NUMERIC ARRAY
DESCRIPTION Spinning Top, spinning Tops are depicted with small bodies relative to the
shadows.
ADDITIONAL White Spinning Top
INFO Signal: Indecision
Pattern: Reversal/Continuation
Reliability: Low
Identification:
The White Spinning Top is a single candlestick pattern. Its shape is a small
white body with upper and lower shadows that have a greater length than the
body's length.
Black Spinning Top
Signal: Indecision
Pattern: Reversal/Continuation
Reliability: Low
Identification:
The Black Spinning Top is a single candlestick pattern. Its shape is a small
black body with upper and lower shadows having a greater length than the
body's length.
EXAMPLE CdlSpinningtop()
[TOP]
SYNTAX CdlStalledpattern()
RETURNS NUMERIC ARRAY
DESCRIPTION Stalled Pattern, Another pattern close to the Three White Soldiers pattern is the
Stalled Pattern (commonly known as the Deliberation pattern).
ADDITIONAL Stalled Pattern or Deliberation pattern
INFO Signal: Bearish
Pattern: Reversal
Reliability: Medium
Identification:
The Bearish Deliberation Pattern is a derivative of the Bearish Three White
Soldiers Pattern. This pattern also shows a weakness similar to the Bearish
Advance Block Pattern since it becomes weaker in a short period of time.
However here the weakness occurs all at once on the third day. The small third
body of the pattern shows that the rally is losing strength and a reversal is
possible.
EXAMPLE CdlStalledpattern()
[TOP]
SYNTAX CdlSticksandwich()
RETURNS NUMERIC ARRAY
DESCRIPTION Stick Sandwich, The Stick Sandwich looks somewhat like an ice cream
sandwich.
ADDITIONAL Bullish Stick Sandwich
INFO Signal: Bullish
Pattern: Reversal
Reliability: Medium
Identification:
The Bullish Stick Sandwich Pattern is characterized by consecutive higher
opens for three days, but results in an eventual close equal to the first day's
close. It may warn that prices are now finding a support price. We may then see
a reversal from this support level.
EXAMPLE CdlSticksandwich()
[TOP]
SYNTAX CdlTakuri()
RETURNS NUMERIC ARRAY
DESCRIPTION Takuri (Dragonfly Doji with very long lower shadow) : This function is
contained within the Pattern Recognition set of indicators.
ADDITIONAL Dragonfly Doji with very long lower shadow
INFO
EXAMPLE CdlTakuri()
[TOP]
SYNTAX CdlTakuri( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Takuri (Dragonfly Doji with very long lower shadow) : This function is
contained within the Pattern Recognition set of indicators.
ADDITIONAL Dragonfly Doji with very long lower shadow
INFO
EXAMPLE CdlTakuri(open, high, low, close)
[TOP]
SYNTAX CdlTasukigap()
RETURNS NUMERIC ARRAY
DESCRIPTION Tasuki Gap, The Upside Tasuki Gap is found in a rising trend.
ADDITIONAL Downside Tasuki Gap Bearish
INFO Signal: Bearish
Pattern: continuation
Reliability: moderate
Identification
A long black day is followed by a second long black day that gaps in the
direction of the trend. The third day is white and opens within the body of the
second day and closes within the gap.
Upside Tasuki Gap Bullish
Signal: Bullish
Pattern: continuation
Reliability: moderate
Identification
A long white day is followed by a second long white day that gaps in the
direction of the trend. The third day is black and opens within the body of the
second day and closes within the gap.
EXAMPLE CdlTasukigap()
[TOP]
SYNTAX CdlTasukigap( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Tasuki Gap, The Upside Tasuki Gap is found in a rising trend.
ADDITIONAL Downside Tasuki Gap Bearish
INFO Signal: Bearish
Pattern: continuation
Reliability: moderate
Identification
A long black day is followed by a second long black day that gaps in the
direction of the trend. The third day is white and opens within the body of the
second day and closes within the gap.
Upside Tasuki Gap Bullish
Signal: Bullish
Pattern: continuation
Reliability: moderate
Identification
A long white day is followed by a second long white day that gaps in the
direction of the trend. The third day is black and opens within the body of the
second day and closes within the gap.
EXAMPLE CdlTasukigap(open, high, low, close)
[TOP]
SYNTAX CdlThrusting()
RETURNS NUMERIC ARRAY
DESCRIPTION Thrusting Pattern, The Thrusting pattern is almost an 'On Neck' or an 'In Neck'
pattern and resembles the Meeting Line pattern, also.
ADDITIONAL Thrusting Bearish
INFO Signal: Bearish
Pattern: continuation
Reliability: low
Identification
A black day is followed by a white day which gaps in the direction of the trend
and closes below the midpoint of the black day.
EXAMPLE CdlThrusting()
[TOP]
SYNTAX CdlThrusting( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Thrusting Pattern, The Thrusting pattern is almost an 'On Neck' or an 'In Neck'
pattern and resembles the Meeting Line pattern, also.
ADDITIONAL Thrusting Bearish
INFO Signal: Bearish
Pattern: continuation
Reliability: low
Identification
A black day is followed by a white day which gaps in the direction of the trend
and closes below the midpoint of the black day.
EXAMPLE CdlThrusting(open, high, low, close)
[TOP]
SYNTAX CdlTristar()
RETURNS NUMERIC ARRAY
DESCRIPTION Tristar Pattern, The Tri Star pattern is relatively rare.
ADDITIONAL
INFO
EXAMPLE CdlTristar()
[TOP]
SYNTAX CdlTristar( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Tristar Pattern, The Tri Star pattern is relatively rare.
ADDITIONAL
INFO
EXAMPLE CdlTristar(open, high, low, close)
[TOP]
SYNTAX CdlUnique3river()
RETURNS NUMERIC ARRAY
DESCRIPTION Unique 3 River, The Unique Three River Bottom is a bullish pattern, somewhat
characteristic of the Morning Star Pattern.
ADDITIONAL Unique Three River Bottom Bullish
INFO Signal: Bullish
Pattern: reversal
Reliability: moderate
Identification
The first day is a long black day, followed by a Homing Pigeon whose lower
shadow makes a new low. The last day is small and white, and closes below the
second day�s close.
EXAMPLE CdlUnique3river()
[TOP]
SYNTAX CdlUpsidegap2crows()
RETURNS NUMERIC ARRAY
DESCRIPTION Upside Gap Two Crows, The Upside Gap Two Crows is a three-day pattern.
ADDITIONAL Upside Gap Two Crows Bearish
INFO Signal: Bearish
Pattern: reversal
Reliability: high
Identification
A long white day is followed by a black candle which gaps in the direction of
the trend. The final day engulfs the small black day and closes within the gap
of the first two days.
EXAMPLE CdlUpsidegap2crows()
[TOP]
SYNTAX CdlXsidegap3methods()
RETURNS NUMERIC ARRAY
DESCRIPTION Upside/Downside Gap Three Methods, the Bullish Upside Gap Three Methods
Pattern, the market is in a strong bullish mood.
ADDITIONAL Upside Gap Three Methods Bullish
INFO Signal: Bullish
Pattern: continuation
Reliability: moderate
Identification
A long white day is followed by a second long white day that gaps in the
direction of the trend. The third day is black and fills the gap between the first
two days.
Downside Gap Three Methods Bearish
Signal: Bearish
Pattern: continuation
Reliability: moderate
Identification
A long black day is followed by a second long black day that gaps in the
direction of the trend. The third day is white and fills the gap between the first
two days.
EXAMPLE CdlXsidegap3methods()
[TOP]
1.3 Charting
1.3.1 Plot1
PLOT1 Charting
Plot
SYNTAX Plot1( ARRAY array one, ARRAY array two, ARRAY description1,
ARRAY description2, ENUM fillcolor, ENUM graphonecolor, ENUM
graphtwocolor, ENUM chart type, ENUM style)
RETURNS
DESCRIPTION Plot two time-series
ADDITIONAL
INFO
EXAMPLE Plot1(BbandsUpper(14, 2, 2, _MaSma), BbandSlower(14, 2, 2, _MaSma), "BB
UP", "BB LOW", colorRed|20|colorRed|20|0, colorTransparent,
colorTransparent, chartLine, StyleSymbolNone)
[TOP]
SYNTAX Plot( ARRAY array, ARRAY description, ENUM color, ENUM chart
type, ENUM style)
RETURNS
DESCRIPTION Plot a time-series
ADDITIONAL
INFO
EXAMPLE Plot(rsi(14), "RSI", colorBlack, chartLine, styleOwnScale)
[TOP]
SYNTAX Plot( ARRAY array, ARRAY description, ENUM color, ENUM chart
type)
RETURNS
DESCRIPTION Plot a time-series
ADDITIONAL
INFO
EXAMPLE Plot(rsi(14), "RSI", colorBlack, chartLine)
[TOP]
1.3.6 PlotArrow
PLOTARROW Charting
Plot Arrow
1.3.7 PlotCandleStick1
PLOTCANDLESTICK1 Charting
Plot CandleStick
1.3.8 PlotCandleStick
PLOTCANDLESTICK Charting
Plot CandleStick
1.3.9 PlotFixed
PLOTFIXED Charting
Plot Fixed Graph
1.3.10 PlotSymbol
PLOTSYMBOL Charting
Plot Symbol
1.3.11 Print
PRINT Charting
Print To Output
1.3.12 PrintChart
PRINTCHART Charting
Print Chart
1.3.13 SetHatchBrush
SETHATCHBRUSH Charting
Set Hatch Brush
1.3.14 SetMaxScale
SETMAXSCALE Charting
Set the maximum chart scale
1.3.15 SetMinScale
SETMINSCALE Charting
Set the minimum chart scale
1.3.16 SetPercentScale
SETPERCENTSCALE Charting
Update chart scale by a percentage
1.3.17 SetScale
SETSCALE Charting
Set the chart scale
1.3.18 UpdateColor
UPDATECOLOR Charting
Update Last Graph Color
1.3.19 UpdatePrintSettings
UPDATEPRINTSETTINGS Charting
Update Print Settings
1.3.20 UpdateSettings
UPDATESETTINGS Charting
Update Pane Settings
1.4 Columns
1.4.1 AddColumn (0)
ADDCOLUMN Columns
Add column
1.4.3 SetColumnColor
SETCOLUMNCOLOR Columns
Update column color
1.5 Composite
1.5.1 AddComposite
ADDCOMPOSITE Composite
Add composite
1.6 Database
1.6.1 GetData (0)
GETDATA Database
Database Field
SYNTAX GetData( STRING database name, STRING field name, ENUM type)
RETURNS NUMERIC ARRAY
DESCRIPTION Get a database field data
ADDITIONAL
INFO
EXAMPLE GetData("'database name'", "'field name'", LastData)
[TOP]
SYNTAX GetData( STRING database name, STRING field name, ENUM type,
ARRAY symbol)
RETURNS NUMERIC ARRAY
DESCRIPTION Get a database field data for an external symbol
ADDITIONAL
INFO
EXAMPLE GetData("'database name'", "'field name'", LastData, "GOOG")
[TOP]
1.6.6 GetDataCountInside
GETDATACOUNTINSIDE Database
Database Field Index Count Inside
1.6.7 GetDataExtern
GETDATAEXTERN Database
Database field for a specified symbol
1.6.8 GetDataIndex
GETDATAINDEX Database
Database Field Index
1.6.9 GetDataIndexDP
GETDATAINDEXDP Database
Database Field Index Time
1.6.10 GetDataInside
GETDATAINSIDE Database
Database Field Index Inside
1.6.13 GetDataStringCountInside
GETDATASTRINGCOUNTINSIDE Database
Database Field Index Count Inside
1.6.14 IsDataExists
ISDATAEXISTS Database
Is Database Field Exists
1.7 Date-Time
1.7.1 Year
YEAR Date-time
Year
SYNTAX Year()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the current bar's year
ADDITIONAL
INFO
EXAMPLE Year()
[TOP]
1.7.2 Date
DATE Date-time
Date
SYNTAX Date()
RETURNS TEXT ARRAY
DESCRIPTION Returns the bar's Date
ADDITIONAL
INFO
EXAMPLE Date()
[TOP]
1.7.3 DateTicks
DATETICKS Date-time
Date Ticks
SYNTAX DateTicks()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the number of ticks that represent the current date and time
ADDITIONAL
INFO
EXAMPLE DateTicks()
[TOP]
1.7.4 Day
DAY Date-time
Day
SYNTAX Day()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the current bar's day of the month
ADDITIONAL
INFO
EXAMPLE Day()
[TOP]
1.7.5 DayOfWeek
DAYOFWEEK Date-time
Day of Week
SYNTAX DayOfWeek()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the current bar's day of week (1 for Monday, 2 for Tuesday, 3 for
Wednesday...)
ADDITIONAL
INFO
EXAMPLE DayOfWeek()
[TOP]
1.7.6 DayOfYear
DAYOFYEAR Date-time
Day of Year
SYNTAX DayOfYear()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the current bar's day of the year
ADDITIONAL
INFO
EXAMPLE DayOfYear()
[TOP]
1.7.7 Hour
HOUR Date-time
Hour
SYNTAX Hour()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the current bar's hour
ADDITIONAL
INFO
EXAMPLE Hour()
[TOP]
1.7.8 Interval
INTERVAL Date-time
Interval in ticks
SYNTAX Interval()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the number of ticks between the current and previous bar date
ADDITIONAL
INFO
EXAMPLE Interval()
[TOP]
1.7.9 Minute
MINUTE Date-time
Minute
SYNTAX Minute()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the current bar's minute
ADDITIONAL
INFO
EXAMPLE Minute()
[TOP]
1.7.10 Month
MONTH Date-time
Month
SYNTAX Month()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the current bar's month
ADDITIONAL
INFO
EXAMPLE Month()
[TOP]
1.7.11 NbDays
NBDAYS Date-time
Number of days
1.7.12 Now
NOW Date-time
Now
SYNTAX Now()
RETURNS TEXT ARRAY
DESCRIPTION Returns the current Date
ADDITIONAL
INFO
EXAMPLE Now()
[TOP]
1.7.13 Second
SECOND Date-time
Second
SYNTAX Second()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the current bar's second
ADDITIONAL
INFO
EXAMPLE Second()
[TOP]
1.7.14 TimeTicks
TIMETICKS Date-time
Time Ticks
SYNTAX TimeTicks()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the number of ticks that represent the current time
ADDITIONAL
INFO
EXAMPLE TimeTicks()
[TOP]
1.7.15 Week
WEEK Date-time
Week
SYNTAX Week()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the current bar's week
ADDITIONAL
INFO
EXAMPLE Week()
[TOP]
1.8 Divers
1.8.1 GetSeries (0)
GETSERIES Divers
Get another symbol data
1.8.3 Output
OUTPUT Divers
Output text
1.8.4 OutputList
OUTPUTLIST Divers
Output list
1.8.5 States
STATES Divers
States
1.8.6 Ticker
TICKER Divers
Get another symbol data
1.8.7 Ticker1
TICKER1 Divers
Get time-series for a different time-frame
1.9 Indicators
1.9.1 Ad (0)
AD Indicators
Chaikin A/D Line
SYNTAX Ad()
RETURNS NUMERIC ARRAY
DESCRIPTION Chaikin A/D Line
ADDITIONAL The Accumulation/Distribution Line was developed by Marc Chaikin to assess
INFO the cumulative flow of money into and out of a security.
A bullish signal is given when the Accumulation/Distribution Line forms a
positive divergence (for more than a month of data).
The opposite for a bearish signal.
EXAMPLE Ad()
[TOP]
1.9.2 Ad (1)
AD Indicators
Chaikin A/D Line
SYNTAX Ad( ARRAY high, ARRAY low, ARRAY close, ARRAY volume)
RETURNS NUMERIC ARRAY
DESCRIPTION Chaikin A/D Line
ADDITIONAL The Accumulation/Distribution Line was developed by Marc Chaikin to assess
INFO the cumulative flow of money into and out of a security.
A bullish signal is given when the Accumulation/Distribution Line forms a
positive divergence (for more than a month of data).
The opposite for a bearish signal.
EXAMPLE Ad(high, low, close, volume)
[TOP]
SYNTAX AdOsc( ARRAY high, ARRAY low, ARRAY close, ARRAY volume,
ARRAY fastperiod, ARRAY slowperiod)
RETURNS NUMERIC ARRAY
DESCRIPTION Chaikin A/D Oscillator
ADDITIONAL The Chaikin Oscillator is the Moving Average Convergence Divergence
INFO indicator (MACD) applied to the Accumulation/Distribution Line.
A bullish signal happen when the price action develops a lower low into
oversold zones and the oscillator diverges with a higher low and begins to rise.
A bearish signal happen when the price action develops a higher high into
overbought zones and the oscillator diverges with a lower high and begins to
fall.
EXAMPLE AdOsc(high, low, close, volume, 3, 10)
[TOP]
SYNTAX Adx( ARRAY high, ARRAY low, ARRAY close, ARRAY timeperiod)
RETURNS NUMERIC ARRAY
DESCRIPTION Average Directional Movement Index
ADDITIONAL The ADX is a Welles Wilder style moving average of the Directional
INFO Movement Index (DX).
To interpret the ADX, consider a high number to be a strong trend, and a low
number, a weak trend.
EXAMPLE Adx(high, low, close, 14)
[TOP]
SYNTAX Adxr( ARRAY high, ARRAY low, ARRAY close, ARRAY timeperiod)
RETURNS NUMERIC ARRAY
DESCRIPTION Average Directional Movement Index Rating
ADDITIONAL The ADXR is the average of the two ADX values.
INFO The ADXR smoothes the ADX, and is therefore less responsive, however, the
ADXR filters out excessive tops and bottoms.
High ADXR value is bullish while low values is bearish.
EXAMPLE Adxr(high, low, close, 14)
[TOP]
SYNTAX Atr( ARRAY high, ARRAY low, ARRAY close, ARRAY timeperiod)
RETURNS NUMERIC ARRAY
DESCRIPTION Average True Range
ADDITIONAL The ATR is a measure of volatility. High ATR values indicate high volatility,
INFO and low values indicate low volatility.
EXAMPLE Atr(high, low, close, 14)
[TOP]
SYNTAX AvgPrice()
RETURNS NUMERIC ARRAY
DESCRIPTION Average Price
ADDITIONAL
INFO
EXAMPLE AvgPrice()
[TOP]
SYNTAX AvgPrice( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Average Price
ADDITIONAL
INFO
EXAMPLE AvgPrice(open, high, low, close)
[TOP]
SYNTAX Bop()
RETURNS NUMERIC ARRAY
DESCRIPTION Balance Of Power
ADDITIONAL The Balance of Market Power is an oscillator and supports price divergence,
INFO trends, and overbought-oversold levels. It can also help to determine market
trends.
This indicator measures the velocity of the price trend.
EXAMPLE Bop()
[TOP]
SYNTAX Bop( ARRAY open, ARRAY high, ARRAY low, ARRAY close)
RETURNS NUMERIC ARRAY
DESCRIPTION Balance Of Power
ADDITIONAL The Balance of Market Power is an oscillator and supports price divergence,
INFO trends, and overbought-oversold levels. It can also help to determine market
trends.
This indicator measures the velocity of the price trend.
EXAMPLE Bop(open, high, low, close)
[TOP]
SYNTAX Cci( ARRAY high, ARRAY low, ARRAY close, ARRAY timeperiod)
RETURNS NUMERIC ARRAY
DESCRIPTION Commodity Channel Index
ADDITIONAL The CCI is designed to detect beginning and ending market trends.
INFO A price correction is expected when CCI is above +100 (overbought) and a
rally when it is below -100 (oversold).
You can also look for price divergence in the CCI.
EXAMPLE Cci(high, low, close, 14)
[TOP]
1.9.37 Dx (0)
DX Indicators
Directional Movement Index
1.9.38 Dx (1)
DX Indicators
Directional Movement Index
SYNTAX Dx( ARRAY high, ARRAY low, ARRAY close, ARRAY timeperiod)
RETURNS NUMERIC ARRAY
DESCRIPTION Directional Movement Index
ADDITIONAL Directional Movement can be used either as a system on its own or as a filter
INFO on a trend-following system.
It help trader find if a particular stock is trending or not.
Two lines are generated in a DMI study, +DI and -DI. The first line measures
positive (upward) movement and the second number measures negative
(downward) movement.
A buy signal is given when the +DI line crosses over the - DI line while a sell
signal is generated when the +DI line crosses below the - DI line.
A low ADX value (generally less than 20) can indicate a non-trending market
with low volumes whereas a cross above 20 may indicate the start of a trend
(either up or down). If the ADX is over 40 and begins to fall, it can indicate the
slowdown of a current trend. This indicator can also be used to identify non-
trending markets, or a deterioration of an ongoing trend.
Directional Movement Index was developed by Welles Wilder and explained in
his book, New Concepts in Technical Trading Systems.
EXAMPLE Dx(high, low, close, 14)
[TOP]
1.9.43 GapDown
GAPDOWN Indicators
Gap Down
SYNTAX GapDown()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns 1, when a down gap happen
ADDITIONAL
INFO
EXAMPLE GapDown()
[TOP]
1.9.44 GapUp
GAPUP Indicators
Gap Up
SYNTAX GapUp()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns 1, when an up gap happen
ADDITIONAL
INFO
EXAMPLE GapUp()
[TOP]
SYNTAX Ht_Dcperiod()
RETURNS NUMERIC ARRAY
DESCRIPTION Hilbert Transform - Dominant Cycle Period
ADDITIONAL
INFO
EXAMPLE Ht_Dcperiod()
[TOP]
SYNTAX Ht_Dcphase()
RETURNS NUMERIC ARRAY
DESCRIPTION Hilbert Transform - Dominant Cycle Phase
ADDITIONAL The Hilbert Transform is a technique used to generate inphase and quadrature
INFO components of a de-trended real-valued "analytic-like" signal (such as a Price
Series) in order to analyze variations of the instantaneous phase and amplitude..
HTDCPhase returns the Hilbert Transform Phase of the Dominant Cycle. The
Dominant Cycle Phase lies in the range of 0 to 360 degrees.
The DC Phase at a specific bar gives the phase position from 0 to 360 degrees
within the current Hilbert Transform Period instantaneously measured at that
bar. It is meaningful only during a cyclic period of the analytic signal
waveform (price series) being measured. Its transition from 360 degrees to 0
degrees can be used to designate the start of a new cycle. It can also be utilized
to signal the start or end of trending or cyclic periods. Departure from a
constant rate change of phase is a sensitive way to detect the end of a cycle
mode. See the examples.
EXAMPLE Ht_Dcphase()
[TOP]
SYNTAX Ht_Leadsine()
RETURNS NUMERIC ARRAY
DESCRIPTION Hilbert Transform - SineWave
ADDITIONAL The Hilbert Transform is a technique used to generate inphase and quadrature
INFO components of a de-trended real-valued "analytic-like" signal (such as a Price
Series) in order to analyze variations of the instantaneous phase and amplitude..
HTDCPhase returns the Hilbert Transform Phase of the Dominant Cycle. The
Dominant Cycle Phase lies in the range of 0 to 360 degrees. The Hilbert
Transform Lead Sine is just the sine of the DC Phase advanced by 45 degrees.
The DC Phase at a specific bar gives the phase position from 0 to 360 degrees
within the current Hilbert Transform Period instantaneously measured at that
bar. The HTLeadSin is the sine of the DC Phase at a specific bar. It is most
often used in conjunction with the HTSin indicator to identify cyclic turning
points. Quoting from Market Mode Strategies.doc by John Ehlers from MESA
Software, "A clear, unequivocal cycle mode indicator can be generated by
plotting the Sine of the measured phase angle advanced by 45 degrees. This
leading signal crosses the sinewave 1/8th of a cycle BEFORE the peaks and
valleys of the cyclic turning points, enabling you to make your trading decision
in time to profit from the entire amplitude swing of the cycle. A significant
additional advantage is that the two indicator lines don't cross except at cyclic
turning points, avoiding the false whipsaw signals of most "oscillators" when
the market is in a Trend Mode. The two lines don't cross because the phase rate
of change is nearly zero in a trend mode. Since the phase is not changing, the
two lines separated by 45 degrees in phase never get the opportunity to cross."
See the examples.
EXAMPLE Ht_Leadsine()
[TOP]
SYNTAX Ht_Phasorphase()
RETURNS NUMERIC ARRAY
DESCRIPTION Hilbert Transform - Instantaneous Trendline
ADDITIONAL The Hilbert Transform is a technique used to generate inphase and quadrature
INFO components of a de-trended real-valued "analytic-like" signal (such as a Price
Series) in order to analyze variations of the instantaneous phase and amplitude.
HTInPhase returns the Hilbert Transform generated InPhase component of the
input Price Series.
The InPhase component is used in conjunction with the Quadrature component
to generate the phase of the analytic signal (using the ArcTan function) at a
specific bar or for the entire Price Series.
EXAMPLE Ht_Phasorphase()
[TOP]
SYNTAX Ht_Phasorquadrature()
RETURNS NUMERIC ARRAY
DESCRIPTION Hilbert Transform - Trend vs Cycle Mode
ADDITIONAL The Hilbert Transform is a technique used to generate inphase and quadrature
INFO components of a de-trended real-valued "analytic-like" signal (such as a Price
Series) in order to analyze variations of the instantaneous phase and amplitude.
HTQuadrature returns the Hilbert Transform generated Quadrature component
of the input Price Series.
The Quadrature component is used in conjunction with the InPhase component
to generate the phase of the analytic signal (using the ArcTan function) at a
specific bar or for the entire Price Series.
EXAMPLE Ht_Phasorquadrature()
[TOP]
SYNTAX Ht_Sine()
RETURNS NUMERIC ARRAY
DESCRIPTION Hilbert Transform - SineWave
ADDITIONAL The Hilbert Transform is a technique used to generate inphase and quadrature
INFO components of a de-trended real-valued "analytic-like" signal (such as a Price
Series) in order to analyze variations of the instantaneous phase and amplitude..
HTDCPhase returns the Hilbert Transform Phase of the Dominant Cycle. The
Dominant Cycle Phase lies in the range of 0 to 360 degrees. The Hilbert
Transform Sine is just the sine of the DC Phase.
The DC Phase at a specific bar gives the phase position from 0 to 360 degrees
within the current Hilbert Transform Period instantaneously measured at that
bar. The HTSin is the sine of the DC Phase at a specific bar. It is most often
used in conjunction with the HTLeadSin indicator to identify cyclic turning
points. Quoting from Market Mode Strategies.doc by John Ehlers from MESA
Software, "A clear, unequivocal cycle mode indicator can be generated by
plotting the Sine of the measured phase angle advanced by 45 degrees. This
leading signal crosses the sinewave 1/8th of a cycle BEFORE the peaks and
valleys of the cyclic turning points, enabling you to make your trading decision
in time to profit from the entire amplitude swing of the cycle. A significant
additional advantage is that the two indicator lines don't cross except at cyclic
turning points, avoiding the false whipsaw signals of most "oscillators" when
the market is in a Trend Mode. The two lines don't cross because the phase rate
of change is nearly zero in a trend mode. Since the phase is not changing, the
two lines separated by 45 degrees in phase never get the opportunity to cross."
EXAMPLE Ht_Sine()
[TOP]
SYNTAX Ht_Trendline()
RETURNS NUMERIC ARRAY
DESCRIPTION Hilbert Transform - Phasor Components
ADDITIONAL The Hilbert Transform is a technique used to generate inphase and quadrature
INFO components of a de-trended real-valued "analytic-like" signal (such as a Price
Series) in order to analyze variations of the instantaneous phase and amplitude.
HTTrendline (or MESA Instantaneous Trendline) returns the Price Series value
after the Dominant Cycle of the analytic signal as generated by the Hilbert
Transform has been removed. The Dominant Cycle can be thought of as being
the "most likely" period (in the range of 10 to 40) of a sine function of the Price
Series.
The HTTrendline at a specific bar gives the current Hilbert Transform
Trendline as instantaneously measured at that bar. In its Series form, the
Instantaneous Trendline appears much like a Moving Average, but with
minimal lag compared with the lag normally associated with such averages for
equivalent periods. The HTTrendline is formed by removing the Dominant
Cycle from the Price Series. See the examples.
EXAMPLE Ht_Trendline()
[TOP]
SYNTAX Ht_Trendmode()
RETURNS NUMERIC ARRAY
DESCRIPTION Hilbert Transform - Phasor Components
ADDITIONAL
INFO
EXAMPLE Ht_Trendmode()
[TOP]
1.9.63 Inside
INSIDE Indicators
Inside
SYNTAX Inside()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns 1, when an inside day occurs
ADDITIONAL
INFO
EXAMPLE Inside()
[TOP]
1.9.76 Ma (0)
MA Indicators
Moving Average
1.9.77 Ma (1)
MA Indicators
Moving Average
SYNTAX Macd()
RETURNS NUMERIC ARRAY
DESCRIPTION Moving Average Convergence/Divergence
ADDITIONAL MACD returns the Moving Average Convergence Divergence indicator.
INFO MACD is a momentum oscillator, yet its primary use is to trade trends.
MACD has two lines, one called MACD line or fast line and the other MACD
signal or slow line.
Differents interpretation can be made using MACD.
EXAMPLE Macd()
[TOP]
SYNTAX MedPrice()
RETURNS NUMERIC ARRAY
DESCRIPTION Median Price
ADDITIONAL The Median Price function calculates the midpoint between the high and low
INFO prices for the day.
The median price (called also mean or average price) provides a simplified
view of the trading prices for the day.
EXAMPLE MedPrice()
[TOP]
SYNTAX Mfi( ARRAY high, ARRAY low, ARRAY close, ARRAY volume, ARRAY
timeperiod)
RETURNS NUMERIC ARRAY
DESCRIPTION Money Flow Index
ADDITIONAL The Money Flow Index is another momentum indicator illustrating the strength
INFO of money flowing into and out of a security.
The essentiel difference between the Money Flow and others momentum
indicator is that the money flow incorporates volume in addition to pricing
information.
EXAMPLE Mfi(high, low, close, volume, 14)
[TOP]
SYNTAX Natr( ARRAY high, ARRAY low, ARRAY close, ARRAY timeperiod)
RETURNS NUMERIC ARRAY
DESCRIPTION Normalized Average True Range
ADDITIONAL
INFO
EXAMPLE Natr(high, low, close, 14)
[TOP]
SYNTAX Obv()
RETURNS NUMERIC ARRAY
DESCRIPTION On Balance Volume
ADDITIONAL On Balance Volume is a momentum indicator that relates volume to price
INFO change.
On Balance Volume keeps a running total of volume flowing into or out of a
security.
When the security closes higher than the previous close, all of the day's volume
is considered up-volume.
A close lower than the previous day's results in all of the day's volume
considered down-volume.
Rising trends is considered bullish, while falling trends is bearish.
EXAMPLE Obv()
[TOP]
1.9.110 Outside
OUTSIDE Indicators
Outside
SYNTAX Outside()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns 1, when an outside day occurs
ADDITIONAL
INFO
EXAMPLE Outside()
[TOP]
SYNTAX Plus_Di( ARRAY high, ARRAY low, ARRAY close, ARRAY timeperiod)
RETURNS NUMERIC ARRAY
DESCRIPTION Plus Directional Indicator
ADDITIONAL
INFO
EXAMPLE Plus_Di(high, low, close, 14)
[TOP]
SYNTAX StochSlowd( ARRAY high, ARRAY low, ARRAY close, ARRAY volume,
ARRAY fastk_period, ARRAY slowk_period, ENUM
slowk_movingaveragetype, ARRAY slowd_period, ENUM
slowd_movingaveragetype)
RETURNS NUMERIC ARRAY
DESCRIPTION Stochastic Slow D
ADDITIONAL
INFO
EXAMPLE StochSlowd(high, low, close, volume, 5, 3, _MaSma, 3, _MaSma)
[TOP]
SYNTAX StochSlowk( ARRAY high, ARRAY low, ARRAY close, ARRAY volume,
ARRAY fastk_period, ARRAY slowk_period, ENUM
slowk_movingaveragetype)
RETURNS NUMERIC ARRAY
DESCRIPTION Stochastic Slow K
ADDITIONAL
INFO
EXAMPLE StochSlowk(high, low, close, volume, 5, 3, _MaSma)
[TOP]
1.9.147 T3 (0)
T3 Indicators
Triple Exponential Moving Average (T3)
1.9.148 T3 (1)
T3 Indicators
Triple Exponential Moving Average (T3)
SYNTAX Trange()
RETURNS NUMERIC ARRAY
DESCRIPTION True Range
ADDITIONAL The True Range function is used to determine the normal trading range of a
INFO stock or commodity.
EXAMPLE Trange()
[TOP]
SYNTAX UltOsc( ARRAY high, ARRAY low, ARRAY close, ARRAY timeperiod1,
ARRAY timeperiod2, ARRAY timeperiod3)
RETURNS NUMERIC ARRAY
DESCRIPTION Ultimate Oscillator
ADDITIONAL The Ultimate Oscillator combines a stock's price action during three different
INFO time frames into one oscillator.
Oversold territory is below 30 while overbought territory is above 70.
The Ultimate Oscillator was developed by Larry Williams.
EXAMPLE UltOsc(high, low, close, 7, 14, 28)
[TOP]
SYNTAX WclPrice()
RETURNS NUMERIC ARRAY
DESCRIPTION Weighted Close Price
ADDITIONAL The Weighted Close indicator calculates an average of each day's price.
INFO the Weighted Close provides a simplified view of the day.
EXAMPLE WclPrice()
[TOP]
SYNTAX Willr( ARRAY high, ARRAY low, ARRAY close, ARRAY timeperiod)
RETURNS NUMERIC ARRAY
DESCRIPTION Williams' %R
ADDITIONAL Williams %R is a momentum indicator that is designed to identify overbought
INFO and oversold areas in a nontrending market.
A bullish signal happen when the indicator is in an oversold area and the price
change direction to the upward.
The opposite for the bearish signal.
Williams %R was developed by Larry Williams.
EXAMPLE Willr(high, low, close, 14)
[TOP]
1.10 Math
1.10.1 Absolute
ABSOLUTE Math
Absolute Value
1.10.2 Atan
ATAN Math
Atan
1.10.5 Ceil
CEIL Math
Ceiling
1.10.6 Cos
COS Math
Cos
1.10.7 Cosh
COSH Math
Cosh
1.10.8 DivRem
DIVREM Math
DivRem
1.10.9 Exp
EXP Math
Exp
1.10.10 Floor
FLOOR Math
Floor
1.10.11 Frac
FRAC Math
Frac
1.10.12 IeeeRemainder
IEEEREMAINDER Math
IeeeRemainder
1.10.13 Int
INT Math
Int
1.10.14 Log10
LOG10 Math
Log10
1.10.15 Log
LOG Math
Log
1.10.16 Max
MAX Math
Max
1.10.17 Min
MIN Math
Min
1.10.18 Pow
POW Math
Pow
1.10.19 Random
RANDOM Math
Random Number
1.10.20 Round
ROUND Math
Round
1.10.21 Sharpe
SHARPE Math
Sharpe
1.10.22 Sign
SIGN Math
Sign
1.10.23 Sin
SIN Math
Sin
1.10.24 Sinh
SINH Math
Sinh
1.10.25 Sqrt
SQRT Math
Sqrt
1.10.28 Tan
TAN Math
Tan
1.10.29 Tanh
TANH Math
Tanh
SYNTAX BSignal( ARRAY min profit, ARRAY max drawdown, ARRAY minimum
days, ARRAY maximum days)
RETURNS NUMERIC ARRAY
DESCRIPTION Gives you the best long and short entries and exits depending on the parameters
you choose
Example if you choose a minimum profit of 20 percent, a maximum drawdown
of 10 percent,
a minimum number of bars equal to 10 and a maximum number of bars equal
to 100
The system will give you the most profitable trades that meet these criteria
Plot the returned array in a graph that contains CandleStick data to see entries
and exits arrows
Click on those arrows to see additional information
ADDITIONAL
INFO
EXAMPLE BSignal(30, -10, -1, 300)
[TOP]
1.11.2 BSignalLong
BSIGNALLONG Optimal Signal
Optimal long signal
1.11.3 BSignalShort
BSIGNALSHORT Optimal Signal
Optimal short signal
1.11.4 EntryLongProfit
ENTRYLONGPROFIT Optimal Signal
1.11.5 EntryLongProfitCond
ENTRYLONGPROFITCOND Optimal Signal
1.11.6 EntryLongProfitCondExitRule
ENTRYLONGPROFITCONDEXITRULE Optimal Signal
1.11.7 EntryLongProfitExitRule
ENTRYLONGPROFITEXITRULE Optimal Signal
1.11.8 EntryLongProfitPerBar
ENTRYLONGPROFITPERBAR Optimal Signal
1.11.9 EntryLongProfitPerBarCond
ENTRYLONGPROFITPERBARCOND Optimal Signal
1.11.10 EntryLongProfitPerBarCondExitRule
ENTRYLONGPROFITPERBARCONDEXITRULE Optimal Signal
1.11.11 EntryLongProfitPerBarExitRule
ENTRYLONGPROFITPERBAREXITRULE Optimal Signal
1.11.12 EntryShortProfit
ENTRYSHORTPROFIT Optimal Signal
1.11.13 EntryShortProfitCond
ENTRYSHORTPROFITCOND Optimal Signal
1.11.14 EntryShortProfitCondExitRule
ENTRYSHORTPROFITCONDEXITRULE Optimal Signal
1.11.15 EntryShortProfitExitRule
ENTRYSHORTPROFITEXITRULE Optimal Signal
1.11.16 EntryShortProfitPerBar
ENTRYSHORTPROFITPERBAR Optimal Signal
1.11.17 EntryShortProfitPerBarCond
ENTRYSHORTPROFITPERBARCOND Optimal Signal
1.11.18 EntryShortProfitPerBarCondExitRule
ENTRYSHORTPROFITPERBARCONDEXITRULE Optimal Signal
1.11.19 EntryShortProfitPerBarExitRule
ENTRYSHORTPROFITPERBAREXITRULE Optimal Signal
1.12 Pre-calculated-value
1.12.1 GetPreCalculatedGlobal
GETPRECALCULATEDGLOBAL Pre-calculated-value
Pre-calculated global value
1.12.8 PValG
PVALG Pre-calculated-value
Pre-calculated global value
1.13 Predictions
1.13.1 Predict
PREDICT Predictions
Predict the next value
1.13.2 PredictSymbol
PREDICTSYMBOL Predictions
Return '1' if the current symbol was used druing the training of the specified model
1.14 Ranking
1.14.1 Ranking
RANKING Ranking
Ranking System
1.15 Rules
1.15.1 ApplyRule
APPLYRULE Rules
Apply a Trading Rule
SYNTAX ApplyRule( STRING category, STRING name, ARRAY rule index (set -1
to get the number of rules in the specified list))
RETURNS NUMERIC ARRAY
DESCRIPTION Apply a trading rule given its index value and the name of the list of rules
ADDITIONAL
INFO
EXAMPLE ApplyRule("category_name", "list_rules_name", 1)
[TOP]
1.16 Simulator
1.16.1 BuyPrice (0)
BUYPRICE Simulator
Limit/Stop price for buy order
SYNTAX BuyPrice( ARRAY stop, ARRAY limit, ARRAY valid for (bars))
RETURNS
DESCRIPTION Set the Limit & Stop price for the buy order (Set order type using
'SetSimTiming' function. Example: _StopLimit).
The order is valid for the specified number of bars, after this period the order is
canceled.
ADDITIONAL
INFO
EXAMPLE BuyPrice(close * 1.01, close, 5)
[TOP]
SYNTAX CoverPrice( ARRAY stop, ARRAY limit, ARRAY exit at market after
(bars))
RETURNS
DESCRIPTION Set the Limit & Stop price for the cover order (Set order type using
'SetSimTiming' function. Example: _StopLimit).
The order is valid for the specified number of bars, after this period the order is
canceled and an order at the market is initiated.
ADDITIONAL
INFO
EXAMPLE CoverPrice(close * 1.01, close, 5)
[TOP]
1.16.5 Drawdown
DRAWDOWN Simulator
Drawdown
SYNTAX Drawdown()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the drawdown curve of the current symbol
ADDITIONAL
INFO
EXAMPLE Drawdown()
[TOP]
1.16.6 Equity
EQUITY Simulator
Equity
SYNTAX Equity()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the equity curve of the current symbol, starting from 100
ADDITIONAL
INFO
EXAMPLE Equity()
[TOP]
1.16.7 Optimize
OPTIMIZE Simulator
Optimize variables
SYNTAX Optimize( ARRAY variable name, ARRAY min, ARRAY max, ARRAY
step)
RETURNS
DESCRIPTION Used by the simulator to optimize a variable
ADDITIONAL
INFO
EXAMPLE Optimize("a", 1, 5, 1)
[TOP]
SYNTAX SellPrice( ARRAY stop, ARRAY limit, ARRAY exit at market after
(bars))
RETURNS
DESCRIPTION Set the Limit & Stop price for the sell order (Set order type using
'SetSimTiming' function. Example: _StopLimit).
The order is valid for the specified number of bars, after this period the order is
canceled and an order at the market is initiated.
ADDITIONAL
INFO
EXAMPLE SellPrice(close * 1.01, close, 5)
[TOP]
1.16.10 SetSimCommission
SETSIMCOMMISSION Simulator
Simulation commissions
1.16.11 SetSimLongRank
SETSIMLONGRANK Simulator
Simulation long ranking system
1.16.12 SetSimPeriods
SETSIMPERIODS Simulator
Simulation periods
SYNTAX SetSimPeriods( ARRAY start year, ARRAY start month, ARRAY start
day, ARRAY end year, ARRAY end month, ARRAY end day)
RETURNS
DESCRIPTION Update the simulator start and end periods
ADDITIONAL
INFO
EXAMPLE SetSimPeriods(2000, 1, 1, 2011, 12, 29)
[TOP]
1.16.13 SetSimRefSymbol
SETSIMREFSYMBOL Simulator
Simulation reference symbol
1.16.14 SetSimSetting
SETSIMSETTING Simulator
Simulation settings
1.16.15 SetSimShortRank
SETSIMSHORTRANK Simulator
Simulation short ranking system
1.16.16 SetSimStop
SETSIMSTOP Simulator
Simulation stops
SYNTAX SetSimStop( ENUM stop type, ENUM stop entry, ARRAY value, ARRAY
reentry)
RETURNS
DESCRIPTION Update the simulator stops
ADDITIONAL
INFO
EXAMPLE SetSimStop(_StopLoss, _Percent, 20, 1)
[TOP]
1.16.17 SetSimTiming
SETSIMTIMING Simulator
Simulation timing
SYNTAX SetSimTiming( ENUM entry type, ENUM entry price, ARRAY decalage
(1 to execute the next bar))
RETURNS
DESCRIPTION Update the trading system order type
ADDITIONAL
INFO
EXAMPLE SetSimTiming(_Buy, _Open, 1)
[TOP]
SYNTAX ShortPrice( ARRAY stop, ARRAY limit, ARRAY valid for (bars))
RETURNS
DESCRIPTION Set the Limit & Stop price for the short order (Set order type using
'SetSimTiming' function. Example: _StopLimit).
The order is valid for the specified number of bars, after this period the order is
canceled.
ADDITIONAL
INFO
EXAMPLE ShortPrice(close * 1.01, close, 5)
[TOP]
1.17 String
1.17.1 GetDataString
GETDATASTRING String
String Database Field
1.17.2 GetDataStringIndex
GETDATASTRINGINDEX String
String Database Field Index
1.17.3 GetDataStringInside
GETDATASTRINGINSIDE String
String Database Field Index Inside
1.17.4 IffStr
IFFSTR String
IF-Then-Else
1.17.5 StringContains
STRINGCONTAINS String
String Contains
1.17.6 StringEqual
STRINGEQUAL String
String Equals
1.17.7 StringExtract
STRINGEXTRACT String
String Extract
1.17.8 StringExtractEnds
STRINGEXTRACTENDS String
String Extract Ends
1.17.9 StringExtractStart
STRINGEXTRACTSTART String
String Extract Start
1.17.10 StringInsert
STRINGINSERT String
String Insert
1.17.11 StringLength
STRINGLENGTH String
String Length
1.17.12 StringReplace
STRINGREPLACE String
String Replace
SYNTAX Address()
RETURNS TEXT ARRAY
DESCRIPTION Returns the symbol's Address
ADDITIONAL
INFO
EXAMPLE Address()
[TOP]
1.18.2 Country
COUNTRY Symbol Info
Country
SYNTAX Country()
RETURNS TEXT ARRAY
DESCRIPTION Returns the symbol's Country
ADDITIONAL
INFO
EXAMPLE Country()
[TOP]
1.18.3 Currency
CURRENCY Symbol Info
Currency
SYNTAX Currency()
RETURNS TEXT ARRAY
DESCRIPTION Returns the symbol's Currency
ADDITIONAL
INFO
EXAMPLE Currency()
[TOP]
1.18.4 FullName
FULLNAME Symbol Info
FullName
SYNTAX FullName()
RETURNS TEXT ARRAY
DESCRIPTION Returns the symbol's FullName
ADDITIONAL
INFO
EXAMPLE FullName()
[TOP]
1.18.5 Group
GROUP Symbol Info
Group
SYNTAX Group()
RETURNS TEXT ARRAY
DESCRIPTION Returns the symbol's Group
ADDITIONAL
INFO
EXAMPLE Group()
[TOP]
1.18.6 Index
INDEX Symbol Info
Index
SYNTAX Index()
RETURNS TEXT ARRAY
DESCRIPTION Returns the symbol's Index
ADDITIONAL
INFO
EXAMPLE Index()
[TOP]
1.18.7 Industry
INDUSTRY Symbol Info
Industry
SYNTAX Industry()
RETURNS TEXT ARRAY
DESCRIPTION Returns the symbol's Industry
ADDITIONAL
INFO
EXAMPLE Industry()
[TOP]
1.18.8 IsInList
ISINLIST Symbol Info
Is In List
1.18.9 Market
MARKET Symbol Info
Market
SYNTAX Market()
RETURNS TEXT ARRAY
DESCRIPTION Returns the symbol's Market
ADDITIONAL
INFO
EXAMPLE Market()
[TOP]
1.18.10 Name1
NAME1 Symbol Info
Name1
SYNTAX Name1()
RETURNS TEXT ARRAY
DESCRIPTION Returns the symbol's Name1
ADDITIONAL
INFO
EXAMPLE Name1()
[TOP]
1.18.11 Name2
NAME2 Symbol Info
Name2
SYNTAX Name2()
RETURNS TEXT ARRAY
DESCRIPTION Returns the symbol's Name2
ADDITIONAL
INFO
EXAMPLE Name2()
[TOP]
1.18.12 Name3
NAME3 Symbol Info
Name3
SYNTAX Name3()
RETURNS TEXT ARRAY
DESCRIPTION Returns the symbol's Name3
ADDITIONAL
INFO
EXAMPLE Name3()
[TOP]
1.18.13 Name
NAME Symbol Info
Name
SYNTAX Name()
RETURNS TEXT ARRAY
DESCRIPTION Returns the symbol's Name
ADDITIONAL
INFO
EXAMPLE Name()
[TOP]
1.18.14 Sector
SECTOR Symbol Info
Sector
SYNTAX Sector()
RETURNS TEXT ARRAY
DESCRIPTION Returns the symbol's Sector
ADDITIONAL
INFO
EXAMPLE Sector()
[TOP]
1.18.15 Website
WEBSITE Symbol Info
Website
SYNTAX Website()
RETURNS TEXT ARRAY
DESCRIPTION Returns the symbol's Website
ADDITIONAL
INFO
EXAMPLE Website()
[TOP]
1.19 Technical
1.19.1 AMA
AMA Technical
Adaptive Moving Average
1.19.4 BarsSince
BARSSINCE Technical
Bars Since
1.19.5 Count
COUNT Technical
Count
SYNTAX Count()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the number of bars
ADDITIONAL
INFO
EXAMPLE Count()
[TOP]
1.19.6 Cross
CROSS Technical
Cross
1.19.7 GFun
GFUN Technical
Gaussian
SYNTAX HistoPrice( ENUM price, ARRAY day lag (o to get the current day))
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the historical close, open, high, low, volume or open interest of past
days
ADDITIONAL
INFO
EXAMPLE HistoPrice(_open, 1)
[TOP]
SYNTAX HistoPrice( ENUM price, ARRAY day lag (o to get the current day),
ARRAY use open session time. 1 for true.)
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the historical close, open, high, low, volume or open interest of past
days. Ability to select whether to use session open time or not.
ADDITIONAL
INFO
EXAMPLE HistoPrice(_open, 1, 1)
[TOP]
1.19.19 Iff
IFF Technical
IF-Then-Else
1.19.20 IsFalse
ISFALSE Technical
Is False
1.19.21 IsLastBar
ISLASTBAR Technical
Is Last Bars
SYNTAX IsLastBar()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns 1 if the the current bar is the last one
ADDITIONAL
INFO
EXAMPLE IsLastBar()
[TOP]
1.19.22 IsNaN
ISNAN Technical
Is NaN
1.19.23 IsNoNaN
ISNONAN Technical
Is not NaN
1.19.24 IsNoZero
ISNOZERO Technical
Is not Zero
1.19.25 IsNull
ISNULL Technical
Is NULL
1.19.26 IsTrue
ISTRUE Technical
Is True
1.19.27 LastNotNullValue
LASTNOTNULLVALUE Technical
Last not null
1.19.28 LastValue
LASTVALUE Technical
Last Value
1.19.35 LSwitch
LSWITCH Technical
Latching Switch
1.19.36 NaNtoLast
NANTOLAST Technical
NaN to Last
1.19.37 NaNtoZero
NANTOZERO Technical
NaN values to Zero
1.19.42 Perf
PERF Technical
Performance over a specified period
1.19.43 PerfD
PERFD Technical
Average Daily Performance
1.19.44 Rank
RANK Technical
Rank
1.19.45 Ref
REF Technical
Lag
1.19.46 RefZero
REFZERO Technical
Lag modified
1.19.49 RFun
RFUN Technical
Relative Volatility
1.19.52 TotalBars
TOTALBARS Technical
Total Bars
SYNTAX TotalBars()
RETURNS NUMERIC ARRAY
DESCRIPTION Returns the total number of bars
ADDITIONAL
INFO
EXAMPLE TotalBars()
[TOP]
1.19.57 Value
VALUE Technical
Value
1.19.60 ZigZag
ZIGZAG Technical
Zig Zag
1.20 Time-frame
1.20.1 TimeframeApply
TIMEFRAMEAPPLY Time-frame
Change the timeframe of a time-series
1.20.2 TimeframeCompress
TIMEFRAMECOMPRESS Time-frame
Compress a time-series
1.20.3 TimeframeDecompress
TIMEFRAMEDECOMPRESS Time-frame
Decompress a time-series
1.20.6 TimeframeGetSeries
TIMEFRAMEGETSERIES Time-frame
Get a time-series for a different time-frame
1.20.7 TimeframeRestore
TIMEFRAMERESTORE Time-frame
Restore time-frame
SYNTAX TimeframeRestore()
RETURNS
DESCRIPTION Restore the original time-frame
ADDITIONAL
INFO
EXAMPLE TimeframeRestore()
[TOP]
1.20.8 TimeframeSet
TIMEFRAMESET Time-frame
Set time-frame