NexusFi: Find Your Edge


Home Menu

 





MTF Exp_Avg dots


Discussion in ThinkOrSwim

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




 
Search this Thread

MTF Exp_Avg dots

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

## for thinkorswim ##

declare lower;
###########################EXP_MTF_DOTS_III
input price = close;
input superfast_length = 5;
input superfast_20 = 5;#20
input fast_length = 13;#50
input slow_length = 11;#200
input displace = 0;


## ## ##
def mov_avg4 = ExpAverage( close, superfast_length);
def mov_avg4_3 = ExpAverage( close(period = AggregationPeriod.THREE_min), superfast_length);
def mov_avg4_5 = ExpAverage( close(period = AggregationPeriod.FIVE_min), superfast_length);


def mov_avg20 = ExpAverage( close[-displace], superfast_20);
def mov_avg20_3 = ExpAverage( close(period = AggregationPeriod.THREE_min)[-displace], superfast_20);
def mov_avg20_5 = ExpAverage( close(period = AggregationPeriod.FIVE_min)[-displace], superfast_20);

def mov_avg13 = ExpAverage(price[-displace], fast_length);
def mov_avg13_3 = ExpAverage( close(period = AggregationPeriod.THREE_min) [-displace], fast_length);
def mov_avg13_5 = ExpAverage(close(period = AggregationPeriod.FIVE_min)[-displace], fast_length);
def mov_avg21 = ExpAverage(price[-displace], slow_length);


########################################################
plot upsugnal = if mov_avg4 >= 0 then 11 else Double.NaN;
upsugnal.SetPaintingStrategy (PaintingStrategy.SQUARES);
###upsugnal.SetDefaultColor(Color.green);
upsugnal.SetLineWeight (3);

upsugnal.AssignValueColor(if mov_avg4 > mov_avg4[1] then Color.green else if mov_avg4 < mov_avg4[1] then Color.red else color.yellow);
#########

#######################################################
##def CrossUp0 = mov_avg4 > mov_avg4[1] ;
####def CrossDn0 = mov_avg4 < mov_avg4[1];

####Alert(CrossUp0,Concat(GetSymbolPart(), " Expstudy ." ), Alert.BAR, Sound.Bell);
#####Alert(CrossDn0, Concat(GetSymbolPart(), "ExpStudy." ), Alert.BAR, Sound.Bell);
########################################################
##############################################
Upsugnal.setDefaultColor (color.black);
#plot UPSignal = if mov_avg20_3 < mov_avg20_3[5] then mov_avg20_3 else Double.NaN;
plot upsugnal3 = if mov_avg4_3 >= 0 then 10 else Double.NaN;
upsugnal3.SetPaintingStrategy (PaintingStrategy.SQUARES);
####upsugnal3.SetDefaultColor(Color.white);
upsugnal3.SetLineWeight (1);
upsugnal3.AssignValueColor(if mov_avg4_3 > mov_avg4_3[3] then Color.GREEN else if mov_avg4_3 < mov_avg4_3[3] then Color.red else color.yellow);

##Upsugnal3.setDefaultColor (color.black);
##
plot upsugnal5 = if mov_avg4_5 >= 0 then 9 else Double.NaN;
upsugnal5.SetPaintingStrategy (PaintingStrategy.SQUARES);
####upsugnal5.SetDefaultColor(Color.white);
upsugnal5.SetLineWeight (1);
upsugnal5.AssignValueColor(if mov_avg4_5 > mov_avg4_5[5] then Color.GREEN else if mov_avg4_5 < mov_avg4_5[5] then Color.red else color.yellow);

###Upsugnal5.setDefaultColor (color.black);


##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>..
##############COMBO 3 ############################
plot combo3 = if mov_avg13 >= 0 then 8 else Double.NaN;
combo3.SetPaintingStrategy (PaintingStrategy.SQUARES);
####combo3.SetDefaultColor(Color.black);
combo3.SetLineWeight (3);
#combo3.AssignValueColor(if mov_avg4 > mov_avg4[1] then Color.green else if mov_avg4_3 > mov_avg4_3[3] then color.red else if mov_avg4_5 > mov_avg4_5[5] then color.red else Color.red);
combo3.AssignValueColor(if mov_avg4 > mov_avg4[1] then Color.green else if mov_avg4_3 > mov_avg4_3[3] then color.blue else if mov_avg4_5 > mov_avg4_5[5] then color.WHITE else Color.RED);
#<<<<<<<<<


#######################################################
## ###### ####### ######### ##########
##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>..
##############COMBO 4 ############################
plot combo4 = if mov_avg4 >= 0 then 6 else Double.NaN;
combo4.SetPaintingStrategy (PaintingStrategy.SQUARES);
###combo4.SetDefaultColor(Color.black);
combo4.SetLineWeight (2);
combo4.AssignValueColor(if mov_avg4 > mov_avg4[1] AND mov_avg4_3 > mov_avg4_3[3] then color.green else if mov_avg4_5 > mov_avg4_5[5] then color.blue else Color.MAGENTA);
###>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.
#######################################################

