You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter dvorakm
- Start date

- Status
- Not open for further replies.

You have to post the code, most of us including me have no clue what the raf study is.

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.

Please share code here and we can help youDoes anyone know how I can edit RAF study to only display Major Buys/Major Sells that are Overbought/Oversold. The way it is written is too messy for me.

Quick update to this. I also saw the thread that indicated the RAF was just a retooled FisherTransform. I've already taken that study and converted it to a histogram plot. I'm also using the onebarback variable in that indicator with the CCI +-/100 for to plot visual alerts. Hopefully I'm on the right track. Appreciate any info you all can share, thanks so much.

Code:

```
# Fisher Transform With First Wave (David Elliot)
# Mobius
# Chat Room Request 10.14.2020
# Scan for FT > FS5x3
def h = high;
def l = low;
def c = close;
def CountChg;
def SOAPCount;
def maxHigh = Highest(h, 5);
def minLow = Lowest(l, 5);
def k1v = Max(-100, Min(100, (StochasticFull(KPeriod = 5, slowing_period = 3))) - 50) / 50.01;
def k2v = Max(-100, Min(100, (StochasticFull(KPeriod = 8, slowing_period = 5))) - 50) / 50.01;
def k3v = Max(-100, Min(100, (StochasticFull(KPeriod = 17, slowing_period = 5))) - 50) / 50.01;
def R1v = Max(-100, Min(100, reference RSI(2)) - 50) / 50.01;
if k2v > 0
{
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);
}
def fish1 = CompoundValue(1, 0.5 * (Log((1 + k1v) / (1 - k1v)) + fish1[1]), 0);
def FS5x3 = fish1;
def value = if maxHigh - minLow == 0
then 0
else 0.66 * ((close - minLow) / (maxHigh - minLow) - 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;
def fish = 0.5 * (Log((1 + truncValue) / (1 - truncValue)) + fish[1]);
def FT = fish;
plot isTrue = FT > FS5x3;
# End Scan Code
```

Hi cherif. I just went into the default code and changed the plot to a histogram.

I am also plotting the crossing of "fish" and "FTOneBarBack" up and down signals with arrows on a separate upper study above and below candles.

In the image below:

Code:

`FT.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);`

In the image below:

- Red Down Arrows are are both when "fish" crosses below "FTOneBarBack" and when the same happens within 2 bars and CCI crosses below -100
- CYAN Up Arrows are when "fish" crosses above "FTOneBarBack"
- GREEN Up Arrows are when "fish" crosses above "FTOneBarBack" within 2 bars and CCI crosses above +100

Last edited:

Daily4Grid: https://tos.mx/tUzajU2

Code:

```
declare lower;
input price = hl2;
input length = 10;
def maxHigh = Highest(price, length);
def minLow = Lowest(price, length);
def range = maxHigh - minLow;
def 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;
def fish = 0.5 * (log((1 + truncValue) / (1 - truncValue)) + fish[1]);
#plot FTOneBarBack = fish[1];
plot FT = fish;
plot ZeroLine = 0;
#FTOneBarBack.SetDefaultColor(GetColor(1));
FT.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
FT.SetDefaultColor(GetColor(8));
FT.DefineColor("Positive and Up", Color.GREEN);
FT.DefineColor("Positive and Down", Color.DARK_GREEN);
FT.DefineColor("Negative and Down", Color.RED);
FT.DefineColor("Negative and Up", Color.DARK_RED);
FT.AssignValueColor(if FT >= 0 then if FT > FT[1] then FT.color("Positive and Up") else FT.color("Positive and Down") else if FT < FT[1] then FT.color("Negative and Down") else FT.color("Negative and Up"));
ZeroLine.SetDefaultColor(GetColor(5));;
```

Code:

