Re: Fun with ThinkScript December 12, 2016 11:07AM |
Registered: 8 years ago Posts: 45 |
Re: Fun with ThinkScript December 12, 2016 12:44PM |
Registered: 8 years ago Posts: 54 |
Re: Fun with ThinkScript December 12, 2016 01:01PM |
Registered: 8 years ago Posts: 59 |
Re: Fun with ThinkScript December 13, 2016 12:08PM |
Registered: 7 years ago Posts: 4 |
Re: Fun with ThinkScript December 13, 2016 09:00PM |
Registered: 8 years ago Posts: 54 |
Re: Fun with ThinkScript December 13, 2016 09:08PM |
Registered: 8 years ago Posts: 54 |
How to find stocks which I have fallen a certain %? December 13, 2016 11:44PM |
Registered: 9 years ago Posts: 34 |
Re: Fun with ThinkScript December 14, 2016 12:42AM |
Registered: 8 years ago Posts: 59 |
Re: Fun with ThinkScript December 17, 2016 08:38AM |
Registered: 10 years ago Posts: 615 |
Quote
devildriver6
Robert - not sure if you're around, or know, but I'm working on something and need to get two things....
Or anyone else....
First, I need a way to call last years H. Obviously there's no aggregation for YEAR, which is dumb, but I need it.
Also, I need to call yesterday's RTH H.
Any help would be appreciated!
# +--------------------------------------------------+ # | Example: Find Last Year's High | # | Robert Payne | # | rrpayne.blogspot.com | # +--------------------------------------------------+ def lastYear = GetYear() == GetLastYear() - 1 ; def dailyHigh = if lastYear then high else Double.NaN; def lastYearHigh = HighestAll(dailyHigh); AddLabel(yes, lastYearHigh, Color.YELLOW);
Quote
Ralph53
def Condition1 = Close <= Open;
def Condition2 = Close < Open;
Plot X = if Condition1 then [ the distance in cents between the close of Condition1 continuing until Condition2 is reached ]
What I'm trying to do is have the script keep counting the distance from the point of Condition1 (through several green candles) until the start of Condition2. Then stop until the next 'ConditionConfirmed' point is reached where the cycle starts all over again.
Is this doable? Thanks, JM.
# +--------------------------------------------------+ # | Example: Plot the rise between Cond1 & Cond2 | # | Robert Payne | # | rrpayne.blogspot.com | # +--------------------------------------------------+ declare lower; def Cond1 = close >= open; def Cond2 = close < open; def Cond1Start = Cond1 and Cond2[1]; def StartValue = if Cond2 then Double.NaN else if Cond1Start then close else StartValue[1]; plot Continuation = close - StartValue;
Re: Fun with ThinkScript December 20, 2016 01:29AM |
Registered: 7 years ago Posts: 6 |
Re: Fun with ThinkScript December 20, 2016 01:34AM |
Registered: 7 years ago Posts: 6 |
Re: Fun with ThinkScript December 20, 2016 03:04PM |
Registered: 7 years ago Posts: 5 |
Re: Fun with ThinkScript December 20, 2016 03:11PM |
Registered: 8 years ago Posts: 54 |
Re: Fun with ThinkScript December 20, 2016 04:30PM |
Registered: 7 years ago Posts: 5 |
Re: Fun with ThinkScript December 21, 2016 03:59PM |
Registered: 7 years ago Posts: 6 |
Re: Fun with ThinkScript December 21, 2016 04:31PM |
Registered: 10 years ago Posts: 615 |
Quote
mikew
I just can't figure out how to the "within" part. I would appreciate any help
def SlowMA = MovingAverage(averageType, price, slowLength); def withinRange = ask >= SlowMA - 0.05 AND ask <= SlowMA + 0.05;
Re: Fun with ThinkScript December 21, 2016 04:38PM |
Registered: 7 years ago Posts: 6 |
Color Coding Candle Based upon Moving Averages December 27, 2016 01:12PM |
Registered: 11 years ago Posts: 12 |
Re: Color Coding Candle Based upon Moving Averages December 27, 2016 03:46PM |
Registered: 10 years ago Posts: 615 |
Quote
bubba
I am trying to color my candle based upon the close of three different moving averges similar to the E method, so the the example the 5, 10 and 25 simple moving averages. Cannot get the think script code right.
SMA1 = 5 SMA
SMA2 = 10 SMA
SMA3 = 25 SMA
The Candle is colored green when the SMA1 > SMA2 & SMA1 > SMA3
The Candle is colored Yellow when the SMA1 < SMA 2 and SMA1 > SMA3 OR SMA1 > SMA2 AND SMA1<SMA3
The Candle is colored Red when SMA1 < SMA2 and SMA1 < SMA 3
Thank you for all of your help!
# +------------------------------------------------------------+ # | Example: Color-Code Candles Based on Moving Averages | # | Robert Payne | # | rrpayne.blogspot.com | # +------------------------------------------------------------+ plot sma5 = Average(close, 5); plot sma10 = Average(close, 10); plot sma20 = Average(close, 20); AssignPriceColor(if sma5 > sma10 and sma10 > sma20 then Color.GREEN else if sma5 < sma10 and sma10 < sma20 then Color.RED else Color.YELLOW);
Snake Force Indicator December 28, 2016 06:21AM |
Registered: 9 years ago Posts: 60 |
Re: Snake Force Indicator December 28, 2016 06:29AM |
Registered: 9 years ago Posts: 60 |
Re: Fun with ThinkScript December 29, 2016 12:21PM |
Registered: 7 years ago Posts: 1 |
TTM WAVE B,C December 31, 2016 09:58AM |
Registered: 7 years ago Posts: 6 |
Re: TTM WAVE B,C January 04, 2017 08:28PM |
Registered: 10 years ago Posts: 615 |
Re: TTM WAVE B,C January 04, 2017 09:57PM |
Registered: 8 years ago Posts: 2 |
Re: TTM WAVE B,C January 05, 2017 04:17AM |
Registered: 7 years ago Posts: 63 |
Re: TTM WAVE B,C January 05, 2017 06:08AM |
Registered: 10 years ago Posts: 615 |
Re: TTM WAVE B,C January 05, 2017 01:51PM |
Registered: 7 years ago Posts: 63 |
Re: Fun with ThinkScript January 06, 2017 12:38AM |
Registered: 8 years ago Posts: 59 |
Re: Fun with ThinkScript January 07, 2017 02:13AM |
Registered: 9 years ago Posts: 60 |