RAF (Ready Aim Fire) Indicator for ThinkorSwim

Status
Not open for further replies.

dvorakm

New member
2019 Donor
VIP
Does 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.
 

New Indicator: Buy the Dip

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.

Download the indicator

cos251

Well-known member
Hi All, I've been browsing the site for a couple of months now and am attempting to learn options trading. I have been going through indicators as I try and form my trading style. I am very much interested in writing or customizing some indicators to suit me. I was hoping you all could provide me some information on the Ready Aim Fire indicator sold by Simpler Trading. I have read the thread regarding Carter's indicators. I understand there is no one indicator that is full proof but I would like to know what components are used for an indicator like RAF? I would like to build it myself ( I'm assuming it is a compilation of a few indicators) and would be happy to share here if I can complete it. This is my first post and if I have posted anything inappropriate please forgive me. Thank you so much, this is a very amazing community!

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.
 

cherif

Member
VIP
Hi. I am curious how did you retool the FisherTransform to make it similar to RAF.. Thanks I need some help trying to create a scan using one of John Carter's studies [ready aim fire] but I'd like to scan for 195 minute timeframe, which is not an option on the drop down menu. Is there a way to do that? Thank you!

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
 

cos251

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

Code:
FT.SetPaintingStrategy(PaintingStrategy.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:
  • 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
This is on the 1 minute chart and therefore is very noisy. Ultimately I would like to clean this up some. I also try and use 5m, 15m charts with the same study's for confirmation as well as the EMA's and VWAP in the image for confirmation before any attempted entry.


iFInzqJ.png
 
Last edited:

cos251

Well-known member
Sure thing here you go. Please be advised, this is all test and development combos (scripts).

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));;
 

solaris

New member
I can post the code to the Old RAF Indicator if someone wants to try and re-work it. just let me know

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
 

BenTen

Administrative
Staff
VIP
@solaris We do not promote or allow piracy within our community. Please only post the code if you have proper permission from the creator or if the code is already made available publicly by its author.
 

DDW

Member
Please get that code to @cos251 by any means necessary! ;)

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.
 

cos251

Well-known member
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.
 
Last edited by a moderator:

cos251

Well-known member
More reference material, image below shows 5m, 15m and 30m chart for ZM Today. You can see how higher timeframes filter signals. I'd like to try and incorporate filtering signals from higher timeframes to lower one's. I'm trying to work on this as I have time.

o4PY2xv.png
 
  • Like
Reactions: DDW

DDW

Member
@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:

madpuri

Member
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:
 
Last edited by a moderator:
Status
Not open for further replies.

Volatility Trading Range

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

Download the indicator

Top