```
# TD Ameritrade IP Company, Inc. (c) 2007-2019
#
#The Fisher Scalper Color Bars. Based on the fisher #transform, this indicator is pretty easy to comprehend. #The bars are colored Green (bullish), White (transition #from bull to bear), Red (bearish), Violet (bearish #transitioning to bullish)
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]);
#
# TD Ameritrade IP Company, Inc. (c) 2007-2019
#
plot FTOneBarBack = fish[1];
plot FT = fish;
plot ZeroLine = 0;
FTOneBarBack.SetDefaultColor(GetColor(1));
FT.SetDefaultColor(GetColor(8));
ZeroLine.SetDefaultColor(GetColor(5));
input emalength = 50;
plot ema2 = ExpAverage(fish, emalength);
def bullish = if FT > ema2 then 1 else 0;
def bearish = if FT < ema2 then 1 else 0;
AddLabel(yes, "FT Ratio = " + (((FT / FTOneBarBack) * 100) - 100) + "% " + "FT Delta = " + (AbsValue(FT) - AbsValue(FTOneBarBack)), Color.WHITE);
AddLabel(yes, "FT = " + FT + "; FTOneBarBack = " + FTOneBarBack, Color.WHITE);
#(AbsValue(FT) - AbsValue(FTOneBarBack))
AssignPriceColor(if FT > FTOneBarBack and bullish then Color.GREEN else if FT > FTOneBarBack and bearish then Color.VIOLET else if FT < FTOneBarBack and bearish then Color.RED else if FT < FTOneBarBack and bullish then Color.WHITE else Color.GRAY);
#####
#
# FisherTransformer Trend Up Indicator (Big Pink)
#
#
# TD Ameritrade IP Company, Inc. (c) 2017-2019
#
##### (2) Fisher Transformer setup for "FS17x5"(Big Pink) Up or Down
#Fisher_Transform_FW_Code().Scan for "FS17x5"
#The FT Code:
# Fisher Transform With First Wave (David Elliott) Signal Additions
# V01.04.2015
#
### START: FisherTransformer Initialization: Stochastic and SOAP
#
def FisherLen = 5;
def ObOs = 1.2;
def hideSoap = yes;
def h = high;
def l = low;
def c = close;
def CountChg;
def SOAPCount;
def BPmaxHigh = Highest(h, FisherLen);
def BPminLow = Lowest(l, FisherLen);
def k1v = Max(-100, Min(100, (StochasticFull(KPeriod = 5, slowing_period = 3))) - 50) / 50.01;
def k2v = Max(-100, Min(100, (StochasticFull(KPeriod = 8, slowing_period = 5))) - 50) / 50.01;
def k3v = Max(-100, Min(100, (StochasticFull(KPeriod = 17, slowing_period = 5))) - 50) / 50.01;
def R1v = Max(-100, Min(100, reference RSI(2)) - 50) / 50.01;
if k2v > 0
{
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);
}
def fish1 = CompoundValue(1, 0.5 * (Log((1 + k1v) / (1 - k1v)) + fish1[1]), 0);
def fish2 = CompoundValue(1, 0.5 * (Log((1 + k2v) / (1 - k2v)) + fish2[1]), 0);
def fish3 = CompoundValue(1, 0.5 * (Log((1 + k3v) / (1 - k3v)) + fish3[1]), 0);
def fish4 = CompoundValue(1, 0.5 * (Log((1 + R1v) / (1 - R1v)) + fish4[1]), 0);
def BPvalue = if BPmaxHigh - BPminLow == 0
then 0
else 0.66 * ((close - minLow) / (maxHigh - minLow) - 0.5) + 0.67 * value[1];
def BPtruncValue = if BPvalue > 0.99
then 0.999
else if BPvalue < -0.99
then -0.999
else BPvalue;
def BPfish = 0.5 * (Log((1 + BPtruncValue) / (1 - BPtruncValue)) + fish[1]);
#
### END: FisherTransformer Initialization: Stochastic and SOAP
#
### START:(2a) Fisher Transformer "FS17x5u" (Big Pink Up)is true for trade entry
#
Plot BigPinkup = if Sign (fish3 - fish3[1]) > Sign (fish3[1] - fish3[2]) then FT else Double.NaN;
BigPinkup.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
BigPinkup.AssignValueColor(Color.pink);
Def BuySignal = if Sign (fish3 - fish3[1]) > Sign (fish3[1] - fish3[2])then 1 else 0;
AddChartBubble(BuySignal, FT, "Buy Signal! Price= $" + close ,color.LIGHT_GREEN, no);
#
# FisherTransform Trend Up Indicator
#
plot FSTrendIndicatorUp = if FT[-1] > FT and FT < FT[1] then FT else Double.NaN;
FSTrendIndicatorUp.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
FSTrendIndicatorUp.AssignValueColor(Color.Green);
Alert(FSTrendIndicatorUp, " ", Alert.BAR, Sound.Bell);
#
# FisherTransform Trend Down Indicator
#
plot FSTrendIndicatorDown = if FT[-1] < FT and FT > FT[1] then FT else Double.NaN;
FSTrendIndicatorDown.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
FSTrendIndicatorDown.AssignValueColor(Color.RED);
AddChartBubble(FT[-1] < FT and FT > FT[1], FT, "Sell Signal! Price= $" + close, Color.CYAN, yes);
Alert(FT[-1] < FT and FT > FT[1], " ", Alert.BAR, Sound.Ding);
#END CODE
```

