NexusFi: Find Your Edge


Home Menu

 





PAINT YOUR BARS MOMENTUM


Discussion in ThinkOrSwim

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




 
Search this Thread

PAINT YOUR BARS MOMENTUM

  #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?
Quant vue
Trading Reviews and Vendors
Cheap historycal L1 data for stocks
Stocks and ETFs
ZombieSqueeze
Platforms and Indicators
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
 
  #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


© 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