From 9b823a03a0cd6163a993f2e64f329537a4b0e93b Mon Sep 17 00:00:00 2001 From: sbhyde-superstar <51730327+sbhyde-superstar@users.noreply.github.com> Date: Wed, 15 Jul 2026 20:16:23 -0500 Subject: [PATCH 1/2] Add files via upload This is the native language of ThinkOrSwim. A trading platform owned and provided by Charles Schwab. It is the most popular and widely distributed trading platform in the US. --- Sample.ts | 9 + XML/autoCompletion/thinkscript.xml | 454 +++++++++++++++++++++++++++++ XML/functionlist/overrideMap.xml | 140 +++++++++ XML/functionlist/thinkScript.xml | 29 ++ XML/thinkScript.xml | 65 +++++ 5 files changed, 697 insertions(+) create mode 100644 Sample.ts create mode 100644 XML/autoCompletion/thinkscript.xml create mode 100644 XML/functionlist/overrideMap.xml create mode 100644 XML/functionlist/thinkScript.xml create mode 100644 XML/thinkScript.xml diff --git a/Sample.ts b/Sample.ts new file mode 100644 index 00000000..da6199c0 --- /dev/null +++ b/Sample.ts @@ -0,0 +1,9 @@ + +# MTF Moving Average + +input AvgType = AverageType.EXPONENTIAL; +input Length = 8; +input priceclose = close; + +plot AVG = MovingAverage(AvgType); +AVG.setdefaultcolor(color.yellow); \ No newline at end of file diff --git a/XML/autoCompletion/thinkscript.xml b/XML/autoCompletion/thinkscript.xml new file mode 100644 index 00000000..5769438d --- /dev/null +++ b/XML/autoCompletion/thinkscript.xml @@ -0,0 +1,454 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/XML/functionlist/overrideMap.xml b/XML/functionlist/overrideMap.xml new file mode 100644 index 00000000..3139440a --- /dev/null +++ b/XML/functionlist/overrideMap.xml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/XML/functionlist/thinkScript.xml b/XML/functionlist/thinkScript.xml new file mode 100644 index 00000000..b6ce5327 --- /dev/null +++ b/XML/functionlist/thinkScript.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/XML/thinkScript.xml b/XML/thinkScript.xml new file mode 100644 index 00000000..ca63aac2 --- /dev/null +++ b/XML/thinkScript.xml @@ -0,0 +1,65 @@ + + + + + + + + + 00# 01 02 03 04 + + + + + + + + + - * / % = == != <> < > <= >= && ! . , ( ) ; + equals "is equal to" "is not equal to" "is less than" "is greater than" "is less than or equal to" "is greater than or equal to" between crosses "crosses above" "crosses below" "is true" "is false" and or + { + + } + + + + + + + hide_on_daily hide_on_intraday lower on_volume once_per_bar real_size upper weak_volume_dependency zerobase + ask bid close high hl2 hlc3 imp_volatility low ohlc4 open open_interest tick_count volume vwap 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 Delta Gamma GetATMOption GetDaysToExpiration GetNextExpirationOption GetNextITMOption GetNextOTMOption GetStrike GetUnderlyingSymbol IsEuropean IsOptionable IsPut OptionPrice Rho Theta Vega AccumDist Average BodyHeight EMA2 ExpAverage FastKCustom GetMarketMakerMove GetMaxValueOffset GetMinValueOffset Highest HighestAll HighestWeighted IsAscending IsDescending IsDoji IsLongBlack IsLongWhite Lowest LowestAll LowestWeighted Median MidBodyVal MoneyFlow MovingAverage TrueRange Ulcer WildersAverage WMA 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 Correlation Covariance Inertia InertiaAll LinDev StDev StDevAll StErr StErrAll CountTradingDays DaysFromDate DaysTillDate GetDay GetDayOfMonth GetDayOfWeek GetLastDay GetLastMonth GetLastWeek GetLastYear GetMonth GetTime GetWeek GetYear GetYYYYMMDD RegularTradingEnd RegularTradingStart SecondsFromTime SecondsTillTime GetActualEarnings GetDividend GetEstimatedEarnings GetEventOffset GetSplitDenominator GetSplitNumerator HasConferenceCall HasEarnings GetAggregatedPL GetAveragePrice GetNetLiq GetOpenPL GetPortfolioAggregatedPL GetTimeWeightedReturn GetQuantity GetTotalCash DataProfile GetHighest GetHighestValueArea GetLowest GetLowestValueArea GetPointOfControl MonkeyBars Show TimeProfile VolumeProfile BookValuePerShare CurrentRatio DividendPayout DividendsPerShareTTM EarningsPerShareTTM FinancialLeverage FixedChargeCoverageRatio FreeCashFlowPerShare GrossProfitMargin InterestRate InventoryTurnover LongTermDebtToCapital NetProfitMargin OperatingProfitMargin QuickRatio ReturnOnAssets ReturnOnEquity SalesPerShare TaxRate TotalAssetTurnover AddOrder Alert AsDollars AsPercent AsPrice Assert AsText BarNumber Between CompoundValue Concat EntryPrice First FPL Fundamental GetAggregationPeriod GetInterestRate GetPriceType GetSymbol GetSymbolPart GetValue GetYield HasContractChangeEvent TickSize TickValue + 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 ProfitLossMode COST_BASIS EXECUTION_PRICE Sound NoSound Bell Ding Ring Chimes + Any boolean constant CustomColor double enum float IDataHolder input int integer_price String Symbol @Date + above ago and bar bars below between case crosses declare def default do else equal equals false fold from greater if is less no not or plot profile rec reference script switch than then to true while with within yes + + + + 00" 01\ 02" 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From cf6ef61fd5dc05230c36bd536c459bd56222b4a5 Mon Sep 17 00:00:00 2001 From: sbhyde-superstar <51730327+sbhyde-superstar@users.noreply.github.com> Date: Sun, 19 Jul 2026 15:04:27 -0500 Subject: [PATCH 2/2] Delete XML directory Per instructions of PeterCJ this should not have been created --- XML/autoCompletion/thinkscript.xml | 454 ----------------------------- XML/functionlist/overrideMap.xml | 140 --------- XML/functionlist/thinkScript.xml | 29 -- XML/thinkScript.xml | 65 ----- 4 files changed, 688 deletions(-) delete mode 100644 XML/autoCompletion/thinkscript.xml delete mode 100644 XML/functionlist/overrideMap.xml delete mode 100644 XML/functionlist/thinkScript.xml delete mode 100644 XML/thinkScript.xml diff --git a/XML/autoCompletion/thinkscript.xml b/XML/autoCompletion/thinkscript.xml deleted file mode 100644 index 5769438d..00000000 --- a/XML/autoCompletion/thinkscript.xml +++ /dev/null @@ -1,454 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/XML/functionlist/overrideMap.xml b/XML/functionlist/overrideMap.xml deleted file mode 100644 index 3139440a..00000000 --- a/XML/functionlist/overrideMap.xml +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/XML/functionlist/thinkScript.xml b/XML/functionlist/thinkScript.xml deleted file mode 100644 index b6ce5327..00000000 --- a/XML/functionlist/thinkScript.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/XML/thinkScript.xml b/XML/thinkScript.xml deleted file mode 100644 index ca63aac2..00000000 --- a/XML/thinkScript.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - 00# 01 02 03 04 - - - - - - - - + - * / % = == != <> < > <= >= && ! . , ( ) ; - equals "is equal to" "is not equal to" "is less than" "is greater than" "is less than or equal to" "is greater than or equal to" between crosses "crosses above" "crosses below" "is true" "is false" and or - { - - } - - - - - - - hide_on_daily hide_on_intraday lower on_volume once_per_bar real_size upper weak_volume_dependency zerobase - ask bid close high hl2 hlc3 imp_volatility low ohlc4 open open_interest tick_count volume vwap 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 Delta Gamma GetATMOption GetDaysToExpiration GetNextExpirationOption GetNextITMOption GetNextOTMOption GetStrike GetUnderlyingSymbol IsEuropean IsOptionable IsPut OptionPrice Rho Theta Vega AccumDist Average BodyHeight EMA2 ExpAverage FastKCustom GetMarketMakerMove GetMaxValueOffset GetMinValueOffset Highest HighestAll HighestWeighted IsAscending IsDescending IsDoji IsLongBlack IsLongWhite Lowest LowestAll LowestWeighted Median MidBodyVal MoneyFlow MovingAverage TrueRange Ulcer WildersAverage WMA 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 Correlation Covariance Inertia InertiaAll LinDev StDev StDevAll StErr StErrAll CountTradingDays DaysFromDate DaysTillDate GetDay GetDayOfMonth GetDayOfWeek GetLastDay GetLastMonth GetLastWeek GetLastYear GetMonth GetTime GetWeek GetYear GetYYYYMMDD RegularTradingEnd RegularTradingStart SecondsFromTime SecondsTillTime GetActualEarnings GetDividend GetEstimatedEarnings GetEventOffset GetSplitDenominator GetSplitNumerator HasConferenceCall HasEarnings GetAggregatedPL GetAveragePrice GetNetLiq GetOpenPL GetPortfolioAggregatedPL GetTimeWeightedReturn GetQuantity GetTotalCash DataProfile GetHighest GetHighestValueArea GetLowest GetLowestValueArea GetPointOfControl MonkeyBars Show TimeProfile VolumeProfile BookValuePerShare CurrentRatio DividendPayout DividendsPerShareTTM EarningsPerShareTTM FinancialLeverage FixedChargeCoverageRatio FreeCashFlowPerShare GrossProfitMargin InterestRate InventoryTurnover LongTermDebtToCapital NetProfitMargin OperatingProfitMargin QuickRatio ReturnOnAssets ReturnOnEquity SalesPerShare TaxRate TotalAssetTurnover AddOrder Alert AsDollars AsPercent AsPrice Assert AsText BarNumber Between CompoundValue Concat EntryPrice First FPL Fundamental GetAggregationPeriod GetInterestRate GetPriceType GetSymbol GetSymbolPart GetValue GetYield HasContractChangeEvent TickSize TickValue - 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 ProfitLossMode COST_BASIS EXECUTION_PRICE Sound NoSound Bell Ding Ring Chimes - Any boolean constant CustomColor double enum float IDataHolder input int integer_price String Symbol @Date - above ago and bar bars below between case crosses declare def default do else equal equals false fold from greater if is less no not or plot profile rec reference script switch than then to true while with within yes - - - - 00" 01\ 02" 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -