Tweak RAF (ready,aim,fire) to only display Major Buys/Major Sells that are Overbought/Oversold

Status
Not open for further replies.
C

cos251

Member
can someone please create a scan when FS17x5MA cross above or below that RAF signal (purple) line.
Add this to the bottom of the script code and then use the SCAN tool to setup your scan; You'll check that the FS17x5CrossAboveMA or FS17x5CrossBelowMA are "True"
Code:
# FS17x5 (Purple Line) Crosses Above FS17x5MovingAverage
plot FS17x5CrossAboveMA = if FS17x5 > FS17x5MA and FS17x5[1] < FS17x5MA[1] then 1 else Double.NaN;

# FS17x5 (Purple Line) Crosses Below FS17x5MovingAverage
plot FS17x5CrossBelowMA = if FS17x5 < FS17x5MA and FS17x5[1] > FS17x5MA[1] then 1 else Double.NaN;
 
C

cos251

Member
@cos251 @pkcfc thank you all for replying. I like the one in post #10 better it has less signals and better performance, so if please could convert that to be working for ticks charts. the one you mentioned worked but not like the old one.
Hi @tem2005 I took the code from post #10 as you requested and removed the standard timeframes so it would work on TICK Charts. I'm not familiar much with TICK charts but from what I can tell it appears to be working fine. Try it out and let me know if it works for you.

Code:
# FVO_Fisher_CCI_Combo (ALSO Called FVO_RAF_UPPER)
# Recycled Indicators - combined by @cos251
# 2020.10.01    -    The script will calculate then FisherTransform and CCI in combinationto generate signals
#                    indicating possible trend.  The signals alone are not buy or sell signals but only a
#                    combination of two indicators to provide indication or trend as they relate to the two
#                    indicators mentioned.


# Signals            GREEN UP ARROW - FT crossed above FTOneBarBack and CCI has crossed above +100
#                    CYAN UP ARROW - FT crossed above FTOneBarBack and CCI > CCI[1]
#                    RED DOWN ARROW - FT crossed below FTOneBarBack and CCI has crossed below -100
#                    RED DOWN ARROW - FT crossed below FTOneBarBack and CCI < CCI[1]
###############################################################################################################



declare upper;

input length = 10;

###### CCI
input lengthCCI = 14;
input over_sold = -100;
input over_bought = 100;
input showBreakoutSignals = no;

