The above formula scan will give you values between 1 to -1. Here is a free one at a premier charting sites, Stock Charts, Check this out for Predefined Scans. `plot Test = fold i = 1 to 5 with x = 10 do x + i; `. at http://mytrade.com/StanL ) tells where, in todays prices, a stock is now i.e. def plotPrice = CompoundValue(1, if timeTest then barnumber else plotPrice[1], barnumber); `def yyyymmdd = GetYYYYMMDD(); `#Returns the date of the charts current bar. crossup.setPaintingStrategy(paintingStrategy.BOOLEAN_ARROW_UP); When doing a lot of coding, using the mouse provides fast traveling to various locations in the code. At times you want to compare the charts DMI with another symbol. "Here is the code for my favorite indicator. Item cut becomes available for pasting. else if price == open_interest then "The price-variable selected is Open_interest = " + Round(open_interest,0) The fold function is used to define the value for a named variable i.e. input averageType = AverageType.EXPONENTIAL;#hint averageType:Select the type of average desired else if price == high then "The price-variable selected is high = " + Round(high,2) Vol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM); onceperchartup.hidetitle(); Plot CrossUp = !mostRecentOnly and crossingup; Calculates the simple moving average using fold. These numbers are based on the columns "day" ), your script only runs once and only against the current (latest) bar. input Mkt_End = 1600;#hint Mkt_End:Show market end time e.g. else if exchange == exchange.AMEX then "AMEX" def LunchTime = TwelveOclock > 0 && TwelveOclock[1] 0; AddVerticalLine(MarketOpen or LunchTime,if MarketOpen then "TIME TO TRADE!" Prior to trading options, you should carefully read Characteristics and Risks of Standardized Options. When GetYYYYMMDD() is compared to an inputted date the commas are omitted in the input date. It is useful to be aware of the techniques so that, when the time comes, you will know where to look to get the how-to-do specifics. Automatically identifies the most popular harmonic patterns. Using 'NumberFormat.DOLLAR' produces the same look as using 'AsDollars'. work because the internal logic of the function performs the action of looking back. else if price == imp_volatility then "The price-variable selected is current imp_volatility = " + AsPercent(imp_volatility) Or, in a different way, it can be said that 2.24 -1 = 1.24 X 100 = 124% which reads that value1 is 124% larger than (or above) value2. Then I select 10-15 stacks and watch it on the second monitor. Situation: "I want to find the best time to enter and exit an order. This allows you to do that. If you are new, or just looking for guidance, here are some helpful links to get you started. Below is a picture of the setup. Not related to the above = and == is the "bang" (exclamation mark). Hope you find this document useful. Also this form can be used with else to create more complex conditions. Commerce Township Departments Direct Phone Number: Supervisor: 248-960-7070: Clerk: 248-960-7020: Treasurer: 248-960-7040: Planning: 248-960-7050: Ordinance Officer You would use 'CompoundValue' to prevent the longest reference being used by initializing the affected calculation with the 'CompoundValue' function. No one can ever exhaust every resource provided on our site. #VolPct.SetDefaultColor(Color.PINK); This is known as a runaway calculation. Plot SAR_Bull = ParabolicSARCrossover(crossingType = "Bullish").signal; PriceAverageCrossover: The Price Average Crossover scans for crossovers of price with its moving average. input price = high;#hint Price:Pick the price option desired.\nHigh is the default.\nOpen_Interest and Imp_Volatility are not valid choices. Visually identify a stable trend on the chart and fit standard deviation channels by dragging your mouse over the selected time period. Any investment decision you make in your self-directed account is solely your responsibility. It may not display this or other websites correctly. Vol.DefineColor("Down", Color.DOWNTICK); else if price == imp_volatility then "imp_volatility" crossup.setDefaultColor(color.light_green); CustomColor color' defines the background color of the label box. left mouse key and drag the chart to the left for as much right-space as you want. else "ERROR"),color.white); onceperchartdown.hidetitle(); Additional examples will be added as they may surface online and in the chatroom. After the above global definition, GlobalColor("Purple") can be use wherever a color is needed. Note that the columns can be customized and adding a 'Send to [4] Green', for example, gives a quick chart of the stock. This is the simplified basics of swingHi/SwingLo. TOS has defined ten colors corresponding to index numbers on two different background colors as below: The colors are used via the function 'GetColor(index number);' Example: GetColor(1) as used in the HullMovingAvg previous topic. ThinkLog is accessed via the 'Tools/ThinkLog' tab and is a ready reference place where you could refresh you memory on the implementation details of the 9/30 strategys particulars. As an example let 10 be the original value (B4) and 15 the final value (NOW). Plot scan = reference MypriceTrend(Price = hlc3, length = 7, choice = "increased"); Note that 'hlc3' may be any parameter such as open, hugh, low, hl2, volume, etc. #VolPct.SetLineWeight(1); input time = 1000;#hint time:Time to place the arrow at. Any suggestion for improvement or inclusion are welcome. The results are a, b, stdev (constant, slope, deviation of samples around regression line). A picture of the setup is shown below: Comment: The Sequence Counter is used as an example and is not a recommended indicator: reviews are not in unison. Plot scan = high > average(close,200) && low < average(close,200), Alternate 2: Price crosses the 200-day MA. To make the line invisible, paint it the same color as your background. "); Not every script that works on a chart/study is worthy of putting in a custom column. If you wanted to apply a longer period channel but on a shorter timeframe, I suggest adding this indicator to your screen, Colored boxes above the red box= longs only off bottom of regression channel, colored boxes below red box= shorts off top of linear regression channel. def Change = (price / price[length] - 1); Plot PctChange = 100 * change; I guess my main point with all of this is that a profitable trading strategy can be based on almost anything. AddLabel(1, "Green is HH cloud", Color.GREEN); In this example, 'nice' was used. When developing a strategy or adding buy/sell arrows to a chart, it is normal to have many conditions that you are considering. Defines whether to always show the label at the specified position, or on mouse hover only, or to hide it completely. RT @egragcrypto: Thank You @XRPNews_ for sharing #XRP Chart " #XRP Regression Channel + Bollinger Band" https://youtube.com/clip/Ugkx . While 'percentage view' is activated, place the cursor-line over the desired bar and right click. "Advance/Decline Line (Daily)" then "Advance/Decline Line (Daily)" A distance of +/- 1 SD from the average will include 68% of the 100 In studies or strategies, ThinkScript runs your script once for each and every bar on your chart, regardless of the aggregation period. 0 to 100%, -1 to +1, -100 In realtime coding, the +1 is replace by all kinds of conditions and resulting actions. The volume histogram; 2. d.setPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP); http://demo.thinkorswim.com:7001/manual/metal/thinkscript/reference/Reserved%20Words/if.html . A number. define a recursive variable. The inputted agg-bar average; and 3. - The use of the word 'reference' is optional but, if 'reference' is omitted, the () must always follow the studys name. Of the five sub-disciplines of Marketing Science-tracking and measurement, data visualization, testing and evaluation, data integration, and statistical modeling-you're a rock star in at least two. This value is the number of milliseconds since the epoch (January 1, 1970, 00:00:00 GMT). Comment: The label is complex and a good example of the use of '+' in lieu of the concat function. Comment: 'NumberFormat.TWO_DECIMAL_PLACES', 'NumberFormat.THREE_DECIMAL_PLACES' and 'NumberFormat.DOLLAR' are the three choices that can be used with 'AsText'. Mobile compatible. High positive values of the slope might indicate a buying opportunity, while low negative values can be considered a signal to sell or open a short position. ThinkScripts linear regression function is titled 'Inertia'. To enhance the looks of a histogram, plot the same histogram data as a line and format that line as follows. Regression channel consists of two parallel lines plotted equidistantly above and below the Regression Line. def NineThirty = secondsFromTime(930) > 0; So to display the presence of a Doji on your chart you code it as : Another point to remember is that some candles are both bearish and bullish. See http://tda.thinkorswim.com/manual/metal/thinkscript/tutorials/advanced/referencing/other%20study.html, image::12-1.png[]Click the Scroll] After installing the %HL you access editing it by right-clicking the watchlist column headings to customize and follow the Learning Center - LinearRegressionSlope - Thinkorswim The date and time functions take a lot of time to learn and much usage to feel comfortable with them. It would be OK to set it a little higher than you know is needed. def = fold = to [ with [ = ] ] [ while ] do ; Each component of the fold function will be explained separately. plot Vol = volume; This indicator will work on any instrument and on any time frame. Lower.HideBubble(); Try them out and you may adopt them as your standard way of editing in combination with using the mouse. The syntax is: ChartPlotName.TakeValueColor(). Editing existing studies does not have the wizard accessible but the wizard in the following picture can be used and the wizard result can be copied for pasting in the existing study editing. Also, whenever someone talks of a 'Gaussian distribution' they are talking of a 'normal distribution' curve. def day = getDay(); has been a great help in my thinkscript development journey. else if price == hl2 then "hl2" To activate privacy that shows * instead of the dollar values, click the blue dot left of the 'Net Liq & Day Trades' and check the privacy square.