NexusFi: Find Your Edge


Home Menu

 





RSI_POINTS for thinkorswim


Discussion in ThinkOrSwim

Updated
      Top Posters
    1. looks_one alagrande with 1 posts (2 thanks)
    2. looks_two dayfun with 1 posts (0 thanks)
    3. looks_3 diazlaz with 1 posts (0 thanks)
    4. looks_4 tarigal with 1 posts (0 thanks)
    1. trending_up 1,531 views
    2. thumb_up 2 thanks given
    3. group 4 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

RSI_POINTS for thinkorswim

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

declare lower;
#RSI_POINTS
input length = 44;#24
input length2 = 18;#8
input over_Bought = 70;
input over_Sold = 30;
input price = close;
input averageType = AverageType.WILDERS;
input showBreakoutSignals = no;

def NetChgAvg = MovingAverage(averageType, price - price[1], length);
def TotChgAvg = MovingAverage(averageType, AbsValue(price - price[1]), length);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;

plot RSI = 100 * (ChgRatio + .5);
##plot OverSold = over_Sold;
##plot OverBought = over_Bought;

plot avg = wildersAverage(RSI, length2);
avg.setDefaultColor(color.white);
addcloud(rsi, avg, color.green, color.red);
addcloud(rsi, avg, color.green, color.red);


###plot line50 = 50;
###line50.setStyle (curve.long_DASH);
###line50.setDefaultColor(color.gray);
RSI.DefineColor("OverBought", GetColor(1));
RSI.DefineColor("Normal", GetColor(7));
RSI.DefineColor("OverSold", color.red);
RSI.AssignValueColor(if RSI > over_Bought then RSI.color("OverBought") else if RSI < over_Sold then RSI.color("OverSold") else RSI.color("Normal"));
RSI.setLineWeight(2);


#percent_RSI
input RSI_length2 = 14;
input RSI2_length = 14;
#input over_bought = 80;
#input over_sold = 20;

input RSI_average_type = AverageType.WILDERS;
input RSI_price = close;
input KPeriod = 44;#14
input DPeriod = 3;
input slowing_period = 1;
#input averageType = AverageType.SIMPLE;
#input showBreakoutSignals = {default "No", "On FullK", "On FullD", "On FullK & FullD"};

def RSI2 = RSI(price = RSI_price, length = RSI_length2, averageType = RSI_average_type);
def avg1 = wildersAverage(rsi, RSI2_length );


def FullK = StochasticFull(over_bought, over_sold, KPeriod, DPeriod, RSI, RSI, RSI, slowing_period, averageType).FullK;
##FullK.setDefaultColor(color.yellow);
plot FullD = StochasticFull(over_bought, over_sold, KPeriod, DPeriod, RSI, RSI, RSI, slowing_period, averageType).FullD;
FullD.setDefaultColor(color.yellow);


plot UpSignal_ = if FullD> FullD[1] AND FullD > 70 then FullD else Double.NaN;
plot DownSignal_ = if FullD< FullD[1] AND FullD < 30 then FullD else Double.NaN;

UpSignal_.SetDefaultColor(Color.BLUE);
UPSignal_.SETLineWeight(2);
UpSignal_.SetPaintingStrategy(PaintingStrategy.POINTS);
DownSignal_.SetDefaultColor(Color.YELLOW);
DOWNSignal_.SETLineWeight(2);
DownSignal_.SetPaintingStrategy(PaintingStrategy.POINTS);


plot UpSignal2_ = if FullD>75 then FullD else Double.NaN;
plot DownSignal2_ = if FullD<25 then FullD else Double.NaN;
UpSignal2_.SetDefaultColor(Color.CYAN);
UPSignal2_.SETLineWeight(4);
UpSignal2_.SetPaintingStrategy(PaintingStrategy.POINTS);
DownSignal2_.SetDefaultColor(Color.red);
DOWNSignal2_.SETLineWeight(4);
DownSignal2_.SetPaintingStrategy(PaintingStrategy.POINTS);
#####

input lengthR = 50;
input lengthp2 = 8;
input lengthp3 = 5;
#input over_Sold = 20;
#input over_Bought = 80;

def highest = Highest(high, lengthR);
def divisor = highest - Lowest(low, lengthR);

DEF "%R" = 1* if divisor equals 0 then 0 else 100 - 100 * (highest - close) / divisor;

plot line50 = 50;
line50.setStyle (curve.MEDIUM_DASH);
line50.setDefaultColor(color.gray);
line50.AssignValueColor(if "%R" > over_Bought then color.CYAN else if "%R" < over_Sold then color.red else color.gray);
line50.setLineWeight(4);
###ADDCLOUD(line50, slowRSI, color.red, color.green);
###
plot OverSold = over_Sold;
overSold.setDefaultColor(color.gray);
OverSold.AssignValueColor(if "%R" > over_Bought then color.CYAN else if "%R" < over_Sold then color.red else color.gray);

plot OverBought = over_Bought;
overBought.setDefaultColor(color.gray);
OverBought.AssignValueColor(if "%R" > over_Bought then color.CYAN else if "%R" < over_Sold then color.red else color.gray);
overBought.hidebubble();


#code end

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
Strategy stop orders partially filled
EasyLanguage Programming
ZombieSqueeze
Platforms and Indicators
Cheap historycal L1 data for stocks
Stocks and ETFs
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Funded Trader platforms
32 thanks
Just another trading journal: PA, Wyckoff & Trends
23 thanks
Trading with Intuition
17 thanks
Self sabotage reframed
14 thanks
GFIs1 1 DAX trade per day journal
9 thanks
  #2 (permalink)
 dayfun 
orlando florida
 
Experience: None
Platform: TradeStation Thinkorswim
Trading: equities
Posts: 1 since Sep 2018
Thanks Given: 0
Thanks Received: 0

This is very nice! This fits well with my setup. Thanks for sharing.

Reply With Quote
  #3 (permalink)
 diazlaz 
Fort Lee + NJ/USA
 
Experience: None
Platform: TOS
Trading: Currency
Posts: 1 since Dec 2017
Thanks Given: 3
Thanks Received: 0


thanks for the indicator. Do you have some more information and usage that describes the indicator and points in more depth? Looks great - thanks for sharing.

Reply With Quote
  #4 (permalink)
tarigal
Phoenix
 
Posts: 1 since Nov 2018
Thanks Given: 0
Thanks Received: 0

thanks for sharing!

Reply With Quote




Last Updated on November 26, 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