################ Work on TICK Charts
def maxHigh_15m;
def minLow_15m;
def range_15m;
rec value_15m;
def truncValue_15m;
def fish_15m;
def FTUpArrow_15m;
def FTDownArrow_15m;
def FTOneBarBack_15m;
def price_15m;
def linDev_15m;
def CCI_15m;
if GetAggregationPeriod() <= AggregationPeriod.FIFTEEN_MIN {
    maxHigh_15m = Highest(hl2(), length);
    minLow_15m = Lowest(hl2(), length);
    range_15m = maxHigh_15m - minLow_15m;
    value_15m = if IsNaN(hl2()) then Double.NaN else if IsNaN(range_15m)
    then value_15m[1] else if range_15m == 0 then 0 else 0.66 * ((hl2() -
    minLow_15m) / range_15m - 0.5) + 0.67 * value_15m[1];
    truncValue_15m = if value_15m > 0.99 then 0.999 else if value_15m < -0.99 then -0.999 else value_15m;
    fish_15m = 0.5 * (log((1 + truncValue_15m) / (1 - truncValue_15m)) + fish_15m[1]);
    FTOneBarBack_15m = fish_15m[1];
    FTUpArrow_15m = if (fish_15m[1] < FTOneBarBack_15m[1]) and (fish_15m > FTOneBarBack_15m) then 1 else Double.NaN;
    FTDownArrow_15m = if (fish_15m[1] > FTOneBarBack_15m[1]) and (fish_15m < FTOneBarBack_15m) then 1 else Double.Nan;
    price_15m = close() + low() + high();
    linDev_15m = lindev(price_15m, lengthCCI);
    CCI_15m = if linDev_15m == 0 then 0 else (price_15m - Average(price_15m, lengthCCI)) / linDev_15m / 0.015;
} else {
    maxHigh_15m = 0;
    minLow_15m = 0;
    range_15m = 0;
    value_15m = 0;
    truncValue_15m = 0;
    fish_15m = 0;
    FTUpArrow_15m = 0;
    FTDownArrow_15m = 0;
    FTOneBarBack_15m = 0;
    price_15m = 0;
    linDev_15m = 0;
    CCI_15m = 0;
}
# CCI PLOT 1 MINUTE
def CCIUpSignal_15m = if lowest(CCI_15m[1],2) < 100 and CCI_15m > 100 then 1 else Double.Nan;
def CCIDownSignal_15m = if highest(CCI_15m[1],2) > -100 and CCI_15m < -100 then 1 else Double.Nan;
def FTUp_15m = if lowest(fish_15m[1],2) < FTOneBarBack_15m and fish_15m > FTOneBarBack_15m then 1 else Double.NaN;
def FTDOWN_15m = if highest(fish_15m[1],2) > FTOneBarBack_15m and fish_15m < FTOneBarBack_15m then 1 else Double.NaN;
plot comboUP_15m = if CCIUpSignal_15m and FTUp_15m then 1 else double.Nan;
comboUP_15m.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
comboUP_15m.AssignValueColor(Color.GREEN);
plot comboDown_15m = if CCIDownSignal_15m and FTDown_15m then 1 else double.Nan;
comboDown_15m.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
comboDown_15m.AssignValueColor(Color.RED);

plot fishUPCCIUp = if (FTOneBarBack_15m[1] > fish_15m[1] and FTOneBarBack_15m < fish_15m and CCI_15m > CCI_15m[1]) then 1 else Double.Nan;
fishUPCCIUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
fishUPCCIUp.AssignValueColor(Color.CYAN);

plot fishDownCCIDown = if (FTOneBarBack_15m[1] < fish_15m[1] and FTOneBarBack_15m > fish_15m and CCI_15m < CCI_15m[1]) then 1 else Double.Nan;
fishDownCCIDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
fishDownCCIDown.AssignValueColor(Color.LIGHT_RED);
 
C

cos251

