NexusFi: Find Your Edge


Home Menu

 





PAINT YOUR BARS MOMENTUM


Discussion in ThinkOrSwim

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




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

#########PAINT_MOMENTUM########
###########################PAINT MOMENTUM############
#input over_bought = 40.0;
#input over_sold = -40.0;
input percentDLength = 3;
input percentKLength = 5;

def min_low = Lowest(low, percentKLength);
def max_high = Highest(high, percentKLength);
def rel_diff = close - (max_high + min_low) / 2;
def diff = max_high - min_low;

def avgrel = ExpAverage(ExpAverage(rel_diff, percentDLength), percentDLength);
def avgdiff = ExpAverage(ExpAverage(diff, percentDLength), percentDLength);

def SMI = if avgdiff != 0 then avgrel / (avgdiff / 2) * 100 else 0;
###SMI.SetDefaultColor(GetColor(1));

def UpBar = SMI >avgrel ;
def DownBar = SMI<avgrel ;

input PaintBars = Yes;
AssignPriceColor (if !PaintBars then Color.CURRENT else if UpBar >= 0 and UpBar > DownBar[0] then Color.GREEN else if UpBar <= 1 and UpBar < DownBar[1] then Color.RED else Color.WHITE);
#UpBar > DownBar[0]


Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Hormuz Surges From 14% to 26.5% Intraday as Irans Answer …
Prediction Markets & Event Contracts
After $87M Settles NO: Irans Nuclear Redline Sets Up the …
Prediction Markets & Event Contracts
One Wallet Made $200K in Hours: AP Probes Polymarket Cea …
Prediction Markets & Event Contracts
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
CFTC Workforce Shrinks 24% to 15-Year Low While Predicti …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
205 thanks
Sober Journey With S&P
21 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
Thanks Mike. Godspeed.
7 thanks
  #2 (permalink)
Drive
Bakersfield
 
Posts: 7 since Feb 2019
Thanks Given: 0
Thanks Received: 0

Is this for MACD or Stochastics?


Reply With Quote




Last Updated on February 9, 2019


© 2026 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 - Downloads - Top
no new posts