Frequently Asked Questions. Comment: If you are learning TS, this is a good example of a study-of-a-study i.e. Perhaps you can do that with the title of the custom column. "UpperBand" is greater than KeltnerChannels(). case NYSE: else if price == low then "The price-variable selected is low = " + Round(low,2) switch (choice) { This is a reminder of an especially valuable resource for new learners of ThinkScript as well as a refresher for you 'pros' out there. Comment: In the label, note the retrieval of the literal AverageType selection. The code is written so that it takes profit after a .2% increase from entry, for scalps. This indicator will automatically curve-fit a polynomial regression channel. def Example2A = Sum(MACDHistogramCrossover(crossingType = "Negative to Positive"), 8) ;#This plots the count of "Negative to Positive" crosses in the last 8 bars including the current bar. The space you panned for will be recorded in 'Chart settings/time axis/expansion area'. Comment: If the above code was in a saved study named 'MyPriceTrend', you would run it by entering the following code in the custom scan location. def LowestLow = If(price < LowestLow[1] and MktIsOpen, price, If(MktIsOpen and LowestLow[1] > 0 and !Bar1, LowestLow[1], price)); def Highest_High = If(MktIsOpen and Show, HighestHigh, Double.NaN); advances = close("$ADVN/Q"); Inside the red box you can trade off both sides of the channel. also takes this opportunity to define the usage of CompoundValue to initialize The reverse is also true when a down-sloped RED bar shows.This is the picture of the subject: Although TOS provides many powerful features, there are also other very useful resources on the Net. This section holds questions and support requests related to our premium ThinkorSwim indicators. The default HV is annual and that is what will show in the label. input Mkt_Start = 0930;#hint Mkt_Start:Show market start time e.g. PolarizedFractalEfficiency_SFL . Comment: The AddChartBubble has coding worth studying. No matter what the timeframe, in those contexts (scans, etc. Note that every custom column has an aggregation that is set to your desires. Using 'Expansion Area: ? Vol.DefineColor("Up", Color.UPTICK); If you are new, or just looking for guidance, here are some helpful links to get you started. The column will then tell where in the range of the last 4 days, the "Upper_Band" and Plot ZeroLine = 0; AddLabel(1,"Shown is the %-change-of-the-first-bar-value of " + close1,color.white); #Puts any of the 11 price choices into a literal text in a label like ohlc4 = 75. The statement "if AggPeriod == AggregationPeriod.DAY then else;" reads: if the variable AggPeriod equals (is the same as) AggregationPeriod.DAY then do something else (otherwise) if its not, then do some other thing. This then enables this study to be referenced/used in intra-day studies/strategies where less-than-one-percent changes are normal. Reddit and its partners use cookies and similar technologies to provide you with a better experience. An example follows: input AverageType = {default Simple, Exponential, Weighted, Wilders, Hull}; To specify an individual selection use, as an example, AverageType == AverageType.Weighted The date and time functions take a lot of time to learn and much usage to feel comfortable with them. Bar-number data and counting can be very useful when debugging code. Lets say you want a calculation to repeat 5 times. This is known as the bearish regression channel. First of all, anything within brackets is optional. else if price == VWAP then "VWAP" input IntraDay = Yes;#Hint IntraDay:Yes for intraday only "MULTIPLE INSTRUMENTS COMPARISON" is a flexible study of ANY 10 INPUT SYMBOLS any of which can be turned of (i.e. The coding of these may be copied and reused in your own studies but built-ins cannot be changed. In the above chart the capitalized words are the names used to specify that color i.e. Numerous examples are used as a learning tool ranging from simple/basic to complex. 2022 Charles Schwab & Co., Inc. All rights reserved. else if price == open_interest then "Open_interest is not a valid choice"