NexusFi: Find Your Edge


Home Menu

 





please help with a question about indicator not always showing up


Discussion in ThinkOrSwim

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




 
Search this Thread

please help with a question about indicator not always showing up

  #1 (permalink)
DLY206
seattle wa/usa
 
Posts: 2 since Oct 2014
Thanks Given: 0
Thanks Received: 0

Hi,
I am new to this trying to learn thinkscript. I have a indicator that I have set up and it seems to work fine when it does plot but when I am looking back I notice multiple points where all the conditions for the indicator were met and it did not plot for some reason can someone please help let me know what is going on?

This is for /ES on a 4500t chart.

i posted the script I am using and a picture of the chart with the spots circled where i think it should show up and does not.

Thanks in advance.

the script:

input FastMA = 20;
input SlowMA = 50;
input Leadlow= -0.95;
input Sinelow = -0.95;
input Stochlow = 20;
input leadhigh = 0.95;
input sinehigh = 0.95;
input stochhigh = 80;

# long conditions

Def uptrend = MovAvgExponential("length" = fastma) is greater than Movexponential("length" = slowma);
def stochlong = StochasticFull("k period" = 3, "d period" = 14)."fullk" <= stochlow;
def sinelong = MESASineWave("price" = open)."sine wave" < sinelow;
def leadlong = MESASineWave("price" = open)."lead wave" < leadlow;
def wavelong = sinelong or lead long;

# short conditions

def downtrend = MovAvgExponential("length" = Fastma) is less than Movexponential("length" = slowma);
def stochshort = StochasticFull("k period" = 3, "d period" = 14)."FullK" >= stochhigh;
def sineshort = MESASineWave("price" = open)."sine wave" > sinehigh;
def leadshort = MESASineWave("price" = open)."lead wave" > leadhigh;
def waveshort = sineshort or leadshort;

# plots

plot ArrowUp = if uptrend and stochlong and wavelong then 1 else double.nan;
plot ArrowDown = if downtrend and stochshort and waveshort then 1 else double.nan;

plot longstop = if arrowup then (close - 3) else Double.NaN;
plot longprofit = if arrowup then (close + 2) else Double.NaN;
plot shortstop = if arrowdown then (close + 3) else Double.NaN;
plot shortprofit = if arrowdown then (close - 2) else Double.NaN;

ArrowUp.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
ArrowDown.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
longstop.SetPaintingStrategy(PaintingStrategy.points);
shortstop.SetPaintingStrategy(PaintingStrategy.points);
shortprofit.SetPaintingStrategy(PaintingStrategy.points);
longprofit.SetPaintingStrategy(PaintingStrategy.points);

Attached Thumbnails
Click image for larger version

Name:	questionspots.jpg
Views:	222
Size:	515.9 KB
ID:	163673  
Reply With Quote




Last Updated on October 27, 2014


© 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