I recently came across a momentum script worth considering it came off Yahoo Groups.
https://tos.mx/Q63k4Yv
https://tos.mx/Q63k4Yv
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
I checked almost all the charts you shared, very helpful!!My current chart share
https://tos.mx/wxpmumJ
I do change the indicators because there are so many to choose from and try them and for others to see and try what is available on-site. Ultimately it is up to the trader to discern what works best for you so I post what I feel are great scripts found on our site.I checked almost all the charts you shared, very helpful!!
Here are the questions I have
1 Looks like you keep changing the indicators. Why, because they are not good?
2 I set up a strategy, all the indicators are imported from your shared links (thanks again). Trying to do a backtest, but don't know how to setup this strategy.
1 Buy when Moxie indicator first green bar after red + RSI_lagurre first green bar after red + RAF(Read aim fire) or TTM_Squeeze Pro first green (brown) bar after red
https://tos.mx/UEHNzvs
got it now thank you!, so is that the closest one we can get to RAF ? or is it something completely diffrend from RAF? since your sharable link is the only RAF code i can find on this forum..
#Study: FW_FT_3xStochastics_02V04
#
# Adapted from: ToS Fisher Transform
#
# Modifications by ToS User: managematics
#
#hint:<b>Fisher Stochastics (FS)</b>\nHelps time changes in trend by transforming price and transforming stochastics using a statistical method called Fisher Transform. The original Fisher Transform and the three transformed stochastics work together to provide both early warning and later confirmation of a trend change.
#
# Additional details available in the user guide which can
# be found at: [insert link here]
#
# Discussion of input parameters:
#
# fisher len: number of bars to look at for fisher transform.
# Default is 5.
#
# ob os: Position of overbought and oversold lines. Default
# is 120. Description is in user guide.
#
# hide soap:
# yes(defaul): Does not show vertical lines for SOAP
# signals.
# no: Shows soap signals as vertical lines.
#
# Revision history:
# Rev Date Change Description
# ------ ---------- ------------------
# 01F 2010-01-23 Original
# 02-V01 2010-02-20 - Added ability to scale study so
# arrows are visible on screen
# - Increased default size of magenta arrow
# 02-V02 2010-11-16 - Fixed a bug defining the fisher value was causing the blue
# fisher line to not plot - due to changes in Release 1754/1755
# 02-V03 2020-09-21 - [USER=6343]@cos251[/USER] - updated vertical line colors for SOAP TEMPLATE Buy
# and Sell signals from cyan and yellow to green and red
# respectively. Added shaded areas for SOAPCount to shade
# DARK GREEN for SOAPCount == 1, GREE for SOAPCount > 1, DARK
# RED for SOAPCount == -1 and RED for SOAPCount < -1. Changed
# obl and osl lines to default color blue to matchingLow RAF.
# 02-V04 2020-11-26 - [USER=5065]@SuryaKiranC[/USER] - Tied to optimize it to mimic RAF_Pro.
# Also want to remove as much clutter as possible for heavy chart usage on_volume multi grid mode.
# Please note: My changes are for my needs not a criticism of Others work.
# Please use the version above if that fits your needs better.
declare lower;
input FisherLen = 21;
input ObOs = 1.2;
input hideSoap = no;
input hideCloud =no;
def CountChg;
rec SOAPCount;
def maxHigh = Highest(high, FisherLen);
def minLow = Lowest(low, FisherLen);
def k1v = Max(-100, Min(100, (StochasticFull(KPeriod = 5, slowing_period = 3, averageType = AverageType.EXPONENTIAL))) - 50) / 50.01;
def k2v = Max(-100, Min(100, (StochasticFull(KPeriod = 8, slowing_period = 5, averageType = AverageType.EXPONENTIAL))) - 50) / 50.01;
def k3v = Max(-100, Min(100, (StochasticFull(KPeriod = 17, slowing_period = 5, averageType = AverageType.EXPONENTIAL))) - 50) / 50.01;
def R1v = Max(-100, Min(100, reference RSI(2)) - 50) / 50.01;
# Get states of SOAPCount
def soapOneBool = if SOAPCount > 1 then ObOs else if SOAPCount == 1 then -ObOs else Double.NaN;
def soapGreaterOneBool = if SOAPCount > 1 then -ObOs else if SOAPCount == 1 then ObOs else Double.NaN;
def soapNegOneBool = if SOAPCount < -1 then ObOs else if SOAPCount == -1 then -ObOs else Double.NaN;
def soapLessThanNegOneBool = if SOAPCount < -1 then -ObOs else if SOAPCount == -1 then ObOs else Double.NaN;
if k2v > 0
Then {
CountChg = if k1v <= k2v and k1v[1] > k2v[1] and k2v[1] > 0 then -1 else 0;
SOAPCount = CompoundValue(1, Min (0, SOAPCount[1]) + CountChg, 0);
}
else {
CountChg = if k1v >= k2v and k1v[1] < k2v[1] and k2v[1] <= 0 then 1 else 0;
SOAPCount = CompoundValue (1, Max (0, SOAPCount[1]) + CountChg, 0);
}
AddVerticalLine (!hideSoap and ((k2v > 0 and k1v <= k2v and k1v[1] > k2v[1]) or (k2v < 0 and k1v >= k2v and k1v[1] < k2v[1])),
if AbsValue(SOAPCount) > 1 then "AIM" + SOAPCount else if AbsValue(SOAPCount) == 1 then "READY" + SOAPCount else if AbsValue(SOAPCount) < -1 then "READY" + SOAPCount else if AbsValue(SOAPCount) == 0 then "READY" + SOAPCount else "AIM",
if SOAPCount > 1 then Color.GREEN else if SOAPCount == 1 then Color.GREEN else if SOAPCount < -1 then Color.RED else Color.RED);
rec fish = CompoundValue(1, if IsNaN(0.5 * (Log((1 + k3v) / (1 - k3v)) + fish[1])) then fish[1] else 0.5 * (Log((1 + k3v) / (1 - k3v)) + fish[1]), 0);
plot oBl = ObOs;
plot ZeroLine = 0;
plot oSl = -ObOs;
plot FT = fish;
plot FTu = if (Sign (fish - fish[1]) > Sign (fish[1] - fish[2])) then fish[1] else Double.NaN;
plot FTd = if (Sign (fish - fish[1]) < Sign (fish[1] - fish[2])) then fish[1] else Double.NaN;
oBl.SetDefaultColor(Color.BLUE);
ZeroLine.SetDefaultColor(Color.WHITE);
oSl.SetDefaultColor(Color.BLUE);
FT.SetDefaultColor(Color.MAGENTA);
FTu.SetDefaultColor(Color.GREEN);
FTd.SetDefaultColor(Color.RED);
FTu.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
FTd.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
oBl.SetLineWeight(2);
Zeroline.SetLineWeight(2);
oSl.SetLineWeight(2);
FT.SetLineWeight(2);
FTu.SetLineWeight(5);
FTd.SetLineWeight(5);
# ADD CLOUDS between over-bought and over-sold lines (1.2 and -1.2) for cases where SOAPCount equal certain states. (1, >1, -1, <-1)
AddCloud (if !hideCloud then soapOneBool else Double.NaN, soapGreaterOneBool, Color.GREEN, Color.DARK_GREEN);
AddCloud (if !hideCloud then soapNegOneBool else Double.NaN, soapLessThanNegOneBool, Color.RED, Color.DARK_RED);
can you please email me that Fisher Stochastics (lower indicator) code on [email protected] since i cannot open that shareble Another
#START OF RSI/Stochastic/MACD Confluence combo for ThinkOrSwim
#
#CHANGELOG
# 2020.10.27 V1.0 [USER=6343]@cos251[/USER] - Added RSI, StochasticSlow and MACD to same indicator; this will plot only MACD but also
# - calculates RSI and Sotchasit; 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 "[USER=4682]@Joseph Patrick 18[/USER]"
#
#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;
################################################################
########## MACD #########
################################################################
input fastLengthMACD = 12;
input slowLengthMACD = 26;
input MACDLength = 9;
input averageTypeMACD = AverageType.WEIGHTED;
input showBreakoutSignals = no;
plot Value = MovingAverage(averageTypeMACD, close, fastLengthMACD) - MovingAverage(averageTypeMACD, close, slowLengthMACD);
plot Avg = MovingAverage(averageTypeMACD, Value, MACDLength);
plot Diff = Value - Avg;
plot ZeroLine = 0;
plot UpSignalMACD = if Diff crosses above ZeroLine then ZeroLine else Double.NaN;
plot DownSignalMACD = if Diff crosses below ZeroLine then ZeroLine else Double.NaN;
UpSignalMACD.SetHiding(!showBreakoutSignals);
DownSignalMACD.SetHiding(!showBreakoutSignals);
Value.SetDefaultColor(Color.GREEN);
Avg.SetDefaultColor(Color.RED);
Diff.SetDefaultColor(GetColor(5));
Diff.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Diff.SetLineWeight(4);
Diff.DefineColor("Positive and Up", Color.GREEN);
Diff.DefineColor("Positive and Down", Color.DARK_GREEN);
Diff.DefineColor("Negative and Down", Color.RED);
Diff.DefineColor("Negative and Up", Color.DARK_RED);
Diff.AssignValueColor(if Diff >= 0 then if Diff > Diff[1] then Diff.color("Positive and Up") else Diff.color("Positive and Down") else if Diff < Diff[1] then Diff.color("Negative and Down") else Diff.color("Negative and Up"));
ZeroLine.SetDefaultColor(GetColor(0));
UpSignalMACD.SetDefaultColor(Color.UPTICK);
UpSignalMACD.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
DownSignalMACD.SetDefaultColor(Color.DOWNTICK);
DownSignalMACD.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
################################################################
########## RSI #########
################################################################
input lengthRSI = 7;
input over_BoughtRSI = 70;
input over_SoldRSI = 30;
input price = close;
input averageTypeRSI = AverageType.EXPONENTIAL;
#input showBreakoutSignals = 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;
def RSI = 50 * (ChgRatio + 1);
################################################################
########## 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"};
def SlowK = reference StochasticFull(over_boughtSt, over_soldSt, KPeriod, DPeriod, priceH, priceL, priceC, 3, averageTypeStoch).FullK;
def SlowD = reference StochasticFull(over_boughtSt, over_soldSt, KPeriod, DPeriod, priceH, priceL, priceC, 3, averageTypeStoch).FullD;
################################################################
########## Check for signals > 50 and macd 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;
#################################################################
############ 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);
declare lower;
input price = hl2;
input length = 10;
def maxHigh = Highest(price, length);
def minLow = Lowest(price, length);
def range = maxHigh - minLow;
rec value = if IsNaN(price)
then Double.NaN
else if IsNaN(range)
then value[1]
else if range == 0
then 0
else 0.66 * ((price - minLow) / range - 0.5) + 0.67 * value[1];
def truncValue = if value > 0.99 then 0.999 else if value < -0.99 then -0.999 else value;
rec fish = 0.5 * (log((1 + truncValue) / (1 - truncValue)) + fish[1]);
plot FTOneBarBack = fish[1];
plot FT = fish;
plot ZeroLine = 0;
input emalength = 50;
plot ema2 = expAverage(fish, emalength);
FTOneBarBack.SetDefaultColor(GetColor(1));
FT.SetDefaultColor(GetColor(8));
ZeroLine.SetDefaultColor(GetColor(5));
def bullish = if ft > ema2 then 1 else 0;
def bearish = if ft < ema2 then 1 else 0;
assignpriceColor(if ft>ftonebarback and bullish then color.green else if ft>ftoneBarBack and bearish then color.blue else if ft<ftoneBarBack and bearish then color.red else if ft<ftOneBarBack and bullish then color.yellow else color.gray);
plot Pivot = (high(period = "day" )[1] + low(period = "day" )[1]) / 2;
Pivot.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Pivot.SetDefaultColor(Color.ORANGE);
Pivot.SetLineWeight(2);
#Elastic Stochastic Upper with signals
#Assembled by Chewie on usethinkscript.com https://usethinkscript.com/threads/elastic-stochastic-for-thinkorswim-upper-and-lower-indicator.4360/
declare upper;
input snap_high = 80;
input snap_low = 20;
input caution_high = 80.0;
input caution_low = 20.0;
input caution = yes;
input weak = yes;
input KPeriod = 5;
input DPeriod = 3;
input slowing_period = 2;
input smoothingType = {default SMA, EMA};
def priceH = high;
def priceL = low;
def priceC = close;
def lowest_k = Lowest(priceL, KPeriod);
def c1 = priceC - lowest_k;
def c2 = Highest(priceH, KPeriod) - lowest_k;
def FastK = if c2 != 0 then c1 / c2 * 100 else 0;
def fullk;
def FullD;
switch (smoothingType) {
case SMA:
fullk = Average(FastK, slowing_period);
FullD = Average(fullk, DPeriod);
case EMA:
fullk = ExpAverage(FastK, slowing_period);
FullD = ExpAverage(fullk, DPeriod);
}
def OverBought = snap_high;
def OverSold = snap_low;
def crossedb = Crosses(FullD, overbought, CrossingDirection.BELOW);
plot crossbelow = if crossedb is true then 1 else 0;
crossbelow.SetDefaultColor(Color.magenta);
crossbelow.SetPaintingStrategy(PaintingStrategy.Boolean_arrow_down);
def crosseda = Crosses(FullD, oversold, CrossingDirection.above);
plot crossabove = if crosseda is true then 1 else 0;
crossabove.SetDefaultColor(Color.magenta);
crossabove.SetPaintingStrategy(PaintingStrategy.Boolean_arrow_up);
def Caution_UP = FullD > caution_high;
plot CautionUP = if caution and Caution_UP is true then 1 else 0;
CautionUP.setDefaultColor(Color.yellow);
CautionUP.SetPaintingStrategy(PaintingStrategy.Boolean_wedge_up);
def Caution_DOWN = FullD < caution_low;
plot CautionDOWN = if caution and Caution_DOWN is true then 1 else 0;
CautionDOWN.setDefaultColor(Color.yellow);
CautionDOWN.SetPaintingStrategy(PaintingStrategy.Boolean_wedge_DOWN);
def Weak1 = if FullD < 48 and FullD > 25 and FullD[1] < 48 and FullD[1] < FullD[2] and FullD[2] < 48 and FullD[2] > 25 and FullD > FullD[1] then FullD else Double.NaN;
plot WeakBUY = if weak and Weak1 is true then 1 else 0;
WeakBUY.SetDefaultColor(Color.white);
WeakBUY.SetPaintingStrategy(PaintingStrategy.Boolean_arrow_up);
def Weak2 = if FullD > 52 and FullD < 75 and FullD[1] > 52 and FullD[1] > FullD[2] and FullD[2] > 52 and FullD[2] <75 and FullD < FullD[1] then FullD else Double.NaN;
plot WeakSELL = if weak and Weak2 is true then 1 else 0;
The indicators I use every day are Fibs, RSM Labels, MACD BB, and Balanced BB Breakout (B4). My strategy is to mark off fibs and use the MACD BB and B4 lower signals to confirm entry. This morning I watched price retrace between the 50 and 61.8% levels of its premarket low to high. At market open, the B4 and MACD BB gave long signals. Price moved nicely to the 34078 fib profit target. I like the RSM MTF labels to confirm I'm trading in the direction of higher timeframe trend.
Great strategy Trader Raider very sound. I generally use 2 lowers the fighter scalper ma's and the rsi Laguerre MTF. My uppers are a mix to include support/resistance and be out early. But I also use a 30min ORB.The indicators I use every day are Fibs, RSM Labels, MACD BB, and Balanced BB Breakout (B4). My strategy is to mark off fibs and use the MACD BB and B4 lower signals to confirm entry. This morning I watched price retrace between the 50 and 61.8% levels of its premarket low to high. At market open, the B4 and MACD BB gave long signals. Price moved nicely to the 34078 fib profit target. I like the RSM MTF labels to confirm I'm trading in the direction of higher timeframe trend.
# 30 min opening range with fib retracements
input ShowTodayOnly = yes;
input ShowFib1 = yes;
input ShowFib2 = yes;
input Fib1 = 1.382;
input Fib2 = 1.621;
def today = !ShowTodayOnly or GetDay() == GetLastDay();
def nMinutes = GetAggregationPeriod() / 60000;
def first30min = SecondsFromTime(0930) >= 0 and SecondsTillTime(1000) > 0;
def bar10am = SecondsFromTime(1000) >= 0 and SecondsFromTime(1000) < nMinutes * 60;
def OR30high = if first30min then Double.NaN else if bar10am then high(period = "30 min" )[1] else OR30high[1];
def OR30low = if first30min then Double.NaN else if bar10am then low(period = "30 min" )[1] else OR30low[1];
def OR30rng = OR30high - OR30low;
plot h30 = if !today then Double.NaN else OR30high;
h30.SetLineWeight(2);
h30.SetDefaultColor(Color.GREEN);
plot l30 = if !today then Double.NaN else OR30low;
l30.SetLineWeight(2);
l30.SetDefaultColor(Color.PINK);
plot mid = if !today then Double.NaN else (h30 + l30) / 2;
mid.SetDefaultColor(Color.LIGHT_GRAY);
plot fib1up = if !ShowFib1 then Double.NaN else l30 + OR30rng * Fib1;
fib1up.SetStyle(Curve.LONG_DASH);
fib1up.SetDefaultColor(Color.GREEN);
plot fib2up = if !ShowFib2 then Double.NaN else l30 + OR30rng * Fib2;
fib2up.SetStyle(Curve.SHORT_DASH);
fib2up.SetDefaultColor(Color.GREEN);
plot fib1dn = if !ShowFib1 then Double.NaN else h30 - OR30rng * Fib1;
fib1dn.SetStyle(Curve.LONG_DASH);
fib1dn.SetDefaultColor(Color.PINK);
plot fib2dn = if !ShowFib2 then Double.NaN else h30 - OR30rng * Fib2;
fib2dn.SetStyle(Curve.SHORT_DASH);
fib2dn.SetDefaultColor(Color.PINK);
# Delete the following line if you don't want the opening range filled with color
AddCloud(h30, l30, CreateColor(192, 192, 208));
I like an early finish to the day too, @J007RMC, but I also enjoy the last 90 min when I'm available. THANK YOU for sharing that fib script! I used a similar strat to scalp the RTY after 10am this morning. I haven't been able to code what I want but I think I can adapt what you gave me. Thank you so much!!Great strategy Trader Raider very sound. I generally use 2 lowers the fighter scalper ma's and the rsi Laguerre MTF. My uppers are a mix to include support/resistance and be out early. But I also use a 30min ORB.
I'm testing some misc upper too
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.