NexusFi: Find Your Edge


Home Menu

 





$$$uper indicator for TOS


Discussion in ThinkOrSwim

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




 
Search this Thread

$$$uper indicator for TOS

  #1 (permalink)
alagrande
glendale ca usa
 
Posts: 97 since Sep 2017
Thanks Given: 11
Thanks Received: 88

declare lower;

##WILL_RSI_FISHER_ ### ###
###########################ONE MIN###
input lengthPercent = 30;#34
input over_BoughtPercent = -20;
input over_SoldPercent = -100;
input price = close;

input averageTypePercent = AverageType.WILDERS;
#input AggregationPeriod = { "1 min", default "5 min", "15 min", "30 min", "60 min", "4 hours"};
#William
#input aggregationPeriod = AggregationPeriod.five_MIN;
def hh = Highest(high, lengthPercent);
def ll = Lowest(low, lengthPercent);
def result = if hh == ll then -100 else (hh - close) / (hh - ll) * (-100);

plot WR = 1.4* if result > 0 then 0 else result;
WR.HIDEBubble();

WR.SetDefaultColor(GetColor(1));
WR.SetPaintingStrategy(PaintingStrategY.LINE);

WR.AssignValueColor(if WR < over_SoldPercent then COLOR.MAGENTA else if WR > over_BoughtPercent then COLOR.CYAN else COLOR.YELLOW);
WR. setLineWeight (2);

plot DL = 0;
DL.HideBubble();
DL.SetDefaultColor(Color.WHITE);
#plot DL100 = -100;
#DL100.HideBubble();
#DL100.SetDefaultColor(Color.WHITE);
#DL.SetLineWeight(1);

##PERCENT WILLIAM RSI ### ### 5MIN####
###########################
input lengthPercent5 = 14;#30
input over_BoughtPercent5 = -20;#20
input over_SoldPercent5 = -100;#80
#input price = close;
input averageTypePercent5 = AverageType.WILDERS;

def hh5 = Highest( high, lengthPercent5);
def ll5 = Lowest(low, lengthPercent5);
def result5 = if hh5 == ll5 then -100 else (hh5 - close) / (hh5 - ll5) * (-100);

plot WR5 = 1.4* if result5 > 0 then 0 else result5;
WR5.HIDEBubble();
WR5.SetDefaultColor(GetColor(1));

WR5.AssignValueColor(if WR5 < over_SoldPercent then COLOR.MAGENTA else if WR5 > over_BoughtPercent then COLOR.CYAN else COLOR.YELLOW);
WR5. setLineWeight (2);




#############
AddLabel (yes, (("0")), if WR> 80 then Color.cyan else IF WR < -80 then Color.pink ELSE COLOR.light_GRAY );

AddLabel (yes, (("0")), if WR5> 80 then Color.cyan else IF WR5 < -80 then Color.pink ELSE COLOR.light_GRAY );

AddLabel (yes, ((" + ")), if WR> WR[1] then color.green else if WR5>WR5[5] then Color.cyan else IF WR < WR[1] then color.red else if WR5<WR5[5] then Color.pink ELSE COLOR.light_GRAY );

AddLabel (yes, (("WR5")), if WR5> -50 AND WR5>WR5[1] then Color.GREEN else IF WR5< -50 AND WR5<WR5[1] then Color.RED ELSE COLOR.light_GRAY );


#AddLabel (yes, (("+")), if WR> WR[1] AND WR5>WR5[5] and wr10>wr10[10] and wr30>wr30[30] then Color.cyan else IF WR < WR[1] AND WR5<WR5[5] and wr10<wr10[10] and wr30>wr30[30] then Color.pink ELSE COLOR.light_GRAY );



####################################################

##FIHER###############################
input priceF = hl2;
input lengthF = 10;