Member
@cos251 @pkcfc thank you all for replying. I like the one in post #10 better it has less signals and better performance, so if please could convert that to be working for ticks charts. the one you mentioned worked but not like the old one.
Also a question for you @tem2005, are you looking for arrow signals from Higher TICK aggregations (for example 512 TICK Chart to show up on say a 133 TICK Chart? Just want to make sure I understood your request. That is also something I am trying to figure out how to do. I have come across some documentation saying that that is not quite possible for TICK charts, but I'll keep hunting.
 
T

tem2005

Member
VIP
@cos251 thank you very much. I'm gonna load it and see how it's working. For your question, no. I just need it to work on same tick chart used.
 
C

cos251

Member
@cos251 thank you very much. I'm gonna load it and see how it's working. For your question, no. I just need it to work on same tick chart used.
Thanks so much for confirming, hopefully that version works for you.
 
J007RMC

J007RMC

Well-known member
2019 Donor
VIP
I loaded both the upper and lower on my phone tonight and they are mobile compatible. Cool
 
T

TJ Baez

New member
VIP
@cos251 Do you know what means on the Horizontal Price Study the NS or S label associated with a number (ie., NS 23 or S 3)?
 
J

jmkacz04

New member
@cos251 Great Script!

Does anyone know if it would be possible to set custom individual stock alerts when the arrow is pointing up? For instance if I wanted an alert on Apple when the arrow is pointing up on the hourly tf.
 
J007RMC

J007RMC

Well-known member
2019 Donor
VIP
Fisher upper and stochastics work on the iPhone

 
C

cos251

Member
Hi @TJ Baez - I seem to not have the study "Horizontal Priceline Study" Can you post the code so I can look at it?

@J007RMC Nice. The arrows can also be plotted on the FS17x5 line in the lower indicator as well. I like this and helps me keep an eye on things while on the go.
 
C

cos251

Member
@cos251 Great Script!

Does anyone know if it would be possible to set custom individual stock alerts when the arrow is pointing up? For instance if I wanted an alert on Apple when the arrow is pointing up on the hourly tf.
Should be able to. You can create a scan for the study and point it to a watch list with only AAPL in it and set it to alert you when the condition changes. The study scan should look like this:
The scan should be set to 1hr Timeframe

Code:
shared_Fisher_3xStochastics_02V04()."FS17x5u" is true
 
J007RMC

J007RMC

Well-known member
2019 Donor
VIP
Hi @TJ Baez - I seem to not have the study "Horizontal Priceline Study" Can you post the code so I can look at it?

@J007RMC Nice. The arrows can also be plotted on the FS17x5 line in the lower indicator as well. I like this and helps me keep an eye on things while on the go.
Sure all I have ib the header information https://tos.mx/GrlqWw1
 
J

jmkacz04

New member
Should be able to. You can create a scan for the study and point it to a watch list with only AAPL in it and set it to alert you when the condition changes. The study scan should look like this:
The scan should be set to 1hr Timeframe

Code:
shared_Fisher_3xStochastics_02V04()."FS17x5u" is true
Sorry to be a pain, but for some reason when I try to create a scan for the study I am not getting any results. Any idea what I could be doing wrong?
 
C

cos251

Member
Sorry to be a pain, but for some reason when I try to create a scan for the study I am not getting any results. Any idea what I could be doing wrong?
You want to find the following conditions correct?
You want to do the following:
  1. Create a watchlist that only includes AAPL symbol and save it
  2. Create a scan with the conditions listed above and set it to only scan your watchlist you created in step 1
    1. Save the scan
    2. You can create a scan for when the FS17x5u (UP ARROW) is true or the FS17x5d (Down ARROW) is true
  3. Create an alert for when the condition is true against your watchlist
    1. Save the alert
Some screenshots below

Create Watchlist and add only AAPL Ticker and save it


Create Scan against your watchlist with the study criteria you requested:
Make sure to specify how many bars back you want to check for. I used 3 just to make sure the scan worked, you may want to change it to 1.
Code:
shared_Fisher_3xStochastics_02V04()."FS17x5u" is true



Create Alert when the scan is true; customize your alert for text message, email, sound etc.....



Hope this helps.
 
C

cos251

Member
The labels are coming from the Horizontal Priceline Indicator (i.e, NS 14, or S 9, etc).
I looked at the indicator that @J007RMC posted for Horizontal Priceline Indicator by Thinkscripter and the following code is generating the /NS and /S bubbles. It is counting how many consecutive bars have been in a squeeze (/S) or not in a squeeze (/NS), at least that is what it looks like.

Code:
#Count of Periods in consecutive squeeze
rec countsq = if Squeeze then countsq[1] + 1 else 0;
rec count1sq = if !Squeeze then count1sq[1] + 1 else 0;

#Expansion Bubbles
input n = 5;
def n1  = n + 1;
def c = close;

input showsqueezebubble = no;
AddChartBubble(showsqueezebubble and !IsNaN(c[n1]) and IsNaN(c[n]), c[n1] ,( if Squeeze[n1] then "S \n"+Round(countsq[n1], 2) else "NS \n" + count1sq[n1]) , color.orange);

Let me know if that matches what you are seeing.
 
J

jmkacz04

New member
I really appreciate you taking the time to help me out on this. Everything seems to working great.
 
Last edited by a moderator:
T

turkelton

New member
Hey @J007RMC can you explain the grey candles to mean?
 
Last edited by a moderator:
Status
Not open for further replies.
Top