VTR is a momentum indicator that shows if a stock is overbought or oversold based on its Weekly and Monthly average volatility trading range.
Yes Please a scan would be awesomeCan you guys can create scan for this is awesome study very clean
Hi Guys - I added two new plots at the bottom of the script called "UpTrend" and "DownTrend". You can use them in a scan on any timeframe and look for when they are "True". Just tested both conditions and I'm getting correct hits. I updated the "FVO_RSI_Stochastic_Combined_Cloud_Request_SCAN" and added SCAN at the end to denote that it includes the SCAN variables. You can use this script for both purposes, just uncheck the plots when you have the indicator on a chart. Test it out and let me know if there're any issues.Yes Please a scan would be awesome
Thanks Cos for all of your help I appreciate your time and knowledge!!Hi Guys - I added two new plots at the bottom of the script called "UpTrend" and "DownTrend". You can use them in a scan on any timeframe and look for when they are "True". Just tested both conditions and I'm getting correct hits. I updated the "FVO_RSI_Stochastic_Combined_Cloud_Request_SCAN" and added SCAN at the end to denote that it includes the SCAN variables. You can use this script for both purposes, just uncheck the plots when you have the indicator on a chart. Test it out and let me know if there're any issues.
Code:#START OF RSI/Stochastic/MACD Confluence combo for ThinkOrSwim # #CHANGELOG # 2020.10.30 V1.1 @cos251 - Added UpTrend and DownTrend variables that can be used for a SCAN # 2020.10.27 V1.0 @cos251 - Added RSI, StochasticSlow and MACD to same indicator; this will plot only RSI and Stochastic but also # - calculates MACD; Will shade the lower plot area of the following conditions are met # Shade GREEN = RSI > 50 and SlowK > 50 and (macd)Value > (macd)Avg # Shade RED = RSI < 50 and SlowK < 50 and (macd)Value < (macd)Avg # #REQUIREMENTS - RSI Set to 7, EXPONENTIAL # Stoch Slow 5(not14) and 3 WILDERS # MACD 12,26,9 WEIGHTED # # #CREDITS # requesed by "@Joseph Patrick 18" # #LINK # https://rockwell-files.s3.amazonaws.com/PXCompanionGuide2ndEd_cover.pdf # Markus Heikoetter who is the author of the Power X Strategy # https://usethinkscript.com/threads/mimicking-power-x-strategy-by-markus-heitkoetter.4283/ # #USAGE # declare lower; ################################################################ ########## RSI ######### ################################################################ input paintBars = yes; input lengthRSI = 7; input over_BoughtRSI = 70; input over_SoldRSI = 30; input price = close; input averageTypeRSI = AverageType.EXPONENTIAL; input showBreakoutSignalsRSI = no; input showRSI_ob_os = no; def NetChgAvg = MovingAverage(averageTypeRSI, price - price[1], lengthRSI); def TotChgAvg = MovingAverage(averageTypeRSI, AbsValue(price - price[1]), lengthRSI); def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0; plot RSI = 50 * (ChgRatio + 1); plot OverSold_RSI = if showRSI_ob_os then over_SoldRSI else Double.NaN; plot OverBought_RSI =if showRSI_ob_os then over_BoughtRSI else Double.NaN; plot UpSignalRSI = if RSI crosses above OverSold_RSI then OverSold_RSI else Double.NaN; plot DownSignalRSI = if RSI crosses below OverBought_RSI then OverBought_RSI else Double.NaN; UpSignalRSI.SetHiding(!showBreakoutSignalsRSI); DownSignalRSI.SetHiding(!showBreakoutSignalsRSI); RSI.DefineColor("OverBought", GetColor(5)); RSI.DefineColor("Normal", Color.YELLOW); RSI.DefineColor("OverSold", GetColor(1)); #RSI.AssignValueColor(if RSI > rsiover_Bought then RSI.Color("OverBought") else if RSI < rsiover_Sold then RSI.Color("OverSold") else RSI.Color("Normal")); OverSold_RSI.SetDefaultColor(GetColor(8)); OverBought_RSI.SetDefaultColor(GetColor(8)); UpSignalRSI.SetDefaultColor(Color.UPTICK); UpSignalRSI.SetPaintingStrategy(PaintingStrategy.ARROW_UP); DownSignalRSI.SetDefaultColor(Color.DOWNTICK); DownSignalRSI.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN); ################################################################ ########## Stochastic Slow ######### ################################################################ input over_boughtSt = 80; input over_soldSt = 20; input KPeriod = 5; input DPeriod = 3; input priceH = high; input priceL = low; input priceC = close; input averageTypeStoch = AverageType.WILDERS; input showBreakoutSignalsStoch = {default "No", "On SlowK", "On SlowD", "On SlowK & SlowD"}; input showStochastic_ob_os = no; plot SlowK = reference StochasticFull(over_boughtSt, over_soldSt, KPeriod, DPeriod, priceH, priceL, priceC, 3, averageTypeStoch).FullK; plot SlowD = reference StochasticFull(over_boughtSt, over_soldSt, KPeriod, DPeriod, priceH, priceL, priceC, 3, averageTypeStoch).FullD; SlowD.Hide(); plot OverBoughtSt = if showStochastic_ob_os then over_boughtSt else Double.NaN; plot OverSoldSt = if showStochastic_ob_os then over_soldSt else Double.NaN; def upK = SlowK crosses above OverSoldSt; def upD = SlowD crosses above OverSoldSt; def downK = SlowK crosses below OverBoughtSt; def downD = SlowD crosses below OverBoughtSt; plot UpSignalSt; plot DownSignalSt; switch (showBreakoutSignalsStoch) { case "No": UpSignalSt = Double.NaN; DownSignalSt = Double.NaN; case "On SlowK": UpSignalSt = if upK then OverSoldSt else Double.NaN; DownSignalSt = if downK then OverBoughtSt else Double.NaN; case "On SlowD": UpSignalSt = if upD then OverSoldSt else Double.NaN; DownSignalSt = if downD then OverBoughtSt else Double.NaN; case "On SlowK & SlowD": UpSignalSt = if upK or upD then OverSoldSt else Double.NaN; DownSignalSt = if downK or downD then OverBoughtSt else Double.NaN; } UpSignalSt.SetHiding(showBreakoutSignalsStoch == showBreakoutSignalsStoch."No"); DownSignalSt.SetHiding(showBreakoutSignalsStoch == showBreakoutSignalsStoch."No"); SlowK.SetDefaultColor(Color.LIGHT_GREEN); SlowD.SetDefaultColor(Color.DARK_ORANGE); OverBoughtSt.SetDefaultColor(GetColor(1)); OverSoldSt.SetDefaultColor(GetColor(1)); UpSignalSt.SetDefaultColor(Color.UPTICK); UpSignalSt.SetPaintingStrategy(PaintingStrategy.ARROW_UP); DownSignalSt.SetDefaultColor(Color.DOWNTICK); DownSignalSt.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN); ################################################################# #MACD Calculation input fastLength = 12; input slowLength = 26; input MACDLength = 9; input averageTypeMACD = AverageType.WEIGHTED; input showBreakoutSignalsMACD = no; def Value = MovingAverage(averageTypeMACD, close, fastLength) - MovingAverage(averageTypeMACD, close, slowLength); def Avg = MovingAverage(averageTypeMACD, Value, MACDLength); # Check Each Signal for over 50 and MACD for Value > Avg def rsiGreen = if RSI >= 50 then 1 else Double.NaN; def rsiRed = if RSI < 50 then 1 else Double.NaN; def stochGreen = if SlowK >= 50 then 1 else Double.NaN; def stochRed = if SlowK < 50 then 1 else Double.NaN; def macdGreen = if Value > Avg then 1 else Double.NaN; def macdRed = if Value < Avg then 1 else Double.NaN; def green = if rsiGreen and stochGreen and macdGreen then 1 else Double.NaN; def red = if rsiRed and stochRed and macdRed then 1 else Double.NaN; #RSI Color Assignment per requeset RSI.AssignValueColor(if RSI >= 50 and SlowK >= 50 and Value > Avg then Color.GREEN else if RSI < 50 and SlowK < 50 and Value < Avg then Color.RED else Color.DARK_GRAY); #AssignPriceColor AssignPriceColor(if paintBars and RSI >= 50 and SlowK >= 50 and Value > Avg then Color.GREEN else if paintBars and RSI < 50 and SlowK < 50 and Value < Avg then Color.RED else if paintBars then Color.DARK_GRAY else Color.Current); ################################################################# ############ Shade areas based on criteria; adjust as needed ## ################################################################# AddCloud(if rsiGreen and stochGreen and macdGreen then Double.POSITIVE_INFINITY else Double.NaN, if rsiGreen and stochGreen then Double.NEGATIVE_INFINITY else Double.NaN, Color.LIGHT_Green); AddCloud(if rsiRed and stochRed and macdRed then Double.POSITIVE_INFINITY else Double.NaN, if rsiRed and stochRed then Double.NEGATIVE_INFINITY else Double.NaN, Color.LIGHT_RED); #AddCloud(if rsiGreen and stochGreen and macdGreen then 100 else Double.NaN, if rsiGreen and stochGreen then 0 else #Double.NaN, Color.LIGHT_Green); #AddCloud(if rsiRed and stochRed and macdRed then 100 else Double.NaN, if rsiRed and stochRed then 0 else Double.NaN, #Color.LIGHT_RED); plot fifty = 50; fifty.SetDefaultColor(Color.RED); ################################################################# ############ SCAN Variables ######### ################################################################# plot UpTrend = if RSI >= 50 and SlowK >= 50 and Value > Avg then 1 else Double.NaN; plot DownTrend = if RSI < 50 and SlowK < 50 and Value < Avg then 1 else Double.NaN;
Me too have been pretty successful all day today...been using gap up and gain up scans and watched as they reversed back down and had a pretty good day! I hope it helps everyone out especially you! Thanks again!I have to say, this strategy is starting to grow on me......looks good!
Hi Cos, Thanks again for all of your help! I loaded the scan and set it to "True" in the conditions.Hi Guys - I added two new plots at the bottom of the script called "UpTrend" and "DownTrend". You can use them in a scan on any timeframe and look for when they are "True". Just tested both conditions and I'm getting correct hits. I updated the "FVO_RSI_Stochastic_Combined_Cloud_Request_SCAN" and added SCAN at the end to denote that it includes the SCAN variables. You can use this script for both purposes, just uncheck the plots when you have the indicator on a chart. Test it out and let me know if there're any issues.
Code:#START OF RSI/Stochastic/MACD Confluence combo for ThinkOrSwim # #CHANGELOG # 2020.10.30 V1.1 @cos251 - Added UpTrend and DownTrend variables that can be used for a SCAN # 2020.10.27 V1.0 @cos251 - Added RSI, StochasticSlow and MACD to same indicator; this will plot only RSI and Stochastic but also # - calculates MACD; Will shade the lower plot area of the following conditions are met # Shade GREEN = RSI > 50 and SlowK > 50 and (macd)Value > (macd)Avg # Shade RED = RSI < 50 and SlowK < 50 and (macd)Value < (macd)Avg # #REQUIREMENTS - RSI Set to 7, EXPONENTIAL # Stoch Slow 5(not14) and 3 WILDERS # MACD 12,26,9 WEIGHTED # # #CREDITS # requesed by "@Joseph Patrick 18" # #LINK # https://rockwell-files.s3.amazonaws.com/PXCompanionGuide2ndEd_cover.pdf # Markus Heikoetter who is the author of the Power X Strategy # https://usethinkscript.com/threads/mimicking-power-x-strategy-by-markus-heitkoetter.4283/ # #USAGE # declare lower; ################################################################ ########## RSI ######### ################################################################ input paintBars = yes; input lengthRSI = 7; input over_BoughtRSI = 70; input over_SoldRSI = 30; input price = close; input averageTypeRSI = AverageType.EXPONENTIAL; input showBreakoutSignalsRSI = no; input showRSI_ob_os = no; def NetChgAvg = MovingAverage(averageTypeRSI, price - price[1], lengthRSI); def TotChgAvg = MovingAverage(averageTypeRSI, AbsValue(price - price[1]), lengthRSI); def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0; plot RSI = 50 * (ChgRatio + 1); plot OverSold_RSI = if showRSI_ob_os then over_SoldRSI else Double.NaN; plot OverBought_RSI =if showRSI_ob_os then over_BoughtRSI else Double.NaN; plot UpSignalRSI = if RSI crosses above OverSold_RSI then OverSold_RSI else Double.NaN; plot DownSignalRSI = if RSI crosses below OverBought_RSI then OverBought_RSI else Double.NaN; UpSignalRSI.SetHiding(!showBreakoutSignalsRSI); DownSignalRSI.SetHiding(!showBreakoutSignalsRSI); RSI.DefineColor("OverBought", GetColor(5)); RSI.DefineColor("Normal", Color.YELLOW); RSI.DefineColor("OverSold", GetColor(1)); #RSI.AssignValueColor(if RSI > rsiover_Bought then RSI.Color("OverBought") else if RSI < rsiover_Sold then RSI.Color("OverSold") else RSI.Color("Normal")); OverSold_RSI.SetDefaultColor(GetColor(8)); OverBought_RSI.SetDefaultColor(GetColor(8)); UpSignalRSI.SetDefaultColor(Color.UPTICK); UpSignalRSI.SetPaintingStrategy(PaintingStrategy.ARROW_UP); DownSignalRSI.SetDefaultColor(Color.DOWNTICK); DownSignalRSI.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN); ################################################################ ########## Stochastic Slow ######### ################################################################ input over_boughtSt = 80; input over_soldSt = 20; input KPeriod = 5; input DPeriod = 3; input priceH = high; input priceL = low; input priceC = close; input averageTypeStoch = AverageType.WILDERS; input showBreakoutSignalsStoch = {default "No", "On SlowK", "On SlowD", "On SlowK & SlowD"}; input showStochastic_ob_os = no; plot SlowK = reference StochasticFull(over_boughtSt, over_soldSt, KPeriod, DPeriod, priceH, priceL, priceC, 3, averageTypeStoch).FullK; plot SlowD = reference StochasticFull(over_boughtSt, over_soldSt, KPeriod, DPeriod, priceH, priceL, priceC, 3, averageTypeStoch).FullD; SlowD.Hide(); plot OverBoughtSt = if showStochastic_ob_os then over_boughtSt else Double.NaN; plot OverSoldSt = if showStochastic_ob_os then over_soldSt else Double.NaN; def upK = SlowK crosses above OverSoldSt; def upD = SlowD crosses above OverSoldSt; def downK = SlowK crosses below OverBoughtSt; def downD = SlowD crosses below OverBoughtSt; plot UpSignalSt; plot DownSignalSt; switch (showBreakoutSignalsStoch) { case "No": UpSignalSt = Double.NaN; DownSignalSt = Double.NaN; case "On SlowK": UpSignalSt = if upK then OverSoldSt else Double.NaN; DownSignalSt = if downK then OverBoughtSt else Double.NaN; case "On SlowD": UpSignalSt = if upD then OverSoldSt else Double.NaN; DownSignalSt = if downD then OverBoughtSt else Double.NaN; case "On SlowK & SlowD": UpSignalSt = if upK or upD then OverSoldSt else Double.NaN; DownSignalSt = if downK or downD then OverBoughtSt else Double.NaN; } UpSignalSt.SetHiding(showBreakoutSignalsStoch == showBreakoutSignalsStoch."No"); DownSignalSt.SetHiding(showBreakoutSignalsStoch == showBreakoutSignalsStoch."No"); SlowK.SetDefaultColor(Color.LIGHT_GREEN); SlowD.SetDefaultColor(Color.DARK_ORANGE); OverBoughtSt.SetDefaultColor(GetColor(1)); OverSoldSt.SetDefaultColor(GetColor(1)); UpSignalSt.SetDefaultColor(Color.UPTICK); UpSignalSt.SetPaintingStrategy(PaintingStrategy.ARROW_UP); DownSignalSt.SetDefaultColor(Color.DOWNTICK); DownSignalSt.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN); ################################################################# #MACD Calculation input fastLength = 12; input slowLength = 26; input MACDLength = 9; input averageTypeMACD = AverageType.WEIGHTED; input showBreakoutSignalsMACD = no; def Value = MovingAverage(averageTypeMACD, close, fastLength) - MovingAverage(averageTypeMACD, close, slowLength); def Avg = MovingAverage(averageTypeMACD, Value, MACDLength); # Check Each Signal for over 50 and MACD for Value > Avg def rsiGreen = if RSI >= 50 then 1 else Double.NaN; def rsiRed = if RSI < 50 then 1 else Double.NaN; def stochGreen = if SlowK >= 50 then 1 else Double.NaN; def stochRed = if SlowK < 50 then 1 else Double.NaN; def macdGreen = if Value > Avg then 1 else Double.NaN; def macdRed = if Value < Avg then 1 else Double.NaN; def green = if rsiGreen and stochGreen and macdGreen then 1 else Double.NaN; def red = if rsiRed and stochRed and macdRed then 1 else Double.NaN; #RSI Color Assignment per requeset RSI.AssignValueColor(if RSI >= 50 and SlowK >= 50 and Value > Avg then Color.GREEN else if RSI < 50 and SlowK < 50 and Value < Avg then Color.RED else Color.DARK_GRAY); #AssignPriceColor AssignPriceColor(if paintBars and RSI >= 50 and SlowK >= 50 and Value > Avg then Color.GREEN else if paintBars and RSI < 50 and SlowK < 50 and Value < Avg then Color.RED else if paintBars then Color.DARK_GRAY else Color.Current); ################################################################# ############ Shade areas based on criteria; adjust as needed ## ################################################################# AddCloud(if rsiGreen and stochGreen and macdGreen then Double.POSITIVE_INFINITY else Double.NaN, if rsiGreen and stochGreen then Double.NEGATIVE_INFINITY else Double.NaN, Color.LIGHT_Green); AddCloud(if rsiRed and stochRed and macdRed then Double.POSITIVE_INFINITY else Double.NaN, if rsiRed and stochRed then Double.NEGATIVE_INFINITY else Double.NaN, Color.LIGHT_RED); #AddCloud(if rsiGreen and stochGreen and macdGreen then 100 else Double.NaN, if rsiGreen and stochGreen then 0 else #Double.NaN, Color.LIGHT_Green); #AddCloud(if rsiRed and stochRed and macdRed then 100 else Double.NaN, if rsiRed and stochRed then 0 else Double.NaN, #Color.LIGHT_RED); plot fifty = 50; fifty.SetDefaultColor(Color.RED); ################################################################# ############ SCAN Variables ######### ################################################################# plot UpTrend = if RSI >= 50 and SlowK >= 50 and Value > Avg then 1 else Double.NaN; plot DownTrend = if RSI < 50 and SlowK < 50 and Value < Avg then 1 else Double.NaN;
Thanks Cos appreciate it!Hi @Joseph Patrick 18 - yes. You can use any of the plots (SlowK, SlowD, RSI) and build your scan to match your criteria. If you want to find stocks that have the RSI crossing above 20 or below 80. For the SlowK and SlowD, it may be easier to build the condition into the script then just scan for the true conditions. Let me know if you want me to add any other scan conditions.
Hi Vince...quick question...which modules do you have setup from the CSA comparable to Power X Strat? Thanks!The CSA indicator gives a buy signal sometimes significantly before the power X indicator. For example, CSA will go green on the second bar into a nice uptrend whereas X will go green on the fourth or fifth bar. CSA is a bit late to get you out of the trade when it reverses, compared to X, but another indicator can be used for the exits.
Check it out https://tos.mx/qF30rdwHi Vince...quick question...which modules do you have setup from the CSA comparable to Power X Strat? Thanks!
Hi @mveloso - you can go to the scan section and add a study. Select the indicator (with whatever name you saved it too) and use the following plots to scan when they are "True". You can scan against a watchlist or all stocks, or any other list you like.Friends, could someone explain how this indicator is used in a scan? I am a newbie and don't understand how to apply it when looking for stocks.
#################################################################
############ SCAN Variables #########
#################################################################
plot UpTrend = if RSI >= 50 and SlowK >= 50 and Value > Avg then 1 else Double.NaN;
plot DownTrend = if RSI < 50 and SlowK < 50 and Value < Avg then 1 else Double.NaN;
Thanks Vince I will! Appreciate it.Check it out https://tos.mx/qF30rdw
Ok great thanks Cos!@Joseph Patrick 18 - I think what you may be looking for are pivots. There're several indicators on this site that serve as reversal indicators or pivots. This is a good one to start with but of course it is all personal preference. Do a search or check the Explore section for Trend Reversal Indicators
Trend Reversal Indicator
Or this one:
Auto Pivot Points Support and Resistance
Or this one:
Wolf Waves Trendline
Give'em shot.
Very interesting setup. Can you please also share your entry and exit strategies?Check it out https://tos.mx/qF30rdw
Check out our Buy the Dip indicator and see how it can help you find profitable swing trading ideas. Scanner, watchlist columns, and add-ons are included.
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
C | Bull Bear Power VOID Oscillator For ThinkOrSwim | Indicators | 21 | |
I | PMF (Power Momentum Formula) for ThinkorSwim | Indicators | 10 | |
Balance of Power Trend Indicator for ThinkorSwim | Indicators | 34 | ||
Hima Reddy RSI Power Zones Indicator for ThinkorSwim | Indicators | 7 | ||
Power Earnings Gaps (PEG) Scanner for ThinkorSwim | Indicators | 14 |
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.