TraderBuddy, Try changing this line: rec FixedStopLoss = if !sell then lowest(low[1],5) else double.nan ; to this instead: rec FixedStopLoss = if sell then lowest(low[1],5) else FixedStopLoss[1];by robert - Trading Discussion
My wife and I recently moved to a new house and have been trying to get the old one prepped and listed with a real estate agent so I haven't had much time for scripting of late. Quotebaffled1 Robert, I have to thank you again for the Robert's Averaging algo. It is serving me well. I can trade it standalone with my TriplePoint algo (the one you helped me with), and I also use it to help guiby robert - Trading Discussion
QuoteMark1234 re copied and pasted did a complete system reboot and now getting the alerts...think it's good to go. Glad to hear it. Thanks for the follow-up.by robert - Trading Discussion
QuoteMark1234 Robert, this baby still not working out, just not getting the alert after the white volume bars paint. Hrmmm...I'm not sure what else to do because the code should be working. In fact I tested it last night before posting then again a few minutes ago after reading your post and it worked as expected both times. Please watch this video showing that, at least in my testing, thby robert - Trading Discussion
Quotehabibalex How do I make a Scanner Custom Filter scan in the thinkscript editor using Option Volume? In the thinkscript editor on the Option Hacker page, I am currently using the 'Volume' keyword in a Study Filter, but that appears to be normal trading volume not the option volume. If I make a similar script in Search Results of the Option Hacker and use the same 'Volume' keyword forby robert - Trading Discussion
QuoteMark1234 Thanks Robert, small token of my appreciation sent your way. Very much appreciated. Thank you.by robert - Trading Discussion
Quotemark1234 Robert, tried this out today, wasn't really working out. Trying to get the alarm to signal once the volume bar paints white. Alarms were going off but most times didn't coincide with the painted white bar. If you don't mind taking another peek at that would gladly contribute to the coffee cup fund. Using volume sub on 3200 tick charts for your information if that matters... Thankby robert - Trading Discussion
QuotePalmer Gotcha....well, now a request. I know it's simple but the past 4 hours has me stumped. Just tryng to reference the MoneyFLowIndex for a condition but things are not lining up correctly.... declare lower; def mfi = reference MoneyFlowIndex(10, close).MoneyFlowIndex; The MFI reference isn't correct. Please review this post for details on how to properly reference a predefby robert - Trading Discussion
Quotejakesdad 1-RSI divergence, by Mobius, change lengths and modify, let me know what you think 2- MACD Divergence,by Mobius, change lengths and modify Thanks for sharing the scripts, Dave. I'll keep them on the back burner for now because I may be able to draw inspiration from them later. Quotemark1234 Hi Robert, we're back again with another request. Is there anyway to attachby robert - Trading Discussion
QuoteMel Thank you Robert. Is there any way to move it forward in time i.e: 5 bars forward, so it is not covering the current bars? AddChartBubble(lastbar[-5], Avg, "MA" + length, Color.DARK_ORANGE);by robert - Trading Discussion
QuoteMel Does anyone have code to add a chart bubble to the end of moving average line. Sometimes it gets confusing with multiple moving average and which one is which. I want to see the name of the moving average attach to the line at the end i.e: 50 EMA or 100 SMA. input length = 50; input AvgType = AverageType.SIMPLE; input price = close; plot Avg = MovingAverage(AvgType, price,by robert - Trading Discussion
Hi Robert, Let me know if you would like some divergence studies. I have RSI, MACD, and a few others Dave I'm always happy to learn something new. Thanks, Dave.by robert - Trading Discussion
QuotePalmer Just looking to reference more than one time frame for an indicator or condition. Say you're looking for strength in the 1hr and 30min time frame before making an entry on the 15min chart. I'm short on time tonight so this'll have to be a super short answer. Ask me again later if you can't figure it out. First, read TOS tutorial chapter 12 about referencing secondary aggreby robert - Trading Discussion
QuoteRickT I would like to plot a trendline on 2 highs in Thinkscript. I was thinking 2 recent highest highs (on any timeframe) def HH = HighestAll(high) def HH = HighestAll(high[1]) <--------------[1] in thinkscript mean 1 prior plot HighTrendline = ? Seems somewhat simple but cannot find the right commands to do it. Horizontal line is well documented but I want a line withby robert - Trading Discussion
QuoteKevinR How do I access the values created by EnableApproximation? For instance, I want to determine the slope (line - line[1]) but it still contains NaN... Unfortunately, you cannot access the values that EnableApproximation() generates. However, you can manually calculate slope. Here's an example building on our last bit of sample code. # ----- define a valley as any point whby robert - Trading Discussion
QuotePalmer Heyyyyyy Robert. This is not the entire idea but I can take what you give back and go from there. Wondering if this is possible: Thinking in terms of going long when: Condtion1: The RSI(14) crosses above 50. Starting from the close of that bar, what was the lowest low value in the next 5 bars? Even better, what was the maximum difference in price from the close of thatby robert - Trading Discussion
QuoteTampman Rob: Do you have a script just for auto retracement and extensions fibs? The one I just posted could be used. Anything you don't want to see can be turned off from within the settings. Just hide everything except the fibonacci lines.by robert - Trading Discussion
Quotesquillyd Hello All, I wasn't sure were else to go for help but I'm trying to re-create what is going on in the image below: This is where I’m at now. I’m trying to place the 2nd Order Pivots on Chart. For example, it is supposed to compare 1st order pivot points at barnumber 229 (pH1[229]) to see if it is greater than equal to barnumber 224 and also barnumber 235. This check wby robert - Trading Discussion
My wife and I moved this past week and I'm only just now getting back online again. Whew! I've got some catching up to do.by robert - Trading Discussion
QuoteAnky7544 Hi Robert, Can you help me to create indicator for TOS version? below is indicator for esignal system. I don't know how to convert to TOS script. Thanks in advance! --------------------------------------------------------------------------------------------------------------------------------------------------------- Description: T3 Average Someone else has alreaby robert - Trading Discussion
QuoteRalph53 Robert I have 3 more quick questions 1) How should this line appear if I don't want the Bubble hidden? condition.HideBubble(); Unlike some of the other functions, that one cannot be changed programmatically (i.e. it can't be turned on or off based on different conditions). Either you want to hide the bubble, so you include that statement; or you do not want to hide the bubbleby robert - Trading Discussion
Quotebaffled1 my question is: How do I get an average for a conditional event? Base code works fine and is: def runup1 = close>close[1]; def runup2 = close>close[2]; #Most people write the next line as ISTRUE but this works fine for me plot Above = runup1 and runup2; Above.SetDefaultColor(Color.blue); Above.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP); So thatby robert - Trading Discussion
Add the alert code to the bottom of the same script that you are running on the charts. something like. Alert(FullK_Daily > 40, GetSymbol() + " FullK above 40", Alert.Bar, Sound.Bell);by robert - Trading Discussion
Quotehowo3579 Robert, I've set the study alert when FullK_Day crosses 40. Once the alert is fired I have to go set it up again. Is there way to keep the alert condition without having to go in and set up every time? Kind of hard to do when I'm not with the platform during the day. You may want to incorporate the "alert" function into your script. Here are a couple of examplesby robert - Trading Discussion
QuoteRalph53 Robert, this script works great and I was wondering if there's a way to set an end point to the line (say 15 candles)? Thanks again. # 5 Cents Below Open # def OpenNeg5 = (open("period" = AggregationPeriod.DAY) - .05); def lastbar = HighestAll(if IsNaN(close) then 0 else BarNumber()); plot condition = if BarNumber() <= lastbar - 10 and BarNumber() >= lastbarby robert - Trading Discussion
QuotePalmer Does TOS count every minute on the clock from 7:30am to the previous close at 1459 as one bar, count bars where there is only data for, or count bars according to what the actual market trading hours are? TOS only plots a candle during the after hours market when a trade occurs. Because the after hours sessions are more thinly traded than during the day, the number of candles wilby robert - Trading Discussion
Quotehowo3579 I have a general question tho. FullK_Daily is calculated with aggregation period of a day. Does FullK_Daily[1] on hourly chart mean it return FullK_Daily of previous hour candle or the value of previous day? I think it's going back the previous hour. How can I let it go back to previous day since it defeats the purpose of comparing daily values if it's just comparing intraday noise?by robert - Trading Discussion
QuoteKevinR Also, I made a set of "gapless" indicators, but is there a display it as a line from open-close, then a new line from the next days open-close. I do not want it to plot between the close and next days open. Currently I just have the plot set to "DOTS", since it does not connect them. Compare these two examples. plot DailyHigh = high(period = "day"by robert - Trading Discussion
QuoteKevinR Robert, How would I reference only the most recent datapoint? You are going to need to use what's called a recursive variable. What that means is that the variable refers to itself. The syntax goes like this: def MyVariable = if {some condition is met} then {assign some value} else MyVariable[1]; The important bits are in red. Notice that the end of the line uses theby robert - Trading Discussion
QuotePalmer I posted this some time ago and now getting back to it. Basically, it is a scan to be done during pre-market hours that compares the current price close during pre-market to the close at 1459 (USA cst) the previous day. It looks for a 3% change to the upside during pre-market; a gap up. I'm missing symbols according to some on-line pre-market gainers and it is also including symbols tby robert - Trading Discussion