NexusFi: Find Your Edge


Home Menu

 





CIPHER_COLORED based on wave trend from lazy bear


Discussion in ThinkOrSwim

Updated
    1. trending_up 2,988 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 2 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

#CIPHER_COLORED
declare lower;
input Channel_Length = 4; #10
input Average_Length = 3; #10
input over_bought_1 = 60;
input over_bought_2 = 53;
input over_sold_1 = -60;
input over_sold_2 = -53;
input show_bubbles = yes;
input show_sec_bbls = no;
input show_alerts = yes;
def ap = hlc3;#hlc3
def esa = ExpAverage(ap, Channel_Length);
def d = ExpAverage(AbsValue(ap - esa), Channel_Length);
def ci = (ap - esa) / (0.015 * d);
def tci = ExpAverage(ci, Average_Length);
PLOT wt1 = tci;
WT1.setLineWeight(2);
PLOT wt2 = SimpleMovingAvg(wt1, 3);
def wt1_1 = wt1;
#wt1_1.SetDefaultColor(Color.GREEN);
def wt2_1 = wt2;
#wt2_1.SetDefaultColor(Color.RED);
#wt2_1.SetStyle(Curve.POINTS);
#plot wt3 = (wt1 - wt2);


#def wt3 = Average (wt1 - wt2, 4);
#wt3.SetDefaultColor(Color.YELLOW);
#wt3.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
#wt3.setLineWeight(1);

input Channel_Length2 = 12; #10
input Average_Length2 = 12; #10
def esa2 = ExpAverage(ap, Channel_Length2);
def d2 = ExpAverage(AbsValue(ap - esa2), Channel_Length2);
def ci2 = (ap - esa) / (0.015 * d);
def tci2 = ExpAverage(ci2, Average_Length2);
PLOT wtA = tci2;
#WT1.setLineWeight(1);
DEF wtB = SimpleMovingAvg(wtA, 4);


input Channel_Length3 = 14; #10
input Average_Length3 = 14; #10
def esa3 = ExpAverage(ap, Channel_Length3);
def d3 = ExpAverage(AbsValue(ap - esa3), Channel_Length3);
def ci3 = (ap - esa) / (0.015 * d);
def tci3 = ExpAverage(ci3, Average_Length3);
def wtC = tci3;
#WT1.setLineWeight(1);
def wtD = SimpleMovingAvg(wtC, 4);



input Channel_Length4 = 16; #10
input Average_Length4 = 16; #10
def esa4 = ExpAverage(ap, Channel_Length4);
def d4 = ExpAverage(AbsValue(ap - esa4), Channel_Length4);
def ci4 = (ap - esa) / (0.015 * d);
def tci4 = ExpAverage(ci4, Average_Length4);
DEF wtE = tci4;
#WT1.setLineWeight(1);
DEF wtF = SimpleMovingAvg(wtE, 4);

WT1.ASSignValueColor( if WT2<WTA and wt1>wTB then color.CYAN else if WT2>WTA and wt1<wTB then color.YELLOW else color.gray);


ADDCLOUD(WT2, WTA, COLOR.GREEN, COLOR.RED);


#addlabel(yes, "x", if WTA>WT2 then color.CYAN else if WTA<WT2 then color.YELLOW else color.gray);

#ADDCLOUD(WT1, WTA, COLOR.GREEN, COLOR.RED);

#addlabel(yes, "x", if WT1>WTA then color.CYAN else if WT1<WTA then color.YELLOW else color.gray);


addlabel(yes, "x", if WTA>WT2 then color.CYAN else if WTA<WT2 then color.YELLOW else color.gray);

addlabel(yes, "O", if WT2<WTA and wt1>wTB then color.CYAN else if WT2>WTA and wt1<wTB then color.YELLOW else color.gray);
##addLabel(yes, " .. ", if wt12>wt13 and wt14>wt23 then color.green else if wt12<wt13 and wt14<wt23 then color.red else color.gray);

#ADDLABEL (yes, " ", if green[1] > white[1] and white[1]>red[1] then color.green else if green[1] < white[1] and white[1]<red[1] then color.red else color.gray);

#ASSignBackgroundColor( if wt12>wt13 and wt14>wt23 then color.green else if wt12<wt13 and wt14<wt23 then color.red else color.gray);


#ALMA
script ALMA { input Data = close; input Window = 9;
input Sigma = 4; #6
input Offset = 0.85;
def m = (Offset * (Window - 1));
def s = Window / Sigma;

def SumVectorData = fold y = 0 to Window with WS do WS + Exp(-(Sqr(y - m)) / (2 * Sqr(s))) * GetValue(Data, (Window - 1) - y);
def SumVector = fold z = 0 to Window with CW do CW + Exp(-(Sqr(z - m)) / (2 * Sqr(s)));

plot ALMA = 100* SumVectorData / SumVector;
}
input fastWindow = 2; #9
input slowWindow = 18;
input Sigma = 6; input Offset = 0.85;
def fastALMA = ALMA (close, fastWindow, Sigma, Offset);
def slowALMA = ALMA (close, slowWindow, Sigma, Offset);
def Hist = fastALMA - slowALMA;

addlabel(yes, "A", if Hist > 0 then color.green else color.red);

plot UpSignal = if HIST crosses above 0 then wt1 else Double.NaN;
plot DownSignal = if HIST crosses below 0 then wt1 else Double.NaN;

UpSignal.SetDefaultColor(Color.GREEN);
UpSignal.SetPaintingStrategy(PaintingStrategy.POINTS);
UpSignal.SetLineWeight(4);
DownSignal.SetDefaultColor(Color.RED);
DownSignal.SetPaintingStrategy(PaintingStrategy.POINTS);
DownSignal.SetLineWeight(4);

#end code


Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Datafeed for Atas
Platforms and Indicators
My Rant with AMP Futures
Trading Reviews and Vendors
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
EA
Platforms and Indicators
Trump Media to sell instant access to market-moving soci …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Mes vs MNQ
6 thanks
NexusFi site changelog and issues/problem reporting
5 thanks
BERN ALGOS algo trading journal
3 thanks
Johnnys Journal
2 thanks
TopStep Trader disappointment
2 thanks
  #2 (permalink)
 Cloudy 
desert CA
 
Experience: Intermediate
Platform: NT7, various
Broker: various, TDA
Trading: NQ,ES
Posts: 2,126 since Jul 2011
Thanks Given: 2,398
Thanks Received: 1,752

Interesting looking oscillator on TOS. Does it help with spotting divergences?


Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
alagrande
glendale ca usa
 
Posts: 97 since Sep 2017
Thanks Given: 11
Thanks Received: 88


YES, it does!!


Reply With Quote




Last Updated on February 6, 2020


© 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