NexusFi: Find Your Edge


Home Menu

 





market_cipher5_bg


Discussion in ThinkOrSwim

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




 
Search this Thread

market_cipher5_bg

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

#lazybear_wavetrend_ocs
#CIPHER_RSI
#CIPHER_x
#market_cipher4_bg
#market_cipher5_bg
declare lower;

#declare lower;
input lengthF = 21;

def tmp_var =
if high == low then
volume
else
(close - low - (high - close)) / (high - low) * volume
;

def sum_close = sum(tmp_var, lengthF);
def total = sum(volume, lengthF);

def CMF = 100*
if total == 0 then
0
else
sum_close / total -.6
;
#CMF.SetDefaultColor(GetColor(1));

plot ZeroLine = 0;
ZeroLine.SetDefaultColor(GetColor(5));

DEF cm = wildersAverage(cmf, 2);
addcloud(CM, -60, color.green, color.red);
addcloud(CM, -60, color.green, color.red);

plot MONEYLINE = -70;
MONEYLINE.SetDefaultColor(Color.GRAY);
MONEYLINE.AssignValueColor(if CM > -60 then Color.LIGHT_GREEN else Color.LIGHT_RED);
MONEYLINE.SetLineWeight(4);
#-------------


#addcloud(mfo, 0, color.green, color.red);
#addcloud(mfo, 0, color.green, color.red);
##plot MONEYLINE = -70;
##MONEYLINE.SetDefaultColor(Color.GRAY);
##MONEYLINE.AssignValueColor(if MFO > -60 then Color.LIGHT_GREEN else Color.LIGHT_RED);
##MONEYLINE.SetLineWeight(4);
#-----------------------------------------------


input Channel_Length = 10; #10
input Average_Length = 10; #10
input over_bought_1 = 60;
input over_bought_2 = 55;
input over_sold_1 = -60;
input over_sold_2 = -53;
input show_bubbles = yes;
input show_sec_bbls = no;
input show_alerts = yes;


plot zero = 0;
zero.SetDefaultColor( Color.GRAY );
zero.SetStyle(Curve.LONG_DASH);
zero.SetDefaultColor(Color.MAGENTA);
plot obLevel1 = over_bought_1;
obLevel1.SetDefaultColor(Color.WHITE);
plot osLevel1 = over_sold_1;
osLevel1.SetDefaultColor(Color.WHITE);
#plot obLevel2 = over_bought_2;
#obLevel2.SetDefaultColor(Color.RED);
#obLevel2.SetStyle(Curve.SHORT_DASH);
plot osLevel2 = over_sold_2;
osLevel2.SetDefaultColor(Color.GREEN);
osLevel2.SetStyle(Curve.SHORT_DASH);

#FASTWAVE
def ap = 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);
def wt1 = tci;
def wt2 = SimpleMovingAvg(wt1, 3);
#wt2.setDefaultColor(color.cyan);
#wt2.setLineWeight(2);
plot diff = .5 * (wt1 - wt2);
diff.SetDefaultColor(Color.YELLOW);
#AddCloud(wt1, 0, CreateColor(40, 162, 248), CreateColor(40, 162, 248));
diff.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);


#SLOW WAVE
#2 channel test------------------------------
input Channel_Length2 = 8; #10
input Average_Length2 = 20; #10

def ap2 = close;
def esa2 = ExpAverage(ap2, Channel_Length2);
def d2 = ExpAverage(AbsValue(ap2 - esa2), Channel_Length2);
def ci2 = (ap2 - esa2) / (0.025 * d2);
def tci2 = ExpAverage(ci2, Average_Length2);
def wta = tci2;
def wtb = SimpleMovingAvg(wta, 3);
#def w = .3* tci2;

#addcloud(wta, wtb, color.cyan, color.white);
#addcloud(wta, wtb, color.cyan, color.white);
#addcloud(wta, wtb, color.cyan, color.white);
#addcloud(wta, wtb, color.cyan, color.white);


#-------------------------------------------
#BACKGROUND fast wave
def W1 = if wt1 < wt2 then wt1 else wt1;
def W2 = if wt1 > wt2 then wt1 else wt2;
AddCloud(wt1, wt2, Color.WHITE, Color.WHITE);
AddCloud(wt1, wt2, Color.WHITE, Color.WHITE);
AddCloud(wt1, wt2, Color.WHITE, Color.WHITE);
AddCloud(wt1, wt2, Color.WHITE, Color.WHITE);

AddCloud(wt2, 0, Color.CYAN, Color.CYAN);
AddCloud(wt2, 0, Color.CYAN, Color.CYAN);
#AddCloud(wt1, wt2, Color.WHITE, Color.WHITE);
AddCloud(wt2, 0, CreateColor(40, 162, 248), CreateColor(40, 162, 248));
#--------------------------------------------

#-------------------------------------------
#BACKGROUND slow wave
def W1_ = if wta < wtb then wta else wta;
def W2_ = if wta > wtb then wta else wtb;
AddCloud(wta, wtb, Color.CYAN, Color.WHITE);
AddCloud(wta, wtb, Color.CYAN, Color.WHITE);
AddCloud(wta, wtb, Color.CYAN, Color.WHITE);
AddCloud(wta, wtb, Color.CYAN, Color.WHITE);

AddCloud(wta, 0, Color.RED, Color.RED);
AddCloud(wta, 0, Color.RED, Color.RED);

#--------------------------------------------
#AddCloud(MFO, 0, Color.GREEN, Color.RED);
#AddCloud(MFO, 0, Color.GREEN, Color.RED);