## ###### ####### ######### ##########
##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>..
##############COMBO 5 ############################
plot combo5 = if mov_avg13 >= 0 then 5 else Double.NaN;
combo5.SetPaintingStrategy (PaintingStrategy.SQUARES);
#####combo5.SetDefaultColor(Color.black);
combo5.SetLineWeight (2);
combo5.AssignValueColor(if mov_avg4 > mov_avg4[1] AND mov_avg4_3 > mov_avg4_3[3] AND mov_avg4_5 > mov_avg4_5 then color.yellow else if mov_avg4_5 > mov_avg4_5[5] then color.green else Color.red);
###>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.
#######################################################
## ###### ####### ######### ##########
##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>..
##############COMBO 6 ############################
plot combo6 = if mov_avg13 >= 0 then 4 else Double.NaN;
combo6.SetPaintingStrategy (PaintingStrategy.SQUARES);
####combo6.SetDefaultColor(Color.black);
combo6.SetLineWeight (3);
combo6.AssignValueColor(if mov_avg4 > mov_avg4[1] then color.green else if mov_avg4_3 > mov_avg4_3[3] then color.red else if mov_avg4_5 > mov_avg4_5[5] then color.blue else if mov_avg4_5 > mov_avg4_5[5] then color.green else Color.red);
###########
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#def UpBar = mov_avg4 > mov_avg4[1];
#def DownBar = mov_avg4 < mov_avg4[1];

#def DownBar = combo6<combo6[1];

#input PaintBars = Yes;
#AssignPriceColor (if mov_avg4 > mov_avg4[1] then #color.green else COLOR.RED);
#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];
###>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.
#######################################################
plot DL3 = 3;
DL3.HideBubble();
DL3.SetDefaultColor(Color.WHITE);
DL3.SetLineWeight(2);
#PLOT LINE3= 3;
plot DL7 = 7;
DL7.HideBubble();
DL7.SetDefaultColor(Color.WHITE);
DL7.SetLineWeight(2);
######################
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
####### COMBO (AVG13) 1,3,5 MIN>>>>>>>>>>>>>>>>>>>>>
#input price = close;
input superfast_length7 = 5;
input superfast_20_7 = 5;#20
input fast_length7 = 2;#50
input slow_length7 = 1;#200
input displace7 = 0;

## ## ##
def mov_avg20_7 = ExpAverage( close[-displace7], superfast_20_7);

def mov_avg20_3_7 = ExpAverage( close(period = AggregationPeriod.THREE_min)[-displace7], superfast_20_7);

def mov_avg20_5_7 = ExpAverage( close(period = AggregationPeriod.FIVE_min)[-displace7], superfast_20_7);

plot combo7 = if mov_avg13 >= 0 then 2 else Double.NaN;
combo7.SetPaintingStrategy (PaintingStrategy.SQUARES);

#combo1.SetDefaultColor(Color.black);
#combo1.SetLineWeight (2);
#combo1.AssignValueColor(if mov_avg13 > mov_avg13[1] then Color.CYAN else if mov_avg13_3 > mov_avg13_3[3] then color.yellow else if mov_avg13_5 > mov_avg13_5[5] then color.yellow else Color.PINK);
##>>>>>>>.>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>155
####combo7.SetDefaultColor(Color.black);
combo7.SetLineWeight (2);
combo7.AssignValueColor(if mov_avg20_7 > mov_avg20_7[1] and mov_avg20_5_7 > mov_avg20_5_7[5] then color.green else Color.red);
#######################################################
##
#######################################################
#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
####### COMBO (AVG13) 1,3,5 MIN>>>>>>>>>>>>>>>>>>>>>
#input price = close;
input superfast_length8 = 91;
input superfast_20_8 = 1;#20
input fast_length8 = 2;#50
input slow_length8 = 11;#200
input displace8 = 0;

## ## ##
def mov_avg20_8 = ExpAverage( close[-displace8], superfast_20_8);

def mov_avg20_3_8 = ExpAverage( close(period = AggregationPeriod.THREE_min)[-displace8], superfast_20_8);

def mov_avg20_5_8 = ExpAverage( close(period = AggregationPeriod.FIVE_min)[-displace8], superfast_20_8);
##>>>>>>>.>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>155

plot combo8 = if mov_avg13 >= 0 then 1 else Double.NaN;
combo8.SetPaintingStrategy (PaintingStrategy.SQUARES);

####combo8.SetDefaultColor(Color.black);
combo8.SetLineWeight (5);
combo8.AssignValueColor(if mov_avg20_8 > mov_avg20_8[1] and mov_avg20_3_8 < mov_avg20_3_8 then color.white else if mov_avg20_3 > mov_avg20_3_8 then color.RED else if mov_avg20_5_8 < mov_avg20_5_8[5] then color.PINK else Color.green);

##input PaintBars = Yes;

##AssignPriceColor(if mov_avg20_8 > mov_avg20_8[1] and mov_avg20_3_8 < mov_avg20_3_8 then color.white else if ##mov_avg20_3 > mov_avg20_3_8 then color.RED else if mov_avg20_5_8 < mov_avg20_5_8[5] then color.PINK else ##Color.green);



plot combo3A = if mov_avg13 >= 0 then -1 else Double.NaN;
combo3A.SetPaintingStrategy (PaintingStrategy.SQUARES);
####combo3.SetDefaultColor(Color.black);
combo3A.SetLineWeight (5);

combo3A.AssignValueColor(if mov_avg4 > mov_avg4[1] then Color.green else if mov_avg4 < mov_avg4[1] then color.RED else color.BLUE);
###>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.

Reply With Quote
Thanked by:




Last Updated on February 16, 2018


© 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