I think Carter releases these "Pro" versions in order to squeeze more money out of an indicator. Likely just a few tweaks and he unrolls a new "Pro" version along with a series of paid webinars, etc. Again, I have great respect for Carter as a trader but his indicator racket annoys me.

Agreed BenTen. If anyone can tell me what the indicator is using outside of the FisherTransform I'm happy to hack away at it.

I can also add that from the chart I posted above, I'm using the FisherTransform and CCI in combination as an upper study to provide indication of turning points on multiple timeframes. I have found this to be a great indicator but obviously needs a lot of refining.

I can also add that from the chart I posted above, I'm using the FisherTransform and CCI in combination as an upper study to provide indication of turning points on multiple timeframes. I have found this to be a great indicator but obviously needs a lot of refining.

Last edited by a moderator:

@cos251 John Carter had a short video out last night that showed SPOT in the "fire" mode of the RAF on the daily chart. He likes to use Daily charts for swings. In this case with SPOT he was recommending to start with a put credit spread and then maybe add a long call position in the coming days as the RAF signal is confirmed with price movement. He also likes 30 min charts for intraday positions.

Last edited by a moderator:

I would be interested in the power thrust bars. (But I have a feeling it has to do with RSI OB/OS levels.) His code is a modified version of David Elliott's FW_Fisher transform, which uses fisher transformed stochastic. David Starr just changed the stochastics to use exponential moving averages, nothing more. There is a site FW trader where a group of people used to modify and develop david elliot's ideas for free. The site is still available. I will post the code here and website.

I found out David starr used the exponential moving average "the purple line" since you can download the scan code for free. The voodoo lines are nothing more than the fibgrid created by david elliott which is also mentioned on the fwtrader site. I just hate how one line of code changed and Carter charges so much for the indicators that used to be free.

Here is the link for ToS software section.

Here is the code for the Fisher stochastic. I have already changed it to exponential moving average:

I found out David starr used the exponential moving average "the purple line" since you can download the scan code for free. The voodoo lines are nothing more than the fibgrid created by david elliott which is also mentioned on the fwtrader site. I just hate how one line of code changed and Carter charges so much for the indicators that used to be free.

Here is the link for ToS software section.

Here is the code for the Fisher stochastic. I have already changed it to exponential moving average:

Last edited by a moderator:

- Status
- Not open for further replies.

VTR is a momentum indicator that shows if a stock is overbought or oversold based on its Weekly and Monthly average volatility trading range.