Quotedevildriver6 Robert - not sure if you're around, or know, but I'm working on something and need to get two things.... Or anyone else.... First, I need a way to call last years H. Obviously there's no aggregation for YEAR, which is dumb, but I need it. Also, I need to call yesterday's RTH H. Any help would be appreciated! Note: this will ONLY work on a DAILY chart set to twoby robert - Trading Discussion
Quotedevildriver6 Now I have a question I can't quite figure out. I'm trying to get the average of the volume bars, but I ONLY want the after hours bars to be calculated in the After Hours volume average, and ONLY the RTH bars to be calculated within the RTH volume average, both within the same indicator. This way, it takes the averages of both sections and isn't too high in AHs and too loby robert - Trading Discussion
Quotercmcfe Unfortunately, my text editor (mac) doesn't have a search function. Sure it does. Just press +. Although, I much prefer the free TextWrangler editor from BareBones software.by robert - Trading Discussion
This forum has "automatic smiley" enabled. So anytime the message board encounters a quotation mark followed immediately by a close parenthesis it automatically converts that to a winking smiley. Like so... ") automatically becomes " To get around this when I post scripts, I will first open my script in a text editor then do a search and replace as follows: search foby robert - Trading Discussion
QuoteKamadi Can someone please explain to me what the difference is between Close > Open and Close - Open? Do they mean the same thing. "Close > Open" is a comparison. Is the closing price greater than the opening price? This will evaluate to either True or False "Close - Open" is a math equation. What is the difference between the closing price and the opening priby robert - Trading Discussion
Quotestrategynode I am trying to figure out if a certain condition is true within n number of bars so right now it looks very long and inefficient wondering if there is a easier way to do this I think fold function might help but I am not very familiar with it and am not able to make it work, here is how it looks right now. (condition[1] or condition[2] or condition[3] or condition[4] orby robert - Trading Discussion
Quoteelovemer however the dojis still do not show up on ES ... but they show up for spx It does now. I left out an "=" sign on one of the lines. Thanks for pointing out my error.by robert - Trading Discussion
Until you start calculating the values for lineX at date2, it has an initial value of 0; so that 0 is being plotted. What you want to do is set the initial value of lineX to Double.NaN so that it won't plot anything initially. This can be accomplished by using the CompoundValue() function def lineX = CompoundValue(1, if points then ratio else lineX[1] + slopeX, Double.NaN);by robert - Trading Discussion
Quoteelovemer Robert, can you help me ? i have never liked the fact that TOS does not allow for custom bar spacing. i wrote an indicator which plots solid block candles while skipping a space between each one. The effect is that you get double the spacing between bars. It looks beautiful but .... since my programming is not good, I made it too repetitive. so it uses up too much memoryby robert - Trading Discussion
RR, Yes, this indicator was re-written from the ground up using a completely different algorithm than the one you are discussing. I have compared it to about a dozen or so charts (different time frames, different symbols, different length settings) and all are a match to the QCharts version. I believe this is the only one available for TOS that duplicates the QCharts AutoWave ZigZag.by robert - Trading Discussion
It's finally here! This indicator duplicates the QCharts AutoWave ZigZag feature.by robert - Trading Discussion
if you want daily values, use this instead: def close1 = close(symbol1, period = "day" );by robert - Trading Discussion
input symbol1 = "SPY"; def close1 = close(symbol1); AddLabel(yes, Concat(symbol1, Concat(" : ", close1 - close1[1])), if close1 > close1[1] then Color.DARK_GREEN else Color.RED);by robert - Trading Discussion
Quotecharles I would appreciate some help. I am trying to 'count' the number of bars between the successive highs and (and also for the lows) of the output. But now, I don't see how to compute the number of bars between successive highs and also for the Lows using TS built in functions. Anyone know how to do this? Once I have the number(s), I would like to 'print' the number near eachby robert - Trading Discussion
Quotemntman really enjoying your macd divergence indicator! in times past there has been times i got frustrated expecting a divergence and it not yet play out (ie march '16). but using yours based off Elder's definition of breaking the zero line really has made a difference for me when trying to base my posture expectations. money well spent for my type of trading! thanks again for your excellentby robert - Trading Discussion
Automated RSI Divergence indicator After creating the Mechanical MACD Divergence indicator, the natural thing to do would be to make an automated RSI divergence indicator. So, I did.by robert - Trading Discussion
Quotemntman would you guys happen to know if its possible to add a bubble to a lower study? i tried the "addchartbubble" using highestall(high) but it tries to add it as the upper price, but i may have been doing it wrong too. i use roberts rising tide on a 30dma and was thinking it'd be kinda cool to see the dates of the top and bottom of the average curve in the study to see whenby robert - Trading Discussion
Mechanical MACD Divergence Indicator This indicator is one that I have wanted to create since I very first began learning ThinkScript. Different divergence indicators do exist, but NONE of them have lines drawn on them in the manner that is always shown in technical analysis books. This one does just that.by robert - Trading Discussion
Quotemntman would anyone know how to plot a 0% line in a comparison chart? Just follow the example to add additional symbols as needed. # +--------------------------------------------------+ # | Example: compare multiple symbols | # | Robert Payne | # | rrpayne.blogspot.com | # +-----------------------by robert - Trading Discussion
Just set your doji equal to a range, say the close is within 1% of the open. plot HAdoji = HAclose >= 0.99 * HAopen AND HAclose <= 1.01 * HAopen;by robert - Trading Discussion
QuotePasses syntax test, yet "no matching symbols" on various timeframes... Any thoughts? That just means that there aren't any HA dojis at this time.by robert - Trading Discussion
QuotePalmer Just a quick question here. The following is a simple paintbar study that will color the price bars white if the RSI(14) is greater than 80. declare upper; def rel = reference RSI(14).rsi; AssignpriceColor (If rel > 80 then color.WHITE else color.current); However, it's coloring my volume bars white also when the condition is met. I have the volume plotted in it's own pby robert - Trading Discussion
QuoteJN Hi Bob, Can upcoming earnings date be plotted by this script? Regards, JN I assume you are referring to this script. Yes, it can.by robert - Trading Discussion
The "Market Forecast" indicator is a proprietary Investools indicator that is available only on the ThinkorSwim platform. It is an oscillator that ranges between zero and 100, similar to stochastic and RSI. It works well with indices, futures, currencies, broad-based ETFs, and less-volatile large-cap stocks. It shows multiple time frames on a single chart. The indicator is very nuanby robert - Trading Discussion
Will and Mntman, You need to read about using recursive (self-referencing) variables to carry historical data forward. Reference these articles on the ThinkScript website: This example demonstrates one technique and should get you started. # +--------------------------------------------------+ # | Example: setting & clearing a price level | # |by robert - Trading Discussion
QuoteAnuramanus I was wondering how to do the same with the outline on candles. Take a look at the AssignPriceColor function. Quote Alternately, I would like to just draw a line at the bottom of the chart and change the color of the points on that line ala John Carter's Porsche dots. # +--------------------------------------------------+ # | changing colors based on moving avg relaby robert - Trading Discussion
Quotemntman I'm using roberts reversal areas as my swing targets after breakouts. I'm still fairly new to thinkscript, but my understanding is currently his script has a previous peak extend as a dashed line to the start of the next peak. i would like to modify this where the previous peak only extends for me when todays close comes within 1/2% of that peak level... otherwise it would remain unexby robert - Trading Discussion
mntman, I've been thinking about your problem and have come up with a solution. I'll post something later today when I get home and have some time.by robert - Trading Discussion
Palmer, The code above counted all after-hours volume. The below is modified to only include the volume between two times. When adding to a watchlist column, it must be set to an intrad-day time period and extended hours must be checked. # +--------------------------------------------------+ # | After hours volume | # | modified to ONLY count betweenby robert - Trading Discussion
QuotePalmer Will buy you a round # +--------------------------------------------------+ # | After hours volume | # | robert payne | # | | # +--------------------------------------------------+ input TimeMarketOpens = 0930; input TimeMarketCloses = 1600; def nMinutes = GetAggregationPeriod(by robert - Trading Discussion