NexusFi: Find Your Edge


Home Menu

 





SMA_HISTO for thinkorswim


Discussion in ThinkOrSwim

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




 
Search this Thread

SMA_HISTO for thinkorswim

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

TRY this AMAZING INDICATOR.

#SMA_HISTO
################################
input Length3 = 14;
input MovAvgLength = 9;

def highest3 = Highest(high, Length3);
def lowest = Lowest(low, Length3);
def data = if highest3 == lowest then -100 else (highest3 - close) / (highest3 - lowest) * (-100);
def PercentR_SMA = if( data > 0, 0, data);
#PercentR_SMA.SetDefaultColor(Color.white);

plot SMA = 10*Average(data =PercentR_SMA, length = MovAvgLength) +500; #*.1 +50;
SMA.SetDefaultColor(color.magenta);


input Length4 = 14;
input MovAvgLength4 = 14;

def highest4 = Highest(high, Length4);
def lowest4 = Lowest(low, Length4);
def data4 = if highest4 == lowest4 then -100 else (highest4 - close) / (highest4 - lowest4) * (-100);
def PercentR_SMa4 = if( data4 > 0, 0, data4);
#PercentR_SMA.SetDefaultColor(Color.white);

plot SMA4 = 10*Average(data =PercentR_SMA4, length = MovAvgLength4) +500; #*.1 +50;



PLOT smO = WildersAverage(Floor(sma)) ;
PLOT sm1 = WildersAverage(ROUND(sma)) ;
#smO.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);


addcloud(smo, sma, color.yellow, color.cyan);
addcloud(sma4, sma, color.red, color.green);
#smO.assignValueColor(if smo>0 then color.cyan else color.pink);



input length = 30;#70
input over_Sold = 20;
input over_Bought = 80;



def highest = Highest(high, length);
def divisor = highest - Lowest(low, length);
#1*
plot "%R" = if divisor equals 0 then 0 else 100 - 100 * (highest - close) / divisor;
plot OverBought = over_Bought;
OverBought.hide();
plot OverSold = over_Sold;
OverSold.hide();

"%R".DefineColor("OverBought", GetColor(1));
"%R".DefineColor("Normal", GetColor(7));
"%R".DefineColor("OverSold", color.red);
"%R".AssignValueColor(if "%R" > over_Bought then "%R".color("OverBought") else if "%R" < over_Sold then "%R".color("OverSold") else "%R".color("Normal"));
"%R".setLineWeight(2);


plot line0 = 0;
line0.setStyle (curve.MEDIUM_DASH);
line0.setDefaultColor(color.gray);
line0.AssignValueColor(if "%R" > over_Bought then "%R".color("OverBought") else if "%R" < over_Sold then "%R".color("OverSold") else color.dark_gray);
line0.setLineWeight(2);

#smo.AssignValueColor(if "%R" > over_Bought then "%R".color("OverBought") else if "%R" < over_Sold then "%R".color("OverSold") else color.dark_gray);

####END CODE

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
NexusFi Journal Challenge - May 2024
Feedback and Announcements
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
48 thanks
Just another trading journal: PA, Wyckoff & Trends
32 thanks
Bigger Wins or Fewer Losses?
24 thanks
Tao te Trade: way of the WLD
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
  #2 (permalink)
 
Massive l's Avatar
 Massive l 
OR/USA
Legendary /NQ Trader
 
Experience: None
Posts: 2,129 since Mar 2011
Thanks Given: 1,859
Thanks Received: 5,106

Why's it amazing?

Visit my NexusFi Trade Journal Reply With Quote




Last Updated on July 16, 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