NexusFi: Find Your Edge


Home Menu

 





Looking for Fisher/SOAP Scan


Discussion in ThinkOrSwim

Updated
    1. trending_up 2,712 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
ncdsquare
Creedmoor
 
Posts: 5 since Oct 2018
Thanks Given: 1
Thanks Received: 0

Though I've been trading on and off for the last year, I'm still a relative novice to TOS tools and features (I feel that way anyway - there's a lot to use and learn). I'm also a relative novice to day trading, though I've taken course, developed a plan and have a mentor who gives me tips and coaching as a navigate the difficult waters of DT.

I'm day trading using ToS and make entry/exit decisions based on three indicators:
  1. 3 SMA (4, 9, 18)
  2. FW_FisherTransformer
  3. FW_SOAP

I find myself missing DT candidates in my watchlist because I don't have a scan that notifies me when stocks in my watchlist is setting up for entry/exit (or is ready for entry/exit). I'm going through it manually & am still developing the discipline to go them all before deciding on entry. I've missed many an entry or extra profit by not having a scan to run that gives me all that fit so I can review quickly before entry. I'd like to borrow or buy a scan that does this.

I'm a tech head by profession but haven't had the time to learn Thinkscript in detail. I've searched the Thinkscript reserved words and library to understand how to use the FW_FisherTransfomer in a scan. I also found some code that I've added for a custom scalper using Fisher. It's pasted below. I love this piece of code and have used it for a few months. From it, I've concluded that "fish" is a reserved word but I can't find it any where.

Can some one point me in the right direction on how to use Fisher and SOAP as a study for a DT scan? Thanks for any direction or advice (and thanks Lawyer Trader for sharing the code for the scalper. It's done me well since I found it on your blog site).

#The Fisher Scalper Color Bars, courtesy of The Lawyer Trader. 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]);

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.violet else if ft<ftoneBarBack and bearish then color.red else if ft<ftOneBarBack and bullish then color.white else color.gray);


Reply With Quote

 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
21 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
2026 Fire Horse
5 thanks
  #2 (permalink)
netarchitech
NY, NY
 
Posts: 68 since Dec 2011
Thanks Given: 27
Thanks Received: 19

Hi,

Review this:
 
Code
# Commented out - unnecessary
#declare lower;

#Changed inputs to defs
def price = hl2;
def 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]);

# Changed plots to defs
def FTOneBarBack = fish[1];
def FT = fish;

# Commented out - unnecessary
# plot ZeroLine = 0;

# Changed input to def
def emalength = 50;

def ema2 = expAverage(fish, emalength);

# Commented out - unnecessary
# FTOneBarBack.SetDefaultColor(GetColor(1));
# FT.SetDefaultColor(GetColor(8));
# ZeroLine.SetDefaultColor(GetColor(5));

# Changed defs to plots - only one plot at a time
# This will find Bullish candidates
# Switch # to find Bearish candidates
plot bullish = if ft > ema2 then 1 else 0;
#plot bearish = if ft < ema2 then 1 else 0;

# Commented out - unnecessary
# 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);


Try this:
 
Code
def price = hl2;
def 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]);

def FTOneBarBack = fish[1];
def FT = fish;

def emalength = 50;

def ema2 = expAverage(fish, emalength);

plot bullish = if ft > ema2 then 1 else 0;
#plot bearish = if ft < ema2 then 1 else 0;

Hope this helps...

Good Luck and Good Trading


Reply With Quote
  #3 (permalink)
ncdsquare
Creedmoor
 
Posts: 5 since Oct 2018
Thanks Given: 1
Thanks Received: 0


I've reviewed the code changes you've made, and am adding it to TOS now.

I'll let you know how I works - thanks!!!


Reply With Quote




Last Updated on April 19, 2019


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts