Re: Fun with ThinkScript May 13, 2016 12:16PM |
Registered: 8 years ago Posts: 7 |
Re: Fun with ThinkScript May 18, 2016 05:52PM |
Registered: 9 years ago Posts: 53 |
Re: Fun with ThinkScript May 19, 2016 12:55PM |
Registered: 7 years ago Posts: 2 |
Re: Fun with ThinkScript May 22, 2016 01:37AM |
Registered: 8 years ago Posts: 4 |
Re: Fun with ThinkScript May 22, 2016 06:25AM |
Registered: 9 years ago Posts: 60 |
Re: Fun with ThinkScript May 23, 2016 07:53PM |
Registered: 10 years ago Posts: 615 |
Re: Fun with ThinkScript May 23, 2016 08:11PM |
Registered: 8 years ago Posts: 4 |
Re: Fun with ThinkScript May 23, 2016 08:58PM |
Registered: 8 years ago Posts: 7 |
Re: Fun with ThinkScript May 23, 2016 09:30PM |
Registered: 10 years ago Posts: 615 |
Quote
xilb51x
does that script come with the fib lines? nice to have you back Robert!
Re: Fun with ThinkScript May 24, 2016 12:37PM |
Registered: 7 years ago Posts: 7 |
Re: Fun with ThinkScript May 24, 2016 07:53PM |
Registered: 10 years ago Posts: 615 |
Re: Fun with ThinkScript May 25, 2016 08:01AM |
Registered: 9 years ago Posts: 60 |
Re: Fun with ThinkScript May 25, 2016 12:27PM |
Registered: 7 years ago Posts: 63 |
Re: Fun with ThinkScript May 25, 2016 01:49PM |
Registered: 8 years ago Posts: 45 |
declare lower; input DI_length = 5; input ADX_length = 13; input Strong_Trend = 25; def DX = if (diplus(di_length) + diminus(di_length) > 0) then 100 * AbsValue(diplus(di_length) - diminus(di_length)) / (diplus(di_length) + diminus(di_length)) else 0; plot ADX = WildersAverage(DX, adx_length);ADX.DefineColor("Stronger", Color.green); ADX.DefineColor("Weaker", Color.blue); ADX.AssignValueColor(if ADX > ADX[1] then ADX.Color("Stronger" ) else ADX.Color("Weaker" )); ADX.SetPaintingStrategy(PaintingStrategy.LINE); ADX.SetStyle(Curve.SHORT_DASH); AddCloud(ADX, 0, ADX.Color("stronger" )); def weaker = if ADX < ADX[1] then ADX else Double.NaN; AddCloud(weaker, 0, ADX.Color("weaker" )); plot "DI+" = DIPlus(DI_length); "DI+".SetDefaultColor(Color.RED); "DI+".SetLineWeight(2); plot "DI-" = DIMinus(DI_length); "DI-".SetDefaultColor(Color.GREEN); "DI-".SetLineWeight(2); plot StrongTrend = Strong_Trend; StrongTrend.SetDefaultColor(Color.black); strongTrend.setlineWeight(2); def Strong = if ADX > ADX[1] then ADX else Double.NaN; alert(Strong, getsymbol() + "ADX Stronger", alert.bar, sound.bell);
Re: Fun with ThinkScript May 25, 2016 01:55PM |
Registered: 10 years ago Posts: 615 |
Quote
mntman
excellent work robert... im really enjoying the auto trend lines script this week! works great for tech analysis when combined with your support/resistance lines and the pivot2 labels in your basic market structure. its saving me a lot of time from manually drawing the trend lines now.
Quote
mntman
question: is it possible to create a column script to label the cross up and downs signals for a watchlist? i tried but tos is saying the script was too complicated. do you think its due the "switch" statement in the beginning?
Re: Fun with ThinkScript May 25, 2016 02:03PM |
Registered: 10 years ago Posts: 615 |
Quote
TexasJohn
I am trying to setup an alert that will notify me every time the DI_ADX_TREND-INDICATOR goes from weak to strong. can someone tell me if what I have in the code section is the most efficient way to do this.
def Strong = if ADX > ADX[1] then ADX else Double.NaN; alert(Strong, getsymbol() + "ADX Stronger", alert.bar, sound.bell);
alert(Strong AND weaker[1], getsymbol() + "ADX Stronger", alert.bar, sound.bell);
Re: Fun with ThinkScript May 25, 2016 02:53PM |
Registered: 8 years ago Posts: 45 |
Re: Fun with ThinkScript May 25, 2016 07:06PM |
Registered: 10 years ago Posts: 615 |
Quote
xilb51x
hello, just bought your auto trend lines, is it possible to also view the old trend lines?
Quote
TexasJohn
Have a couple of lattes on me
Re: Fun with ThinkScript May 25, 2016 09:19PM |
Registered: 7 years ago Posts: 63 |
thats what i was afraid of... wishful thinkingQuote
This script is far too complex to be used in the watchlist
Re: Fun with ThinkScript May 26, 2016 06:04AM |
Registered: 9 years ago Posts: 53 |
Re: Fun with ThinkScript May 27, 2016 05:49PM |
Registered: 10 years ago Posts: 464 |
Re: Fun with ThinkScript May 27, 2016 08:03PM |
Registered: 10 years ago Posts: 615 |
Quote
RichieRick
So I'm working on a Watchlist column. I'd like to have the watchlist column show the date that the stock had a split within the last 43 days. I can get the script to show today's date but it won't show the date that the stock split in the last 43 days. The reason I stopped at 43 is because any more than that the the script gives an error of being to complex.
I've been working on this for weeks now and I seem to be at a stand still.
Where have I gone wrong??? I just know it has to be something simple that I'm overlooking.
# +----------------------------------------+ # | Display date of last split | # | Robert Payne | # | rrpayne.blogspot.com | # +----------------------------------------+ # +----------------------------------------+ # | How long ago did the split occur? | # +----------------------------------------+ def lookback = GetEventOffset(Events.SPLIT, -1); # +----------------------------------------+ # | What was the date of the split? | # +----------------------------------------+ def sDay = GetValue(GetDayOfMonth(GetYYYYMMDD()), lookback); def sMonth = GetValue(GetMonth(), lookback); def sYear = GetValue(GetYear(), lookback) - 2000; # +----------------------------------------+ # | Display the date. | # +----------------------------------------+ AddLabel(yes, if IsNaN(GetValue(close, lookback)) then "Data not available" else sMonth + "/" + sDay + "/" + "20" + sYear, Color.YELLOW);
Re: Fun with ThinkScript May 27, 2016 08:08PM |
Registered: 10 years ago Posts: 615 |
Quote
Palmer
So, how do a running total the volume from 1500 to say 2000?
def CumulativeVolume = if {bar@1500} then volume else CumulativeVolume[1] + volume;
Re: Fun with ThinkScript May 27, 2016 09:35PM |
Registered: 7 years ago Posts: 63 |
# continue the previous peak as a dashed line def percent = 0.5; def inRange = close between (peak*(1-percent/100)) and (peak*(1+percent/100)); def oldpeak = if BarNumber() < magnitude then Double.NaN else if peak and inRange then peakvalue[1] else oldpeak[1]; plot oldpeakline = oldpeak; oldpeakline.SetPaintingStrategy(PaintingStrategy.DASHES); oldpeakline.SetDefaultColor(Color.light_green);
Re: Fun with ThinkScript May 30, 2016 11:24AM |
Registered: 10 years ago Posts: 27 |
Re: Fun with ThinkScript May 30, 2016 11:41AM |
Registered: 10 years ago Posts: 615 |
Quote
DynaMike
Welcome back, Robert!
Quote
DynaMike
Welcome back, Robert! I use this code a lot on my charts. But Is there any way to make this code into a "scan" ?
Re: Fun with ThinkScript May 30, 2016 07:12PM |
Registered: 7 years ago Posts: 63 |
Quote
mntman
i would like to modify this where the previous peak only extends for me when todays close comes within 1/2% of that peak level... otherwise it would remain unextended.
def inRange = close between (peak*(1-percent/100)) and (peak*(1+percent/100));
HELP May 30, 2016 08:42PM |
Registered: 7 years ago Posts: 6 |
Re: Fun with ThinkScript May 30, 2016 10:21PM |
Registered: 10 years ago Posts: 464 |
Re: Fun with ThinkScript May 31, 2016 03:52PM |
Registered: 9 years ago Posts: 53 |