#RSI
input lengthR = 14;
input price = close;
input averageType = AverageType.WILDERS;

def NetChgAvg = MovingAverage(averageType, price - price[1], lengthR);
def TotChgAvg = MovingAverage(averageType, AbsValue(price - price[1]), lengthR);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;

def RSI = 50 * (ChgRatio + 1);
plot R = Average(RSI, 3);
R.SetDefaultColor(Color.GRAY);

R.DefineColor("OverBought", GetColor(5));
R.DefineColor("Normal", GetColor(8));
R.DefineColor("OverSold", GetColor(1));
R.AssignValueColor(if RSI > 90 then R.Color("OverBought") else if RSI < 10 then R.Color("OverSold") else R.Color("Normal"));
#-----------------------------------------------

#AddCloud(diff, 0, Color.YELLOW, Color.YELLOW);
#AddCloud(diff, 0, Color.YELLOW, Color.YELLOW);
#AddCloud(diff, 0, Color.YELLOW, Color.YELLOW);

#addcloud(tci[1], 0, color.yellow, color.yellow );
#addcloud(w2[1], 0, color.yellow, color.yellow );
#addcloud(w2[1], 0, color.yellow, color.yellow );
#addcloud(w2[1], 0, color.yellow, color.yellow );
#-------------------------------------------

#addcloud(wta[1], 0, color.red, color.red);
AddCloud(wta, 0, Color.RED, Color.RED);

#

#yellow TEST superfast

input Channel_Length3 = 2; #10
input Average_Length3 = 4; #10
def ap3 = hlc3;
def esa3 = ExpAverage(ap3, Channel_Length3);
def d3 = ExpAverage(AbsValue(ap3 - esa3), Channel_Length3);
def ci3 = (ap3 - esa3) / (.030 * d3);
def tci3 = .4 * ExpAverage(ci3, Average_Length3);
def w3 = Average(tci3, 3);

#tci3.setDefaultColor(color.yellow);
#AddCloud(tci3, 0, Color.YELLOW, Color.YELLOW );
#AddCloud(tci3, 0, Color.YELLOW, Color.YELLOW );
#-------------------------------------------

#AddCloud(w3[1], diff, Color.WHITE, Color.YELLOW );
#AddCloud(w3[1], diff, Color.WHITE, Color.YELLOW );
#AddCloud(w3[1], diff, Color.WHITE, Color.YELLOW );
#-------------------------------------------

plot UpSignal = if wt1 crosses above wt2 and tci < -80 then tci else Double.NaN;
plot DownSignal = if wt1 crosses below wt2 and tci > 80 then tci else Double.NaN;

UpSignal.SetDefaultColor(Color.CYAN);
UpSignal.SetPaintingStrategy(PaintingStrategy.POINTS);
UpSignal.SetLineWeight(5);
DownSignal.SetDefaultColor(Color.YELLOW);
DownSignal.SetPaintingStrategy(PaintingStrategy.POINTS);
DownSignal.SetLineWeight(5);
#-------------------
plot Up = if R crosses above 50 then R else Double.NaN;
plot Down = if R crosses below 40 then R else Double.NaN;

Up.SetDefaultColor(Color.GREEN);
Up.SetPaintingStrategy(PaintingStrategy.POINTS);
Up.SetLineWeight(5);
Down.SetDefaultColor(Color.RED);
Down.SetPaintingStrategy(PaintingStrategy.POINTS);
Down.SetLineWeight(5);



##
input length = 3;
input overBought = -20;
input overSold = -80;

def hh = Highest(high, length);
def ll = Lowest(low, length);
def result = if hh == ll then -100 else (hh - close) / (hh - ll) * (-100);

def WR1 = .3 * if result > 0 then 0 else result - 150;
def wr1_ = Average(WR1, 6);

##AddCloud(wr1_, -60, Color.GREEN, Color.RED);
##AddCloud(wr1_, -60, Color.GREEN, Color.RED);

#YELLOW-------------------------------------
def WR = .3 * if result > 0 then 0 else result + 43;
def wr_ = Average(WR, 6);

#AddCloud(wr_, 0, Color.YELLOW, Color.YELLOW);
#AddCloud(wr_, 0, Color.YELLOW, Color.YELLOW);
#AddCloud(wr_, 0, Color.YELLOW, Color.YELLOW);
#AddCloud(wr_, 0, Color.YELLOW, Color.YELLOW);

#------------------------------------------
addcloud(80, 90, color.cyan, color.cyan);
addcloud(50, 40, color.cyan, color.cyan);
addcloud(30, 20, color.pink, color.pink);
addcloud(65, 55, color.pink, color.pink);
#------------------------------------------
#AddCloud(MFO[1], 0, Color.GREEN, Color.RED);
#AddCloud(MFO[1], -60, Color.GREEN, Color.RED);
#AddCloud(MF, -60, Color.GREEN, Color.RED);
#AddCloud(MF, -60, Color.GREEN, Color.RED);

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Cheap historycal L1 data for stocks
Stocks and ETFs
Trend Direction Force Index (TDFI)
Platforms and Indicators
What broker to use for trading palladium futures
Commodities
 
  #2 (permalink)
alagrande
glendale ca usa
 
Posts: 97 since Sep 2017
Thanks Given: 11
Thanks Received: 88


Reply With Quote
  #3 (permalink)
CryptoBuffalo
Honolulu
 
Posts: 2 since May 2020
Thanks Given: 0
Thanks Received: 1


This is amazing!!! It's exactly what I've been looking for on TOS. Can't thank you enough for coding the ThinkScript for this.

Reply With Quote




Last Updated on May 14, 2020


© 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