SMA_HISTO for thinkorswim - futures io
futures io futures trading

SMA_HISTO for thinkorswim

Discussion in ThinkOrSwim

Updated by Massive l
    1. trending_up 484 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 1 replies
    2. attach_file 0 attachments

Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

Search this Thread

SMA_HISTO for thinkorswim

(login for full post details)
  #1 (permalink)
glendale ca usa
Posts: 96 since Sep 2017
Thanks: 11 given, 75 received


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);

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

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);

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

PLOT smO = WildersAverage(Floor(sma)) ;
PLOT sm1 = WildersAverage(ROUND(sma)) ;

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

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

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

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

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

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


Reply With Quote

Can you help answer these questions
from other members on futures io?
is there an easy way to obtain by code the price variation percentual
Looking freelancer for MT4 Indicator
Platforms and Indicators
Atm strategy help
Traders Hideout
Need a near crosses scan help for TOS
Best Threads (Most Thanked)
in the last 7 days on futures io
Legal question and need desperate help
89 thanks
Building a high-performance data system
15 thanks
Is Orderflow An Outdated Concept?
11 thanks
VWAP for stock index futures trading?
11 thanks
New Computer Build
11 thanks
(login for full post details)
  #2 (permalink)
Legendary Market Wizard
Portland, OR
Experience: None
Massive l's Avatar
Posts: 1,905 since Mar 2011
Thanks: 1,514 given, 3,676 received

Why's it amazing?

Reply With Quote

futures io Trading Community Platforms and Indicators ThinkOrSwim > SMA_HISTO for thinkorswim

July 16, 2018

Upcoming Webinars and Events

Getting Comfortable with Price Action Patterns w/Earn2Trade

Aug 4

Live Video Panel: Ask Me Anything w/Ironbeam Brokerage

Aug 6

Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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.
no new posts