NexusFi: Find Your Edge


Home Menu

 





Fisher Transform Colored Bars


Discussion in ThinkOrSwim

Updated
    1. trending_up 3,287 views
    2. thumb_up 4 thanks given
    3. group 2 followers
    1. forum 6 posts
    2. attach_file 2 attachments




 
Search this Thread

Fisher Transform Colored Bars

  #1 (permalink)
 Azrael 
Jurong Singapore
 
Experience: Beginner
Platform: NinjaTrader
Broker: Optimus Futures/Rithmic
Trading: TF
Posts: 72 since Jul 2012
Thanks Given: 39
Thanks Received: 9

Hi guys,

I was wondering how do I color the Fisher Transform bars in TOS like the Fisher Transform Multicolor indicator in Ninjatrader?

Warmest regards
Azrael

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
MC PL editor upgrade
MultiCharts
Trade idea based off three indicators.
Traders Hideout
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
22 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #2 (permalink)
devildriver6
Dallas, Texas
 
Posts: 43 since Jun 2015
Thanks Given: 2
Thanks Received: 32


Azrael View Post
Hi guys,

I was wondering how do I color the Fisher Transform bars in TOS like the Fisher Transform Multicolor indicator in Ninjatrader?

Warmest regards
Azrael

Do you know the conditions?
Is it simply above and below, green and red?

Reply With Quote
  #3 (permalink)
 Azrael 
Jurong Singapore
 
Experience: Beginner
Platform: NinjaTrader
Broker: Optimus Futures/Rithmic
Trading: TF
Posts: 72 since Jul 2012
Thanks Given: 39
Thanks Received: 9



devildriver6 View Post
Do you know the conditions?
Is it simply above and below, green and red?

Not just that.

Something like:
If the values are rising, plot the up color,
If the values are falling, plot the down color.

Something like this:

Started this thread Reply With Quote
  #4 (permalink)
devildriver6
Dallas, Texas
 
Posts: 43 since Jun 2015
Thanks Given: 2
Thanks Received: 32


Azrael View Post
Not just that.

Something like:
If the values are rising, plot the up color,
If the values are falling, plot the down color.

Something like this:

You're just trying to assign the value rise and fall color...it looks something like this...

assignvaluecolor(if fish >= fish[1] then color.green else color.red);

Reply With Quote
Thanked by:
  #5 (permalink)
 Azrael 
Jurong Singapore
 
Experience: Beginner
Platform: NinjaTrader
Broker: Optimus Futures/Rithmic
Trading: TF
Posts: 72 since Jul 2012
Thanks Given: 39
Thanks Received: 9


devildriver6 View Post
You're just trying to assign the value rise and fall color...it looks something like this...

assignvaluecolor(if fish >= fish[1] then color.green else color.red);

Thanks!

I tried doing the script up myself with your code:

 
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.SetDefaultColor(GetColor(8));
ZeroLine.SetDefaultColor(GetColor(5));

FT.assignvaluecolor(if fish >= fish[1] then CreateColor(153, 204, 255) else CreateColor(255, 102, 102));
I got the colors I wanted but the bars look faint and fuzzy. Any ideas to make them darker or maybe to put an black outline around them?

(If it is not too much trouble, is there a way to set the colors for the bars at will using the studies settings?)

Started this thread Reply With Quote
Thanked by:
  #6 (permalink)
devildriver6
Dallas, Texas
 
Posts: 43 since Jun 2015
Thanks Given: 2
Thanks Received: 32


Azrael View Post
Thanks!

I tried doing the script up myself with your code:

 
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.SetDefaultColor(GetColor(8));
ZeroLine.SetDefaultColor(GetColor(5));

FT.assignvaluecolor(if fish >= fish[1] then CreateColor(153, 204, 255) else CreateColor(255, 102, 102));
I got the colors I wanted but the bars look faint and fuzzy. Any ideas to make them darker or maybe to put an black outline around them?

(If it is not too much trouble, is there a way to set the colors for the bars at will using the studies settings?)


Use this....

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(color.cyan);
FT.SetDefaultColor(color.yellow);
ZeroLine.SetDefaultColor(color.white);

input paintbars = yes;

DefineglobalColor("Bullish", color.green);
DefineglobalColor("Bearish", color.red);

assignPriceColor(if !paintbars then color.current else if paintbars && FT >= FTOneBarBack then globalColor("Bullish") else if paintbars && FT < FTOneBarBack then globalColor("Bearish") else color.current);

Reply With Quote
Thanked by:
  #7 (permalink)
 Azrael 
Jurong Singapore
 
Experience: Beginner
Platform: NinjaTrader
Broker: Optimus Futures/Rithmic
Trading: TF
Posts: 72 since Jul 2012
Thanks Given: 39
Thanks Received: 9


devildriver6 View Post
Use this....

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(color.cyan);
FT.SetDefaultColor(color.yellow);
ZeroLine.SetDefaultColor(color.white);

input paintbars = yes;

DefineglobalColor("Bullish", color.green);
DefineglobalColor("Bearish", color.red);

assignPriceColor(if !paintbars then color.current else if paintbars && FT >= FTOneBarBack then globalColor("Bullish") else if paintbars && FT < FTOneBarBack then globalColor("Bearish") else color.current);

Thank you so much!

Just before you replied, I actually manually search for the color I wanted on the RGB scale and end up with CreateColor(63, 143, 255) for the upbar and just used the normal Red for the downbar

Thank you so much again



Will figure out the volume stop when I get the time

Started this thread Reply With Quote




Last Updated on July 31, 2016


© 2024 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 - Privacy Policy - Downloads - Top
no new posts