def maxHigh = Highest(priceF, lengthF);
def minLow = Lowest(priceF, lengthF);
def range = maxHigh - minLow;
def value = if IsNaN(priceF)
then Double.NaN
else if IsNaN(range)
then value[1]
else if range == 0
then 0
else 0.66 * ((priceF - 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 = 40 * fish[1];
FTOneBarBack.SETDefaultColor (COLOR.GREEN);
FTOneBarBack.HIDEBubble();
plot FT = 40 * fish;
FT.HIDEBubble();
FT.SETDefaultColor (COLOR.RED);

plot WRMIX = - if result > 0 then 0 else result *FT/50;
WRMIX.HIdeBubble();
WRMIX.SETDefaultColor (COLOR.WHITE);
WRMIX.SETLineWeight (2);

AddLabel (yes, (("MIX")), if WRMIX >= WR5[2] then Color.GREEN else if WRMIX <= WR5[2] then Color.RED else Color.LIGHT_GRAY );

AddLabel (yes, (("MIX")), if WRMIX >= WRMIX[2] then Color.RED else if WRMIX <= WRMIX[2] then Color.GREEN else Color.LIGHT_GRAY );

#AddLabel (yes, (("MIX")), if WR5 = WRMIX[2] then Color.GREEN else if WR5 < WRMIX[2] then Color.RED else Color.LIGHT_GRAY );
####################################################################
#AssignPriceColor( if WR> WR[1] AND WR5>WR5[5] then CreateColor(0, 205, 240) else if WR< WR[1] AND WR5<WR5[5] then Color.RED else Color.CURRENT );
################################################################
#AssignPriceColor( if FT > FT[1] then CreateColor(0, 205, 240) else if FT < FT[1] then Color.YELLOW else Color.CURRENT );
######### FISHER PLOTS ###############################
plot FT_= if close >= 0 then -60 else Double.NaN;
FT_.HideBubble();
FT_.SetPaintingStrategy (PaintingStrategy.DASHES);
###upsugnal.SetDefaultColor(Color.green);
FT_.SetLineWeight (2);
FT_.AssignValueColor( if ft> FT[1] then Color.green else IF FT < FT[1] then Color.red ELSE COLOR.light_GRAY );

AddLabel (yes, "/", Color.GRAY);
AddLabel (yes, (("FT")), if FT > FT[2] then Color.GREEN else if FT < FT[2] then Color.RED else Color.LIGHT_GRAY );
AddLabel (yes, "/", Color.GRAY);


AddLabel (yes, (("WRFT")), if WR5> -60 AND FT>FT[1] then Color.GREEN else IF WR5< -100 AND FT<FT[1] then Color.RED ELSE COLOR.light_GRAY );

#plot CCI_0 = if close >= 0 then -100 else Double.NaN;
#CCI_0.HideBubble();
#CCI_0.SetPaintingStrategy (PaintingStrategy.DASHES);

#CCI_0.SetLineWeight (2);
#CCI_0.AssignValueColor(if FT > FT[1] then Color.GREEN else if FT < FT[1] then Color.RED else Color.GRAY);

input LookBack6 = 52;#6
input LookBack5 = 6;#5
input LookBack3 = 3;#3

#METER###################################################################
input ShowADXValue = {DoNotShow, OnLeft, default OnRight};
input DisplayStrengthMeter = {"No", default "Yes"};
input FixedValueBkgndColor = {default "No", "Yes"};

def ADX6 = DMI(LookBack6);#.ADX
def ADX3 = DMI(LookBack3);#.ADX
def ADX = DMI(LookBack5);#.ADX
def DIBull = DIPlus(LookBack5);
def DIBear = DIMinus(LookBack5);


def BullishTrend = DIBull >= DIBear;

def ShowDigits;

switch (ShowADXValue)
{
case DoNotShow:
ShowDigits = 0;
case OnLeft:
ShowDigits = 1;
case OnRight:
ShowDigits = 2;
}

def HighlightColor =
if (ADX >= 50) then 51 else
if (ADX >= 40 and ADX < 50) then 51 else
if (ADX >= 30 and ADX < 40) then 102 else
if (ADX >= 20 and ADX < 30) then 153 else
if (ADX >= 10 and ADX < 20) then 204 else
255;


def ADXBkgndValueR = 55;#25
def ADXBkgndValueG = 55;#25
def ADXBkgndValueB = 55;#25


#@@
AddLabel (yes, "/", Color.WHITE);

AddLabel( ShowDigits == 2 , Floor(ADX6) - Floor(ADX) - Floor(ADX3), CreateColor(if !BullishTrend then 255 else HighlightColor, if !BullishTrend then HighlightColor else 255 , 51));
#AddLabel (yes, "/", Color.WHITE);
#@@
####################################################################
AssignPriceColor( IF Floor(ADX6) - Floor(ADX) - Floor(ADX3) THEN CreateColor(if !BullishTrend then 255 else HighlightColor, IF !BullishTrend then HighlightColor else 255 , 51) ELSE COLOR.CURRENT);
################################################################


input lengthFI = 13;
#DEF FI = ExpAverage(data = (close - close[1]) * volume, lengthFI);

###ADX1
###AddLabel (yes, " ", Color.GRAY);
AddLabel (yes, ((" ")), if Floor(ADX6 > ADX6[3]) and Floor(ADX > ADX[6]) and Floor(ADX3 > ADX3[9] ) then Color.CYAN else if Floor(ADX6 < ADX6[3]) and Floor(ADX < ADX[6]) and Floor(ADX3 < ADX3[9]) then Color.ORANGE else Color.LIGHT_GRAY );

###AddLabel (yes, " ", Color.GRAY);
AddLabel (yes, ((" ")), if Floor(ADX6 > ADX6[3]) then Color.CYAN else if Floor(ADX6 < ADX6[3]) then Color.ORANGE else Color.LIGHT_GRAY );

#END CODE

Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2018-04-28 at 1.28.09 PM.png
Views:	579
Size:	310.4 KB
ID:	249138  
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
ZombieSqueeze
Platforms and Indicators
Increase in trading performance by 75%
The Elite Circle
MC PL editor upgrade
MultiCharts
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
27 thanks
Diary of a simple price action trader
26 thanks
Tao te Trade: way of the WLD
23 thanks
My NQ Trading Journal
14 thanks
HumbleTraders next chapter
9 thanks
  #2 (permalink)
 plastictrees 
Dallas
 
Experience: Beginner
Platform: ninjatrader
Trading: crude cl
Posts: 5 since Aug 2016
Thanks Given: 0
Thanks Received: 1

Thank you for all your hard work. I was trying to figure out the best way to use this indicator. Why do you have certain lines I’d code grayed out?


Sent using the NexusFi mobile app

Reply With Quote




Last Updated on May 22, 2018


© 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