; EmEditor Syntax File for thinkScript (thinkorswim trading platform's scripting language) ; ; To import this file to an existing configuration, select Configuration ; under the Tool menu, select Define Configurations, select a configuration ; you want to import to, press "Properties", select the Highlight page, and ; press "Import". If the "Import" button is disabled, check if ; "Only User Defined Strings" or "Both User-Defined Strings and Default Keywords" ; is selected in the drop-down list box under the "Enable Keyword Highlight". ; ; Submit your customized file to submit@emurasoft.com ; to be listed in www.emeditor.com Library page - Syntax Files section. ; #Highlight=on #BeginTag= #EndTag= #CommentBegin= #CommentEnd= #LineComment1=# #LineComment2= #SingleQuote=on #DoubleQuote=on #ContinueQuote=off #Escape= #ScriptBegin= #ScriptEnd= #SpecialSyntax=off #HighlightBraces=on ; Reserved Words #Keyword color=7,word=on,rightall=off,case=off,insidetag=off,regexp=off,rightall2=off above ago and bar bars below between case crosses declare def default do else equal equals false fold from greater if input boolean constant enum float integer price string is less no not or plot profile rec reference script switch than then to true while with within yes ; Declarations #Keyword color=3,word=on,rightall=off,case=off,insidetag=off,regexp=off,rightall2=off hide_on_daily hide_on_intraday lower on_volume once_per_bar real_size upper weak_volume_dependency zerobase ; Functions #Keyword color=2,word=on,rightall=off,case=off,insidetag=off,regexp=off,rightall2=off ; fundamentals ask bid close high hl2 hlc3 imp_volatility low ohc4 open open_interest tick_count volume vwap ; look and feel AddChartBubble AddCloud AddLabel AddVerticalLine AssignBackgroundColor AssignNormGradientColor AssignPriceColor AssignValueColor Color CreateColor DefineColor DefineGlobalColor EnableApproximation GetColor GlobalColor Hide HideBubble HidePricePlot HideTitle SetChartType SetDefaultColor SetHiding SetLineWeight SetPaintingStrategy SetStyle TakeValueColor ; option related Delta Gamma GetATMOption GetDaysToExpiration GetNextExpirationOption GetNextITMOption GetNextOTMOption GetStrike GetUnderlyingSymbol IsEuropean IsOptionable IsPut OptionPrice Rho Theta Vega ; technical analysis AccumDist Average BodyHeight EMA2 ExpAverage FastKCustom GetMarketMakerMove GetMaxValueOffset GetMinValueOffset Highest HighestAll HighestWeighted IsAscending IsDescending IsDoji IsLongBlack IsLongWhite Lowest LowestAll LowestWeighted Median MidBodyVal MoneyFlow MovingAverage MovAvgExponential TrueRange Ulcer WildersAverage WMA ; mathematical and trigonometric AbsValue ACos ASin ATan Ceil Cos Crosses Exp Floor IsInfinite IsNaN Lg Log Max Min Power Random Round RoundDown RoundUp Sign Sin Sqr Sqrt Sum Tan TotalSum ; statistical Correlation Covariance Inertia InertiaAll LinDev StDev StDevAll StErr StErrAll ; date and time CountTradingDays DaysFromDate DaysTillDate GetDay GetDayOfMonth GetDayOfWeek GetLastDay GetLastMonth GetLastWeek GetLastYear GetMonth GetTime GetWeek GetYear GetYYYYMMDD RegularTradingEnd RegularTradingStart SecondsFromTime SecondsTillTime ; corporate actions GetActualEarnings GetDividend GetEstimatedEarnings GetEventOffset GetSplitDenominator GetSplitNumerator HasConferenceCall HasEarnings ; portfolio GetAveragePrice GetNetLiq GetOpenPL GetQuantity GetTotalCash ; profiles DataProfile GetHighest GetHighestValueArea GetLowest GetLowestValueArea GetPointOfControl MonkeyBars Show TimeProfile VolumeProfile ; stock fundamentals BookValuePerShare CurrentRatio DividendPayout DividendsPerShareTTM EarningsPerShareTTM FinancialLeverage FixedChargeCoverageRatio FreeCashFlowPerShare GrossProfitMargin InterestRate InventoryTurnover LongTermDebtToCapital NetProfitMargin OperatingProfitMargin QuickRatio ReturnOnAssets ReturnOnEquity SalesPerShare TaxRate TotalAssetTurnover ; others AddOrder Alert AsDollars AsPercent AsPrice Assert AsText BarNumber Between CompoundValue Concat EntryPrice First FPL Fundemental GetAggregationPeriod GetInterestRate GetPriceType GetSymbol GetSymbolPart GetValue GetYield HasContractChangeEvent If TickSize TickValue ; Constants #Keyword color=4,word=on,rightall=off,case=off,insidetag=off,regexp=off,rightall2=off AggregationPeriod MIN TWO_MIN THREE_MIN FOUR_MIN FIVE_MIN TEN_MIN FIFTEEN_MIN TWENTY_MIN THIRTY_MIN HOUR TWO_HOURS FOUR_HOURS DAY TWO_DAYS THREE_DAYS FOUR_DAYS WEEK MONTH OPT_EXP QUARTER YEAR Alert BAR ONCE TICK AverageType EXPONENTIAL HULL SIMPLE WEIGHTED WILDERS ChartType BAR CANDLE CANDLE_TREND HEIKIN_ASHI EQUIVOLUME LINE AREA Color BLACK BLUE CURRENT CYAN DARK_GRAY DARK_GREEN DARK_ORANGE DARK_RED DOWNTICK GRAY GREEN LIGHT_GRAY LIGHT_GREEN LIGHT_ORANGE LIGHT_RED LIME MAGENTA ORANGE PINK PLUM RED UPTICK VIOLET WHITE YELLOW CrossingDirection ABOVE BELOW ANY Curve FIRM LONG_DASH MEDIUM_DASH SHORT_DASH POINTS Double E NaN NEGATIVE_INFINITY Pi POSITIVE_INFINITY EarningTime ANY BEFORE_MARKET AFTER_MARKET Events CONFERENCE_CALL DIVIDEND EARNINGS SPLIT FiscalPeriod QUARTER YEAR FontSize SMALL MEDIUM LARGE LARGER VERY_LARGE X_LARGE FundamentalType HIGH LOW CLOSE OPEN HL2 HLC3 OHLC4 VWAP VOLUME OPEN_INTEREST IMP_VOLATILITY TICK_COUNT Location TOP_LEFT TOP_RIGHT BOTTOM_LEFT BOTTOM_RIGHT MonkeyVolumeShowStyle ALL LAST NONE NumberFormat DOLLAR THREE_DECIMAL_PLACES TWO_DECIMAL_PLACES OptionClass CALL PUT OrderType BUY_AUTO BUY_TO_CLOSE BUY_TO_OPEN SELL_AUTO SELL_TO_CLOSE SELL_TO_OPEN PaintingStrategy ARROW_DOWN ARROW_UP BOOLEAN_ARROW_DOWN BOOLEAN_ARROW_UP BOOLEAN_POINTS BOOLEAN_WEDGE_DOWN BOOLEAN_WEDGE_UP DASHES HISTOGRAM HORIZONTAL LINE LINE_VS_POINTS LINE_VS_SQUARES LINE_VS_TRIANGLES POINTS SQUARED_HISTOGRAM SQUARES TRIANGLES VALUES_ABOVE VALUES_BELOW PricePerRow AUTOMATIC TICKSIZE PriceType ASK BID LAST MARK ProfiLossMode COST_BASIS EXECUTION_PRICE Sound NoSound Bell Ding Ring Chimes ; Data Types #Keyword color=5,word=on,rightall=off,case=off,insidetag=off,regexp=off,rightall2=off Any Boolean CustomColor double IDataHolder int String Symbol DataConversion ; Operators #Keyword color=9,word=on,rightall=off,case=off,insidetag=off,regexp=off,rightall2=off + - * / % == != <> < > <= >= ! && [] ; Annotations #Keyword color=10,word=on,rightall=off,case=off,insidetag=off,regexp=off,rightall2=off Date