NexusFi: Find Your Edge


Home Menu

 





PAINT YOUR BARS MOMENTUM


Discussion in ThinkOrSwim

Updated
    1. trending_up 4,141 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?
April 2026 Jobs Report: +115k vs +65k Expected
Traders Hideout
Iran Talks Final Stages -- Two VLCCs Exit Hormuz, Record …
Traders Hideout
Saylors 41-Month HODL Breaks: Strategy Sells 32 BTC as $ …
Prediction Markets & Event Contracts
Iran Fired a Missile at Israel Last Night. The $8M June …
Prediction Markets & Event Contracts
Would a node-based workflow for automated trading be useful?
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
15 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 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