ITMScript · Migrate
From thinkScript
How a thinkScript study becomes an ITMScript study, line by line, and which lines are refused and why.
Convert a script
There are two ways in. In the study builder, select Import, leave the language on Auto or choose thinkScript, paste the script and select Convert. Or paste the script into the chart console, which reads it as thinkScript, converts it on your device and adds the study to the chart.
Both use the same converter. It reads the script as text and uses no model, so the same script always gives the same result. The builder page covers the import view.
What you get
A converted study is plain ITMScript. It opens with //@itmscript 2. Each statement is on its own line, in the order of the original. You can read it, change it and add it to the chart like any study you wrote.
A line the converter cannot carry over stays in the study as a comment. The comment starts with // refused, then names the code, the line and what to write instead. The rest of the study still converts, so you can fix the comment by hand.
A line that converts with a difference carries a note in the report. The report lists every line as converted, converted with a note, refused or dropped. A dropped line is one that has no effect on values, such as a rule that hides the study on daily charts. Nothing is lost without a note.
What was measured
The converter was measured on 643 original scripts in common shapes, written for this converter, never copied from a published script. 126 converted without a note. 349 converted with at least one note. 168 had at least one refused line.
A count is of scripts. The set includes the shapes that are refused by design, so it is a record of what the converter does and not a promise about your script. The report on your script is the last word.
Same, close, not yet and refused
Each row of the tables below carries one of four words.
- Same
- The numbers agree with the original once the warm-up has passed.
- Close
- The line converts and the report carries a note. Read the note and check the result against the original.
- Not yet
- The language cannot say this today. The line is refused with a code and a rewrite, and a later release may convert it.
- Refused
- ITMScript does not do this by design. The line is refused with a code and a rewrite.
Names are matched without regard to case. A row describes a name. A name can convert in one shape and be refused in another, so the report is the last word on a script.
The chart line
A thinkScript study does not say which chart it runs on, and some conversions depend on it. Write the chart timeframe on the first line as a comment, such as # chart: 5m. The converter reads that line and the report repeats the timeframe it assumed.
Without the line, the converter assumes an intraday chart. A read of another period then carries a note, because on a daily chart a one day series is the chart itself. Its close would be today's close and not yesterday's.
Other symbols and periods
A read of another period, such as close(period = AggregationPeriod.DAY)[1], becomes a declared series. The converter writes a declaration such as d = series(timeframe="1d") once and reads the fields of d where the script read the period. A read of another symbol, such as close("SPY"), becomes a declared series for that symbol. The other data page explains declared series.
A declared series shows the last completed bar. A read of a period with no offset shows the bar that is still forming, so it is refused as a lookahead. Add the offset [1] to read the last finished bar. A period chosen by an input converts to a timeframe input that feeds the declared series. A period finer than the chart is refused, because a study runs on the chart's own clock.
A crossing of the chart and a declared series, such as close crosses above hi, converts as the difference crossing zero, ta.crossover(close - hi, 0). The difference runs on the chart's bars. Any other function that keeps a window over the chart and a declared series together is refused, because the window would count repeated bars. Take the difference first and use the result. A window over one declared series alone converts.
Time and sessions
The calendar fields of ITMScript are time, year, month, dayofmonth, dayofweek, hour, minute and the session.* facts. A volume weighted price restarts at a period with a reset= word. The time and sessions page says what each one reads. The functions table below gives the match word of every thinkScript time, calendar and session function, and the report is the last word on a script.
Scripts, displacements and choices
A script block with several plots converts to a function that returns them. A call reads the plots it needs by name and passes its inputs by position or by name. Two calls may pass different values.
A def declared without a value and set in every branch of an if block converts as one value. A block with no else is refused. The row of a paired def is listed where the block stands.
A displacement set by an input, as in close[-displace], converts when the input is 0 or below. A default of -3 reads the close three bars back. The input is held to a range from -500 to 0, so the study never reads a bar that has not closed. A default above 0 would read ahead, so the plot that reads it is refused.
The built-in studies that draw displaced plots convert plot by plot. The two leading spans of the Ichimoku study are drawn 26 bars ahead, so they take offset=26. A read of a leading span by another value sees the span of 26 bars back. The lagging span is drawn back and is refused. A call of Ichimoku that names no plot is refused, because its plots are drawn apart. A call of a study in the studies table that names no plot reads its first plot. The direction of the shift of DisplacedEMA and Displacer is not established, so both are refused as plots and as reads and are not guessed. The alligator study is refused.
An AverageType input becomes a choice input. A call of MovingAverage over it becomes a chain of comparisons with the options, in order, and the last option is the branch that remains. A switch over an input written as a list of names becomes a choice in the same way. Each case names an option and the default stays as the last branch. A case that is not an option is refused as a mistyped line. A choice read in any other way is refused.
A period of two, three or four days converts. It may be written as AggregationPeriod.TWO_DAYS, THREE_DAYS or FOUR_DAYS, or as quoted text such as "2 Days". Both spellings give the same declared series.
Refused by design
Some lines are refused because ITMScript does not do what they ask, not because the converter is incomplete. Each has a code, a meaning and a rewrite. The codes also appear on the error codes page.
- Orders. A script that places simulated orders is a strategy. A study draws an indicator and never trades. Convert the indicator logic and mark entries and exits with markers or alerts.
- Drawings. Bubbles, profiles and shapes at chart coordinates have no equivalent. A study produces series and markers.
- Reads of the whole chart and of the future. A value taken over every bar of the chart, such as the highest high of the whole chart, needs bars that have not closed. ITMScript reads history backward only. A negative history offset is refused for the same reason. Use a rolling window over a fixed number of bars.
- Loops with no fixed bound. The work of a study must be known before it runs. A fold over a fixed number of bars converts to a rolling operator. A fold whose bound changes does not.
- Random numbers and text built from values. They differ between runs or cannot be reproduced.
| Code | What the line does | What to write instead |
|---|---|---|
convert-parse | The line could not be read as a statement of the source language. | Check the line for a typo, or write it by hand in ITMScript. |
convert-strategy | A strategy places simulated orders. An ITMScript study draws an indicator and never trades. | Convert the indicator logic as a study. Mark entries and exits with plotshape or alertcondition. |
convert-drawing | Labels, lines, boxes and tables drawn at chart coordinates have no equivalent. A study produces series and markers. | Plot the level as a series with plot or hline. Use value or events for a table of numbers. |
convert-lookahead | The script reads a bar that has not closed yet. ITMScript reads history backward only. | Read the previous bar with x[1] and accept the one bar delay. |
convert-loop-unbounded | The loop has no fixed bound, so its work cannot be limited before it runs. | Use a rolling operator with a fixed window, such as ta.sma(x, N) or ta.highest(x, N). |
convert-string-op | String arithmetic and string comparison are not part of ITMScript. Text is used for titles and labels only. | Compare numbers or conditions instead of text. Keep text for titles and labels. |
convert-security-lower-tf | The request asks for bars finer than the chart. A study runs on the chart clock. | Run the study on the finer chart and declare the coarser series with series(timeframe=...). |
convert-request-feed | The request asks for data that is not a price series, such as financials, economic series or earnings. | Use a price series declared with series(symbol=...), or enter the value as an input.float. |
convert-series-length | A window length that changes from bar to bar cannot size the state of an operator. | Use a constant or an input for the length, for example len = input.int(14). |
convert-plot-offset | A plot shifts ahead by a whole number of bars from 0 to 500, written in the call or given by an int input and arithmetic over int inputs. A shift backward draws a later bar's value on an earlier bar, which this language cannot draw, and a shift on any output but plot is not carried. | Write the shift as a number or an int input on the plot. For a value from n bars ago, read it with x[n]. A plot shifted back has no form. |
convert-dynamic-offset | A history offset that changes from bar to bar cannot be bounded before the run. | Use a constant or an input for the offset, for example x[len] with len = input.int(5). |
convert-dynamic-text | Text built from values at run time, such as a label that shows a price, is not supported. | Plot the number. Use value for a single readout. |
convert-host-visual | Candle, bar and price colouring replace the drawing of the chart itself. A study adds series and markers on top of it. | Use plotshape markers, or tint the background with bgcolor. |
convert-nondeterministic | Random numbers, the wall clock and other values that differ between runs break reproducibility. | Remove the value, or replace it with a fixed input. |
convert-instrument-meta | Facts about the instrument, such as tick size, point value or currency, are not available to a study. | Enter the value as an input.float and set it for the instrument. |
convert-unknown-call | The function or variable has no equivalent in the converter tables. | Write the calculation with ITMScript operators, or remove the line. |
convert-period-open | A period's own open, high, low or close read without an offset is the forming period's value, which this language cannot state exactly on this chart. | Read the closed period with a shift of one, for example d.close[1]. |
convert-limit | The script is larger or more deeply nested than the converter accepts. | Split the script into smaller studies and convert each one. |
Examples
Each example is a script run through the converter. The left side is the script as written. The right side is what the converter wrote, unedited.
The previous day, read on a fifteen minute chart
A read of another period becomes a declared series. The chart line sets the timeframe the read assumes.
# chart: 15m
# The close of the previous day, averaged with the open of the previous day.
declare upper;
def priorClose = close(period = AggregationPeriod.DAY)[1];
def priorOpen = open(period = AggregationPeriod.DAY)[1];
plot Middle = (priorClose + priorOpen) / 2;//@itmscript 2
study("Untitled study", overlay=true)
d = series(timeframe="1d")
priorClose = d.close
priorOpen = d.open
plot((priorClose + priorOpen) / 2, "Middle")Report: 2 converted, 2 with a note, 0 refused, 0 dropped.
- The mapping assumes an intraday chart. On a daily chart a 1d series is the chart itself, so its close would be today's close and not yesterday's.
- The mapping assumes an intraday chart. On a daily chart a 1d series is the chart itself, so its open would be today's open and not yesterday's.
The start of an exponential average
The source starts from the first price. This language starts from a window mean, so early values differ.
# chart: 5m
# An exponential average starts from the first price here and from a window mean in the target.
declare upper;
plot Smooth = ExpAverage(close, 20);//@itmscript 2
study("Untitled study", overlay=true)
plot(ta.ema(close, 20), "Smooth")Report: 0 converted, 1 with a note, 0 refused, 0 dropped.
- ExpAverage starts from the first price.
ta.emastarts from the average of the first window. For the same numbers from bar 1 useta.ewm(x, 2/(len+1)).
The bar count
The source counts from one. This language counts from zero, so one is added.
# chart: 5m
# The bar count starts at one in the source and at zero here, so the converter adds one.
declare lower;
plot Position = BarNumber();//@itmscript 2
study("Untitled study", overlay=false)
plot(bar_index + 1, "Position")Report: 0 converted, 1 with a note, 0 refused, 0 dropped.
- The count starts at the first bar of the run.
A script block with several plots
A block that plots two values becomes a function that returns both. Each call reads the plots it needs, and a second call may pass another length.
# chart: 15m
# A block with two defs and two plots. A is the upper band and B is the lower band, both read from one call, and a second call has another length.
declare lower;
script bands {
input length = 20;
input width = 2;
def basis = Average(close, length);
def spread = width * StDev(close, length);
plot A = basis + spread;
plot B = basis - spread;
}
plot Upper = bands().A;
plot Lower = bands().B;
plot Slow = bands(50).A;//@itmscript 2
study("Untitled study", overlay=false)
bands(length, width) =>
basis = ta.sma(close, length)
spread = width * ta.stdev(close, length)
[basis + spread, basis - spread]
[bands_A, bands_B] = bands(20, 2)
plot(bands_A, "Upper")
plot(bands_B, "Lower")
[bands_A_2, bands_B_2] = bands(50, 2)
plot(bands_A_2, "Slow")Report: 5 converted, 1 with a note, 0 refused, 0 dropped.
- A script block is written as a function. Its inputs are the parameters, its defs are local names and its plot is the result. Several plots are a tuple. ITMScript uses the population form. Whether the source platform divides by the length or by one less has not been verified.
A displacement from an input
A displacement of minus three reads the close three bars back. The input is held to a range from minus 500 to 0, so the study never reads a bar that has not closed. A displacement above 0 is refused.
# chart: 5m
# A displacement of -3 reads the close three bars back, so the average is drawn three bars later.
declare upper;
input length = 9;
input displace = -3;
plot Avg = Average(close[-displace], length);//@itmscript 2
study("Untitled study", overlay=true)
length = input.int(9, "length", min=1, max=10000)
displace = input.int(-3, "displace", min=-500, max=0)
plot(ta.sma(close[-displace], length), "Avg")Report: 2 converted, 1 with a note, 0 refused, 0 dropped.
- The displacement reads an earlier bar, so the input stops at 0. A value above 0 would read a bar that has not happened yet.
A built-in study with displaced plots
The conversion line, the base line and the two leading spans convert. A leading span is drawn 26 bars ahead, so it takes offset=26. The lagging span is drawn back, so it is refused.
# chart: 1d
# The study drawn plot by plot. The conversion line, the base line and the two leading spans convert, a span drawn 26 bars ahead. The lagging span is drawn 26 bars back and is refused.
declare upper;
plot Conversion = Ichimoku().Tenkan;
plot Base = Ichimoku().Kijun;
plot LeadA = Ichimoku()."Span A";
plot LeadB = Ichimoku()."Span B";
plot Lagging = Ichimoku().Chikou;
LeadA.SetDefaultColor(Color.GREEN);
LeadB.SetDefaultColor(Color.RED);//@itmscript 2
study("Untitled study", overlay=true)
plot((ta.highest(high, 9) + ta.lowest(low, 9)) / 2, "Conversion")
plot((ta.highest(high, 26) + ta.lowest(low, 26)) / 2, "Base")
plot(((ta.highest(high, 9) + ta.lowest(low, 9)) / 2 + (ta.highest(high, 26) + ta.lowest(low, 26)) / 2) / 2, "LeadA", color=color.green, offset=26)
plot((ta.highest(high, 52) + ta.lowest(low, 52)) / 2, "LeadB", color=color.red, offset=26)
// refused convert-plot-offset: plot Lagging = Ichimoku().Chikou;. Write the shift as a number or an int input on the plot. For a value from n bars ago, read it with x[n]. A plot shifted back has no form.Report: 4 converted, 0 with a note, 1 refused, 0 dropped.
- This line is part of the statement on line 7.
- This line is part of the statement on line 8.
Ichimoku().Chikoudraws the close of a later bar on an earlier bar.
An average type chosen by an input
The input becomes a choice. The call becomes a chain of comparisons with its options, in their order, and the last option is the branch that remains.
# chart: 5m
# The average type is an input. The call becomes a chain of comparisons with the options, in their order.
declare upper;
input averageType = AverageType.EXPONENTIAL;
input length = 20;
plot MA = MovingAverage(averageType, close, length);//@itmscript 2
study("Untitled study", overlay=true)
averageType = input.choice("exponential", ["simple", "exponential", "weighted", "wilders", "hull"], "averageType")
length = input.int(20, "length", min=1, max=10000)
plot(averageType == "simple" ? ta.sma(close, length) : (averageType == "exponential" ? ta.ema(close, length) : (averageType == "weighted" ? ta.wma(close, length) : (averageType == "wilders" ? ta.rma(close, length) : ta.hma(close, length)))), "MA")Report: 1 converted, 2 with a note, 0 refused, 0 dropped.
- A choice input compares with one of its options, and the comparison picks a value.
- The exponential average starts from the first price in the source and from the average of the first window here. For the same numbers from bar 1 use
ta.ewm(x, 2/(len+1)).
A switch over a list of choices
An input written as a list of names becomes a choice. Each case names an option and the default stays as the last branch.
# chart: 5m
# A switch over a list of choices picks a measure of the bar. Each case names an option.
declare lower;
input measure = {default body, range, upperWick};
def size = switch (measure) {
case body: AbsValue(close - open);
case range: high - low;
case upperWick: high - Max(open, close);
default: 0;
};
plot Size = size;//@itmscript 2
study("Untitled study", overlay=false)
measure = input.choice("body", ["body", "range", "upperWick"], "measure")
size = measure == "body" ? math.abs(close - open) : (measure == "range" ? high - low : (measure == "upperWick" ? high - math.max(open, close) : 0))
plot(size, "Size")Report: 2 converted, 1 with a note, 0 refused, 0 dropped.
- A choice input compares with one of its options, and the comparison picks a value.
Periods of two, three and four days
A period written as quoted text gives the same declared series as its constant. The read of the last finished bar uses the offset one.
# chart: 30m
# A quoted period of two, three or four days is the same series as its constant. The close read is the last completed bar of it.
declare lower;
plot Two = close(period = "2 Days")[1];
plot Three = close(period = "3 Days")[1];
plot Four = close(period = "4 Days")[1];//@itmscript 2
study("Untitled study", overlay=false)
tf_2d = series(timeframe="2d")
plot(tf_2d.close, "Two")
tf_3d = series(timeframe="3d")
plot(tf_3d.close, "Three")
tf_4d = series(timeframe="4d")
plot(tf_4d.close, "Four")Report: 3 converted, 3 with a note, 0 refused, 0 dropped.
- The mapping assumes a chart finer than 2d. On a chart of 2d or coarser a 2d series is the chart itself, so its close would be the current bar's close and not the previous bar's.
- The mapping assumes a chart finer than 3d. On a chart of 3d or coarser a 3d series is the chart itself, so its close would be the current bar's close and not the previous bar's.
- The mapping assumes a chart finer than 4d. On a chart of 4d or coarser a 4d series is the chart itself, so its close would be the current bar's close and not the previous bar's.
The open of the current hour
A period open for the hour has no restart word to hold it by, so the line is refused with a rewrite.
# chart: 5m
# The open of the current hour has no restart word to hold it by, so it is refused.
declare upper;
plot HourOpen = open(period = AggregationPeriod.HOUR);//@itmscript 2
study("Untitled study", overlay=true)
// refused convert-period-open: plot HourOpen = open(period = AggregationPeriod.HOUR);. Read the closed period with a shift of one, for example `open(period = AggregationPeriod.HOUR)[1]`.Report: 0 converted, 0 with a note, 1 refused, 0 dropped.
open(period = AggregationPeriod.HOUR)is the open of a period the language does not restart on.
Functions and names
Every function and built-in name the converter knows, except the studies called by name, which have their own table. A call has arguments. A name is read as it stands.
| thinkScript | Form | Becomes | Match | Note |
|---|---|---|---|---|
a crosses above b | Call | ta.crossover | Same | |
a crosses below b | Call | ta.crossunder | Same | |
a crosses b | Call | ta.cross | Same | |
Average | Call | ta.sma | Same | |
ExpAverage | Call | ta.ema | Close | ExpAverage starts from the first price. ta.ema starts from the average of the first window. For the same numbers from bar 1 use ta.ewm(x, 2/(len+1)). |
EMA2 | Call | ta.ewm | Close | The prefetch input is not used. The average starts from the first price. |
WildersAverage | Call | ta.rma | Same | |
WMA | Call | ta.wma | Same | |
MovingAverage | Call | ta.sma | Close | The average type is read from its constant and the matching operator is used. |
Highest | Call | ta.highest | Same | |
Lowest | Call | ta.lowest | Same | |
HighestAll | Call | Not converted | Refused | Use a rolling ta.highest(x, N) or ta.lowest(x, N) over a fixed window. convert-lookahead |
LowestAll | Call | Not converted | Refused | Use a rolling ta.highest(x, N) or ta.lowest(x, N) over a fixed window. convert-lookahead |
HighestWeighted | Call | Not converted | Refused | Build the weighted window by hand with ta.highest. convert-unknown-call |
LowestWeighted | Call | Not converted | Refused | Build the weighted window by hand with ta.lowest. convert-unknown-call |
GetMaxValueOffset | Call | ta.highestbars | Same | |
GetMinValueOffset | Call | ta.lowestbars | Same | |
Median | Call | ta.median | Same | |
TrueRange | Call | ta.tr | Same | |
AccumDist | Call | ta.accdist | Close | The argument order and the volume weighting are read as the standard formula. |
MoneyFlow | Call | ta.mfi | Close | MoneyFlow is read as the standard money flow index over hlc3 and the bar volume. |
BodyHeight | Call | math.abs | Close | BodyHeight is read as the absolute difference of close and open. |
IsAscending | Call | ta.rising | Close | The strictness of the test has not been verified. |
IsDescending | Call | ta.falling | Close | The strictness of the test has not been verified. |
IsDoji | Call | Not converted | Refused | Write the candle test from open, high, low and close. convert-unknown-call |
IsLongBlack | Call | Not converted | Refused | Write the candle test from open, high, low and close. convert-unknown-call |
IsLongWhite | Call | Not converted | Refused | Write the candle test from open, high, low and close. convert-unknown-call |
FastKCustom | Call | Not converted | Not yet | Write ta.stoch(close, 14) and smooth it with ta.sma for the slow line. convert-unknown-call |
Ulcer | Call | ta.ulcer | Close | The highest value is taken over the trailing length bars. Check the result against the original. |
GetMarketMakerMove | Call | Not converted | Refused | Market maker data is not available to a study. convert-request-feed |
AbsValue | Call | math.abs | Same | |
ACos | Call | math.acos | Same | |
ASin | Call | math.asin | Same | |
ATan | Call | math.atan | Same | |
Cos | Call | math.cos | Same | |
Sin | Call | math.sin | Same | |
Tan | Call | math.tan | Same | |
Exp | Call | math.exp | Same | |
Floor | Call | math.floor | Same | |
Ceil | Call | math.ceil | Same | |
Sign | Call | math.sign | Same | |
Sqrt | Call | math.sqrt | Same | |
Log | Call | math.log | Same | |
Lg | Call | math.log10 | Same | |
Max | Call | math.max | Same | |
Min | Call | math.min | Same | |
Power | Call | math.pow | Same | |
Round | Call | math.round | Close | Halves are rounded away from zero. A digit count is written as a scale by a power of ten. |
RoundDown | Call | math.floor | Close | RoundDown is read as the floor at the digit count. |
RoundUp | Call | math.ceil | Close | RoundUp is read as the ceiling at the digit count. |
IsNaN | Call | na | Same | |
IsInfinite | Call | na | Close | A value that is not finite is na here, so IsInfinite is always false. |
Random | Call | Not converted | Refused | Remove the value or replace it with a fixed input. convert-nondeterministic |
Sum | Call | ta.sum | Same | |
TotalSum | Call | ta.cum | Close | The total starts at the first bar of the run. |
Crosses | Call | ta.crossover | Same | |
Correlation | Call | ta.correlation | Same | |
Covariance | Call | ta.cov | Same | |
StDev | Call | ta.stdev | Close | ITMScript uses the population form. Whether the source platform divides by the length or by one less has not been verified. |
LinDev | Call | ta.dev | Close | ta.dev is the mean absolute deviation about the window mean. |
Inertia | Call | ta.linreg | Same | |
StErr | Call | ta.stderr | Close | ITMScript divides the squared residuals of the fitted line by the length less two. Whether the source platform does the same has not been verified. Check the result against the original. |
StDevAll | Call | Not converted | Refused | Use a rolling ta.highest(x, N) or ta.lowest(x, N) over a fixed window. convert-lookahead |
StErrAll | Call | Not converted | Refused | Use a rolling ta.highest(x, N) or ta.lowest(x, N) over a fixed window. convert-lookahead |
InertiaAll | Call | Not converted | Refused | Use a rolling ta.highest(x, N) or ta.lowest(x, N) over a fixed window. convert-lookahead |
open | Name | open | Same | |
high | Name | high | Same | |
low | Name | low | Same | |
close | Name | close | Same | |
volume | Name | volume | Same | |
hl2 | Name | hl2 | Same | |
hlc3 | Name | hlc3 | Same | |
ohlc4 | Name | ohlc4 | Same | |
vwap | Name | hlc3 | Close | The bar's typical price stands for its volume-weighted price. |
bid | Name | Not converted | Refused | ITMScript bars carry open, high, low, close and volume only. convert-unknown-call |
ask | Name | Not converted | Refused | ITMScript bars carry open, high, low, close and volume only. convert-unknown-call |
tick_count | Name | Not converted | Refused | ITMScript bars carry open, high, low, close and volume only. convert-unknown-call |
imp_volatility | Name | Not converted | Refused | ITMScript bars carry open, high, low, close and volume only. convert-unknown-call |
open_interest | Name | Not converted | Refused | ITMScript bars carry open, high, low, close and volume only. convert-unknown-call |
GetAggregationPeriod | Call | Not converted | Not yet | The chart's timeframe is not a value in this language. Write one study for each timeframe. convert-calendar |
Fundamental | Call | Not converted | Refused | Enter the value as an input.float. convert-request-feed |
First | Call | Not converted | Refused | Write the first value with a rolling operator or ta.valuewhen. convert-unknown-call |
GetDay | Call | Not converted | Not yet | The day of the year is not a calendar field, and the source counts it on the Central clock. convert-calendar |
GetWeek | Call | Not converted | Not yet | The week of the year is not a calendar field, and the source counts it on the Central clock. convert-calendar |
GetTime | Call | Not converted | Not yet | The source does not say which instant of the bar it returns, so the time field is not read as the same number. convert-calendar |
RegularTradingStart | Call | Not converted | Not yet | The session's open and close times are not a number here. hour and minute give the bar's own clock. Use session.isfirstbar for the first bar. convert-calendar |
RegularTradingEnd | Call | Not converted | Not yet | The session's open and close times are not a number here. hour and minute give the bar's own clock. Use session.islastbar for the last bar. convert-calendar |
CountTradingDays | Call | Not converted | Not yet | No field counts the sessions between two dates. convert-calendar |
DaysFromDate | Call | Not converted | Not yet | No field counts the days between a date and the bar, and the source reads the date on the Eastern clock. convert-calendar |
DaysTillDate | Call | Not converted | Not yet | No field counts the days between a date and the bar, and the source reads the date on the Eastern clock. convert-calendar |
GetLastDay | Call | Not converted | Not yet | The source reads the last bar of the chart, which an earlier bar cannot know. convert-calendar |
GetLastMonth | Call | Not converted | Not yet | The source reads the last bar of the chart, which an earlier bar cannot know. convert-calendar |
GetLastWeek | Call | Not converted | Not yet | The source reads the last bar of the chart, which an earlier bar cannot know. convert-calendar |
GetLastYear | Call | Not converted | Not yet | The source reads the last bar of the chart, which an earlier bar cannot know. convert-calendar |
GetSymbol | Call | Not converted | Refused | Enter the value as an input.float and set it for the instrument. convert-instrument-meta |
GetSymbolPart | Call | Not converted | Refused | Enter the value as an input.float and set it for the instrument. convert-instrument-meta |
TickSize | Call | Not converted | Refused | Enter the value as an input.float and set it for the instrument. convert-instrument-meta |
TickValue | Call | Not converted | Refused | Enter the value as an input.float and set it for the instrument. convert-instrument-meta |
HasContractChangeEvent | Call | Not converted | Refused | Enter the value as an input.float and set it for the instrument. convert-instrument-meta |
GetPriceType | Call | Not converted | Refused | Enter the value as an input.float and set it for the instrument. convert-instrument-meta |
GetInterestRate | Call | Not converted | Refused | Enter the rate as an input.float. convert-request-feed |
GetYield | Call | Not converted | Refused | Enter the rate as an input.float. convert-request-feed |
MovAvgTriangular | Call | Not converted | Not yet | Write ta.sma(ta.sma(close, 10), 11) for a length of 20. convert-unknown-call |
DEMA | Call | Not converted | Not yet | Write 2 * e1 - e2 with e1 = ta.ema(close, 20) and e2 = ta.ema(e1, 20). convert-unknown-call |
TEMA | Call | Not converted | Not yet | Write 3 * e1 - 3 * e2 + e3 with each average taken over the one before it. convert-unknown-call |
StochRSI | Call | Not converted | Not yet | Write r = ta.rsi(close, 14) and then (r - ta.lowest(r, 14)) / (ta.highest(r, 14) - ta.lowest(r, 14)) * 100. convert-unknown-call |
MACDHistogram | Call | Not converted | Not yet | Write [m, s, h] = ta.macd(close, 12, 26, 9) and plot h. convert-unknown-call |
BollingerBandwidth | Call | Not converted | Not yet | Write ta.bbw(close, 20, 2) * 100. Check the scale. convert-unknown-call |
BollingerPercentB | Call | Not converted | Not yet | Write (close - lo) / (up - lo) from ta.bb(close, 20, 2). convert-unknown-call |
KeltnerChannels | Call | Not converted | Not yet | Write [mid, up, lo] = ta.kc(close, 20, 2). convert-unknown-call |
TrueRangeIndicator | Call | Not converted | Not yet | Write ta.tr(). convert-unknown-call |
DIPlus | Call | Not converted | Not yet | Write [dip, dim, adx] = ta.dmi(14, 14) and plot dip. convert-unknown-call |
DIMinus | Call | Not converted | Not yet | Write [dip, dim, adx] = ta.dmi(14, 14) and plot dim. convert-unknown-call |
ParabolicSAR | Call | Not converted | Not yet | Write ta.sar(0.02, 0.02, 0.2). convert-unknown-call |
StochasticFull | Call | Not converted | Not yet | Write ta.sma(ta.stoch(close, 14), 3) and smooth it again for the slow line. convert-unknown-call |
StochasticFast | Call | Not converted | Not yet | Write ta.stoch(close, 14). convert-unknown-call |
StochasticSlow | Call | Not converted | Not yet | Write ta.sma(ta.stoch(close, 14), 3). convert-unknown-call |
MoneyFlowIndex | Call | Not converted | Not yet | Write ta.mfi(hlc3, 14). convert-unknown-call |
AccumulationDistribution | Call | Not converted | Not yet | Write ta.accdist(). convert-unknown-call |
NegativeVolumeIndex | Call | Not converted | Not yet | Write ta.nvi(). convert-unknown-call |
PositiveVolumeIndex | Call | Not converted | Not yet | Write ta.pvi(). convert-unknown-call |
PriceAndVolumeTrend | Call | Not converted | Not yet | Write ta.pvt(). convert-unknown-call |
PercentChg | Call | Not converted | Not yet | Write ta.pctchange(close, 1) * 100. convert-unknown-call |
TrueStrengthIndex | Call | Not converted | Not yet | Write ta.tsi(close, 13, 25). Check the scale. convert-unknown-call |
ChandeMomentumOscillator | Call | Not converted | Not yet | Write ta.cmo(close, 9). convert-unknown-call |
LinearRegCurve | Call | Not converted | Not yet | Write ta.linreg(close, 20, 0). convert-unknown-call |
LinearRegressionSlope | Call | Not converted | Not yet | Write [a, b, r2, res] = ta.regress(close, bar_index, 20) and plot b. convert-unknown-call |
AwesomeOscillator | Call | Not converted | Not yet | Write ta.sma(hl2, 5) - ta.sma(hl2, 34). convert-unknown-call |
AroonIndicator | Call | Not converted | Not yet | Write 100 * (len - ta.highestbars(high, len + 1)) / len. convert-unknown-call |
ChaikinOscillator | Call | Not converted | Not yet | Write ta.ema(ta.accdist(), 3) - ta.ema(ta.accdist(), 10). convert-unknown-call |
ChaikinMoneyFlow | Call | Not converted | Not yet | Write a ratio of ta.sum of money flow volume to ta.sum(volume, 20). convert-unknown-call |
UltimateOscillator | Call | Not converted | Not yet | The ultimate oscillator has no operator here. Write its three averages from ta.sum of buying pressure over true range. convert-unknown-call |
StandardError | Call | Not converted | Not yet | Write ta.stderr(close, 20). convert-unknown-call |
UlcerIndex | Call | Not converted | Not yet | Write ta.ulcer(close, 14). convert-unknown-call |
PivotPoints | Call | Not converted | Not yet | Declare d = series(timeframe="1d") and compute the levels from d.high, d.low and d.close. convert-unknown-call |
CamarillaPoints | Call | Not converted | Not yet | Declare d = series(timeframe="1d") and compute the levels from d.high, d.low and d.close. convert-unknown-call |
WoodiesPivots | Call | Not converted | Not yet | Declare d = series(timeframe="1d") and compute the levels from d.high, d.low and d.close. convert-unknown-call |
DailyHighLow | Call | Not converted | Not yet | Declare d = series(timeframe="1d") and read d.high and d.low. convert-unknown-call |
DailyOpen | Call | Not converted | Not yet | Declare d = series(timeframe="1d") and read d.open. convert-unknown-call |
DailySMA | Call | Not converted | Not yet | Declare d = series(timeframe="1d") and read d.close with a window of daily bars. convert-unknown-call |
Ichimoku | Call | ta.highest | Same | |
WilliamsAlligator | Call | Not converted | Not yet | Read an earlier value with x[n], or draw a value later with plot(x, offset=n). convert-plot-offset |
DisplacedEMA | Call | Not converted | Not yet | Read an earlier value with x[n], or draw a value later with plot(x, offset=n). convert-plot-offset |
Displacer | Call | Not converted | Not yet | Read an earlier value with x[n], or draw a value later with plot(x, offset=n). convert-plot-offset |
TTM_Squeeze | Call | Not converted | Not yet | Compare ta.bb with ta.kc and plot the momentum from ta.linreg. Plot one series per colour. convert-series-color |
AnchoredVWAP | Call | Not converted | Not yet | An anchor at a chosen date has no form here. ta.vwap(hlc3, reset=week) restarts on a period, and ta.vwap(hlc3) runs from the first bar. convert-calendar |
VWAP | Call | ta.vwap | Close | The source weights each trade's price. Here each bar's typical price is weighted by its volume. |
ZigZagPercent | Call | Not converted | Refused | A zigzag redraws earlier bars. Use ta.pivothigh and ta.pivotlow, which confirm a pivot after the bars to its right. convert-lookahead |
ZigZagHighLow | Call | Not converted | Refused | A zigzag redraws earlier bars. Use ta.pivothigh and ta.pivotlow, which confirm a pivot after the bars to its right. convert-lookahead |
ZigZagSign | Call | Not converted | Refused | A zigzag redraws earlier bars. Use ta.pivothigh and ta.pivotlow, which confirm a pivot after the bars to its right. convert-lookahead |
ZigZagTrendPercent | Call | Not converted | Refused | A zigzag redraws earlier bars. Use ta.pivothigh and ta.pivotlow, which confirm a pivot after the bars to its right. convert-lookahead |
VolumeProfile | Call | Not converted | Refused | Plot the level you need with plot or hline. convert-drawing |
TPOProfile | Call | Not converted | Refused | Plot the level you need with plot or hline. convert-drawing |
MonkeyBars | Call | Not converted | Refused | Plot the level you need with plot or hline. convert-drawing |
DarvasBox | Call | Not converted | Not yet | Write the recurrence by hand with scan(x, init, f). convert-state |
HeikinAshiDiff | Call | Not converted | Not yet | Write the recurrence by hand with scan(x, init, f). convert-state |
SequenceCounter | Call | Not converted | Not yet | Write the recurrence by hand with scan(x, init, f). convert-state |
TrendPeriods | Call | Not converted | Not yet | Write the recurrence by hand with scan(x, init, f). convert-state |
Beta | Call | Not converted | Not yet | Write ta.beta(y, x, 60) with s = series(symbol="SPY") for x. convert-unknown-call |
PriceChannel | Call | Not converted | Not yet | Write ta.highest(high, 20) for the upper band and ta.lowest(low, 20) for the lower band. convert-unknown-call |
TypicalPrice | Call | Not converted | Not yet | Write hlc3 for the price and ta.sma(hlc3, 20) for its average. convert-unknown-call |
PairCorrelation | Call | Not converted | Not yet | Write ta.correlation(close, s.close, 60) with s = series(symbol="SPY"). convert-unknown-call |
PairRatio | Call | Not converted | Not yet | Write ta.ratio(close, s.close) with s = series(symbol="SPY"). convert-unknown-call |
Spreads | Call | Not converted | Not yet | Write ta.spread(close, s.close) with s = series(symbol="SPY"). convert-unknown-call |
RelativeStrength | Call | Not converted | Not yet | Write ta.ratio(close, s.close) with s = series(symbol="SPY"). convert-unknown-call |
Studies called by name
A study is called by name, such as RSI(length = 14) or MACD().Avg. It converts when its documented signature maps to one operator, with the study's documented defaults and the named plot. A default that the source documentation does not state is used with a note that says so. A study whose default average or seed differs from the operator's carries a note that says so. A name that is not a study the converter reads is refused with convert-unknown-call. The rewrite says to write the calculation with ITMScript operators, and the functions table names the operator where there is one.
A plot whose match differs from its study's has its own line under the study. An arrow that a study draws has no value to read, so a read of one is refused.
| thinkScript | Becomes | Match | Note |
|---|---|---|---|
SimpleMovingAvg | ta.sma | Same | |
UpSignal | Refused | Write the crossing with ta.crossover or ta.crossunder and draw it with plotshape. convert-parse | |
DownSignal | Refused | Write the crossing with ta.crossover or ta.crossunder and draw it with plotshape. convert-parse | |
MovAvgExponential | ta.ema | Close | ExpAverage starts from the first price. ta.ema starts from the average of the first window. For the same numbers from bar 1 use ta.ewm(x, 2/(len+1)). |
UpSignal | Refused | Write the crossing with ta.crossover or ta.crossunder and draw it with plotshape. convert-parse | |
DownSignal | Refused | Write the crossing with ta.crossover or ta.crossunder and draw it with plotshape. convert-parse | |
MovAvgWeighted | ta.wma | Same | |
HullMovingAvg | ta.hma | Same | |
RSI | ta.rsi | Same | |
UpSignal | Refused | Write the crossing with ta.crossover or ta.crossunder and draw it with plotshape. convert-parse | |
DownSignal | Refused | Write the crossing with ta.crossover or ta.crossunder and draw it with plotshape. convert-parse | |
ATR | ta.atr | Same | |
MACD | ta.macd | Close | ExpAverage starts from the first price. ta.ema starts from the average of the first window. For the same numbers from bar 1 use ta.ewm(x, 2/(len+1)). The source documentation does not name the price, so the close is used. |
ZeroLine | Same | ||
UpSignal | Refused | Write the crossing with ta.crossover or ta.crossunder and draw it with plotshape. convert-parse | |
DownSignal | Refused | Write the crossing with ta.crossover or ta.crossunder and draw it with plotshape. convert-parse | |
BollingerBands | ta.bb | Close | The source documentation does not say if the deviation divides by the length or by one less. The first is used. |
CCI | ta.cci | Close | The source documentation gives no formula and does not name the price. The standard calculation over the typical price is used. |
OverBought | Same | ||
ZeroLine | Same | ||
OverSold | Same | ||
UpSignal | Refused | Write the crossing with ta.crossover or ta.crossunder and draw it with plotshape. convert-parse | |
DownSignal | Refused | Write the crossing with ta.crossover or ta.crossunder and draw it with plotshape. convert-parse | |
WilliamsPercentR | ta.wpr | Same | |
PercentR | ta.wpr | Close | The source documentation does not say if the range is the highs and lows or the closes. The highs and lows are used. |
OverBought | Same | ||
OverSold | Same | ||
RateOfChange | ta.roc | Same | |
Momentum | ta.mom | Same | |
UpSignal | Refused | Write the crossing with ta.crossover or ta.crossunder and draw it with plotshape. convert-parse | |
DownSignal | Refused | Write the crossing with ta.crossover or ta.crossunder and draw it with plotshape. convert-parse | |
OnBalanceVolume | ta.obv | Close | The source documentation does not say what an unchanged close adds. Nothing is added. |
StandardDeviation | ta.stdev | Same | |
DMI | ta.dmi | Close | The source documentation describes the directional movement less fully than the operator defines it. The standard rule is used. |
ADX | ta.dmi | Close | The source documentation does not describe the directional movement. The standard rule is used, with the same length for the indicators. |
Statements and inputs
Declarations, inputs, outputs, control flow and the forms the converter lowers itself. Match words are as above.
| thinkScript | Becomes | Match | Note |
|---|---|---|---|
declare lower | study(overlay=false) | Same | |
declare upper | study(overlay=true) | Same | |
declare hide_on_daily | Dropped | Close | A rule that hides the study on daily charts has no effect here. |
declare hide_on_intraday | Dropped | Close | A rule that hides the study on intraday charts has no effect here. |
declare once_per_bar | Dropped | Close | A study is calculated once per bar already. |
declare real_size | Dropped | Close | A scale or axis setting. It has no effect here. |
declare zerobase | Dropped | Close | A scale or axis setting. It has no effect here. |
declare on_volume | Dropped | Close | A scale or axis setting. It has no effect here. |
declare weak_volume_dependency | Dropped | Close | A scale or axis setting. It has no effect here. |
input number | input.int | Same | |
input yes/no | input.bool | Same | |
input close | input.source | Same | |
input Color | input.color | Same | |
input AverageType | input.choice | Close | A choice input compares with one of its options, and the comparison picks a value. |
input enum | input.choice | Close | A choice input compares with one of its options, and the comparison picks a value. |
input AggregationPeriod | input.timeframe | Close | The input sets the timeframe of the series that read it. The chart must serve that frequency. |
input string | Not converted | Not yet | Declare the series with a fixed symbol, for example s = series(symbol="SPY"). convert-input-series |
input "name" | input.int | Same | |
def | name = expr | Same | |
rec | Not converted | Not yet | Write the recurrence by hand with scan(x, init, f), or use an operator such as ta.ema, ta.cum, latch or hold. convert-state |
plot | plot | Same | |
if then else | c ? a : b | Same | |
If | c ? a : b | Same | |
and | and | Same | |
or | or | Same | |
not | not | Same | |
x between a and b | x >= a and x <= b | Close | Between is read as inclusive of both bounds. |
Between | x >= a and x <= b | Close | Between is read as inclusive of both bounds. |
x[n] | x[n] | Same | |
x from n bars ago | x[n] | Same | |
x[-n] | Not converted | Refused | Read past bars with x[n] and a positive n. convert-lookahead |
GetValue | x[n] | Close | GetValue is read as a history offset. The offset has to be a number. |
fold | Not converted | Not yet | Use a rolling operator with a fixed window, such as ta.sum(x, N) or ta.sma(x, N). convert-loop-unbounded |
script | name(params) => expr | Close | A script block is written as a function. Its inputs are the parameters, its defs are local names and its plot is the result. Several plots are a tuple. |
switch | c ? a : b | Close | A switch is read as a chain of conditions. |
switch on input | c ? a : b | Close | A choice input compares with one of its options, and the comparison picks a value. |
CompoundValue | bar_index >= n ? v : h | Close | CompoundValue is read as bar_index >= n ? v : h. The count starts at the first bar of the run. |
reference | Not converted | Not yet | Write the study by hand with ITMScript operators. convert-unknown-call |
profile | Not converted | Refused | Plot the level you need with plot or hline. convert-drawing |
MidBodyVal | (open + close) / 2 | Close | MidBodyVal is read as the midpoint of open and close. |
Sqr | x * x | Close | Sqr is read as the square of its argument. |
close(period = AggregationPeriod.X)[1] | d.close | Close | The mapping assumes an intraday chart. On a daily chart a 1d series is the chart itself, so its close would be today's close and not yesterday's. |
close(period = AggregationPeriod.X) | Not converted | Refused | Read the previous bar with close(period = AggregationPeriod.DAY)[1]. convert-lookahead |
close("SPY") | s.close | Same | |
BarNumber | bar_index + 1 | Close | The count starts at the first bar of the run. |
GetDayOfWeek | (dayofweek + 5) % 7 + 1 | Same | |
GetMonth | month | Same | |
GetYear | year | Same | |
GetDayOfMonth | dayofmonth | Same | |
SecondsFromTime | (hour * 60 + minute - M) * 60 | Same | |
SecondsTillTime | (M - (hour * 60 + minute)) * 60 | Same | |
GetYYYYMMDD | year * 10000 + month * 100 + dayofmonth | Same | |
Option, corporate action, portfolio and fundamental functions | Not converted | Refused | These read data that is not a price series. Enter the value as an input.float. convert-request-feed |
SetDefaultColor | color= | Close | The colour is written as the color option of the plot. |
SetColor | color= | Close | The colour is written as the color option of the plot. |
SetLineWeight | width= | Close | A line width is a whole number from 1 to 8. |
SetStyle | style= | Close | The line style is written as the style option of the plot. |
AssignValueColor | color= | Same | |
AssignNormGradientColor | Not converted | Not yet | Choose between fixed colours with AssignValueColor(if x then Color.A else Color.B). convert-series-color |
AssignBackgroundColor | bgcolor | Close | The background colour is written as a bgcolor statement. A bar with no colour is na. |
AssignPriceColor | Not converted | Refused | Use plotshape markers, or tint the background with bgcolor. convert-host-visual |
AddCloud | fill | Close | A fill takes one colour. The first colour is used. |
AddLabel | value | Close | A label that shows a number is written as a value readout. |
AddChartBubble | Not converted | Refused | Mark the bar with plotshape or bgcolor. convert-drawing |
AddVerticalLine | Not converted | Refused | Tint the background on the bar with bgcolor. convert-drawing |
Hide | Dropped | Close | Hide is a display setting. It has no effect here. |
HideTitle | Dropped | Close | HideTitle is a display setting. It has no effect here. |
HideBubble | Dropped | Close | HideBubble is a display setting. It has no effect here. |
HidePricePlot | Dropped | Close | HidePricePlot is a display setting. It has no effect here. |
EnableApproximation | Dropped | Close | EnableApproximation is a display setting. It has no effect here. |
TakeValueColor | Dropped | Close | TakeValueColor is a display setting. It has no effect here. |
SetHiding | cond ? na : x | Close | The plot is na on the bars where the condition is true. |
SetChartType | Not converted | Refused | ITMScript studies add series on top of the chart. The chart type is set on the chart. convert-host-visual |
CreateColor | #rrggbb | Close | The colour is written as a hex colour. |
DefineColor | color | Close | A named colour is written where it is used. |
DefineGlobalColor | color | Close | A named colour is written where it is used. |
GlobalColor | color | Close | A named colour is written where it is used. |
Color | Not converted | Refused | Write the colour as color.blue or a #rrggbb literal. convert-unknown-call |
GetColor | Not converted | Refused | Write the colour as color.blue or a #rrggbb literal. convert-unknown-call |
Alert | alertcondition | Close | The alert type and sound are not used. |
AddOrder | Not converted | Refused | Convert the indicator logic as a study. Mark entries and exits with plotshape or alertcondition. convert-strategy |
EntryPrice | Not converted | Refused | Convert the indicator logic as a study. Mark entries and exits with plotshape or alertcondition. convert-strategy |
FPL | Not converted | Refused | Convert the indicator logic as a study. Mark entries and exits with plotshape or alertcondition. convert-strategy |
AsText | Not converted | Refused | Compare numbers or conditions instead of text. Keep text for titles and labels. convert-string-op |
AsPercent | Not converted | Refused | Compare numbers or conditions instead of text. Keep text for titles and labels. convert-string-op |
AsDollars | Not converted | Refused | Compare numbers or conditions instead of text. Keep text for titles and labels. convert-string-op |
AsPrice | Not converted | Refused | Compare numbers or conditions instead of text. Keep text for titles and labels. convert-string-op |
Concat | Not converted | Refused | Compare numbers or conditions instead of text. Keep text for titles and labels. convert-string-op |
Assert | Not converted | Refused | Compare numbers or conditions instead of text. Keep text for titles and labels. convert-string-op |
Constants
Colours, plot styles, marker styles and locations. The names on the right are listed on the colours and styles page.
| thinkScript | Becomes | Match | Note |
|---|---|---|---|
yes | true | Same | |
no | false | Same | |
true | true | Same | |
false | false | Same | |
Double.NaN | na | Same | |
Double.E | math.e() | Same | |
Double.Pi | math.pi() | Same | |
Double.POSITIVE_INFINITY | Not converted | Refused | A value that is not finite is na here. Use na or test with na(x). convert-unknown-call |
Double.NEGATIVE_INFINITY | Not converted | Refused | A value that is not finite is na here. Use na or test with na(x). convert-unknown-call |
AggregationPeriod.MIN | 1m | Same | |
AggregationPeriod.TWO_MIN | 2m | Same | |
AggregationPeriod.THREE_MIN | 3m | Same | |
AggregationPeriod.FOUR_MIN | 4m | Same | |
AggregationPeriod.FIVE_MIN | 5m | Same | |
AggregationPeriod.TEN_MIN | 10m | Same | |
AggregationPeriod.FIFTEEN_MIN | 15m | Same | |
AggregationPeriod.TWENTY_MIN | 20m | Same | |
AggregationPeriod.THIRTY_MIN | 30m | Same | |
AggregationPeriod.HOUR | 1h | Same | |
AggregationPeriod.TWO_HOURS | 2h | Same | |
AggregationPeriod.FOUR_HOURS | 4h | Same | |
AggregationPeriod.DAY | 1d | Same | |
AggregationPeriod.TWO_DAYS | 2d | Same | |
AggregationPeriod.THREE_DAYS | 3d | Same | |
AggregationPeriod.FOUR_DAYS | 4d | Same | |
AggregationPeriod.WEEK | 1w | Same | |
AggregationPeriod.MONTH | 1mo | Same | |
AggregationPeriod.QUARTER | 1q | Same | |
AggregationPeriod.YEAR | 1y | Same | |
AggregationPeriod.2 DAYS | 2d | Same | |
AggregationPeriod.3 DAYS | 3d | Same | |
AggregationPeriod.4 DAYS | 4d | Same | |
AggregationPeriod.OPT_EXP | Not converted | Refused | Option expiration periods are not available. Use a fixed timeframe such as "1d". convert-unknown-call |
Color.BLACK | black | Same | |
Color.BLUE | blue | Same | |
Color.CYAN | cyan | Same | |
Color.DARK_GRAY | gray | Close | Color.DARK_GRAY has no exact match. It was written as color.gray. |
Color.DARK_GREEN | green | Close | Color.DARK_GREEN has no exact match. It was written as color.green. |
Color.DARK_ORANGE | orange | Close | Color.DARK_ORANGE has no exact match. It was written as color.orange. |
Color.DARK_RED | maroon | Close | Color.DARK_RED has no exact match. It was written as color.maroon. |
Color.DOWNTICK | red | Close | Color.DOWNTICK has no exact match. It was written as color.red. |
Color.GRAY | gray | Same | |
Color.GREEN | green | Same | |
Color.LIGHT_GRAY | silver | Close | Color.LIGHT_GRAY has no exact match. It was written as color.silver. |
Color.LIGHT_GREEN | lime | Close | Color.LIGHT_GREEN has no exact match. It was written as color.lime. |
Color.LIGHT_ORANGE | orange | Close | Color.LIGHT_ORANGE has no exact match. It was written as color.orange. |
Color.LIGHT_RED | pink | Close | Color.LIGHT_RED has no exact match. It was written as color.pink. |
Color.LIME | lime | Same | |
Color.MAGENTA | fuchsia | Same | |
Color.ORANGE | orange | Same | |
Color.PINK | pink | Same | |
Color.PLUM | purple | Close | Color.PLUM has no exact match. It was written as color.purple. |
Color.RED | red | Same | |
Color.UPTICK | green | Close | Color.UPTICK has no exact match. It was written as color.green. |
Color.VIOLET | purple | Close | Color.VIOLET has no exact match. It was written as color.purple. |
Color.WHITE | white | Same | |
Color.YELLOW | yellow | Same | |
PaintingStrategy.LINE | plot:line | Same | |
PaintingStrategy.LINE_VS_POINTS | plot:line | Close | The drawing style has no exact match. The nearest style is used. |
PaintingStrategy.LINE_VS_SQUARES | plot:line | Close | The drawing style has no exact match. The nearest style is used. |
PaintingStrategy.LINE_VS_TRIANGLES | plot:line | Close | The drawing style has no exact match. The nearest style is used. |
PaintingStrategy.HISTOGRAM | plot:histogram | Same | |
PaintingStrategy.SQUARED_HISTOGRAM | plot:columns | Close | The drawing style has no exact match. The nearest style is used. |
PaintingStrategy.POINTS | plot:circles | Close | The drawing style has no exact match. The nearest style is used. |
PaintingStrategy.SQUARES | plot:circles | Close | The drawing style has no exact match. The nearest style is used. |
PaintingStrategy.TRIANGLES | plot:circles | Close | The drawing style has no exact match. The nearest style is used. |
PaintingStrategy.DASHES | plot:cross | Close | The drawing style has no exact match. The nearest style is used. |
PaintingStrategy.HORIZONTAL | plot:stepline | Close | The drawing style has no exact match. The nearest style is used. |
PaintingStrategy.BOOLEAN_ARROW_UP | shape:arrowup:belowbar | Same | |
PaintingStrategy.BOOLEAN_ARROW_DOWN | shape:arrowdown:abovebar | Same | |
PaintingStrategy.BOOLEAN_POINTS | shape:circle:absolute | Close | The drawing style has no exact match. The nearest style is used. |
PaintingStrategy.BOOLEAN_WEDGE_UP | shape:triangleup:belowbar | Close | The drawing style has no exact match. The nearest style is used. |
PaintingStrategy.BOOLEAN_WEDGE_DOWN | shape:triangledown:abovebar | Close | The drawing style has no exact match. The nearest style is used. |
Curve.FIRM | plot:line | Same | |
Curve.POINTS | plot:circles | Close | The drawing style has no exact match. The nearest style is used. |
Curve.SHORT_DASH | plot:line | Close | ITMScript has no dashed plot style. The line is drawn solid. |
Curve.MEDIUM_DASH | plot:line | Close | ITMScript has no dashed plot style. The line is drawn solid. |
Curve.LONG_DASH | plot:line | Close | ITMScript has no dashed plot style. The line is drawn solid. |
PaintingStrategy.ARROW_UP | Not converted | Not yet | Plot a yes or no condition with BOOLEAN_ARROW_UP or BOOLEAN_ARROW_DOWN. convert-unknown-call |
PaintingStrategy.ARROW_DOWN | Not converted | Not yet | Plot a yes or no condition with BOOLEAN_ARROW_UP or BOOLEAN_ARROW_DOWN. convert-unknown-call |
PaintingStrategy.VALUES_ABOVE | Not converted | Not yet | Plot the number. Use value for a single readout. convert-dynamic-text |
PaintingStrategy.VALUES_BELOW | Not converted | Not yet | Plot the number. Use value for a single readout. convert-dynamic-text |
AverageType.SIMPLE | ta.sma | Same | |
AverageType.EXPONENTIAL | ta.ema | Close | The exponential average starts from the first price in the source and from the average of the first window here. For the same numbers from bar 1 use ta.ewm(x, 2/(len+1)). |
AverageType.HULL | ta.hma | Same | |
AverageType.WEIGHTED | ta.wma | Same | |
AverageType.WILDERS | ta.rma | Same | |
CrossingDirection.ABOVE | ta.crossover | Same | |
CrossingDirection.BELOW | ta.crossunder | Same | |
CrossingDirection.ANY | ta.cross | Same | |
Color.CURRENT | na | Close | Color.CURRENT leaves the colour unchanged. It is written as na. |
Alert.BAR | Dropped | Close | The alert frequency is not used. |
Alert.ONCE | Dropped | Close | The alert frequency is not used. |
Alert.TICK | Dropped | Close | The alert frequency is not used. |
Sound.Bell | Dropped | Close | Alert sounds are not used. |
Sound.Chimes | Dropped | Close | Alert sounds are not used. |
Sound.Ding | Dropped | Close | Alert sounds are not used. |
Sound.NoSound | Dropped | Close | Alert sounds are not used. |
Sound.Ring | Dropped | Close | Alert sounds are not used. |