Trading Articles
Article Categories
Article Tools
Can someone help creating scan code in ThinkorSwim?
Updated October 13, 2014
trending_up
9,388 views
thumb_up
1 thanks given
group
4 followers
forum
2 posts
attach_file
0 attachments
Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to
register in order to view the content of the threads and start contributing to our community.
It's free and simple.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Can someone help creating scan code in ThinkorSwim?
(login for full post details)
#1 (permalink )
Chicago IL
Posts: 1 since Feb 2013
Thanks: 0 given,
0
received
Scan stocks on the short side
[type = stock] and [country = us] and[daily ema(60,daily volume) > 300000] and
[daily low > yesterday's daily low] and
[yesterday's daily low > 2 days ago daily low] and
[SMA(10, close) < EMA(30, close)]and
[daily close > daily SMA(10,daily close)]and
[daily close < daily EMA(30,daily close)]and
[weekly sma(10,weekly close) < weekly ema(30,weekly close)]and
[ADX Line(10) > 20.0]and
[close >= 10]
Scan stocks on the Long side
[type = stock] and [country = us] and[daily ema(60,daily volume) > 300000] and
[daily high < yesterday's daily high] and
[yesterday's daily high < 2 days ago daily high] and
[sma(10, close) > ema(30, close)]and
[daily close > daily ema(30,daily close)]and
[daily close < daily sma(10,daily close)]and
[daily close > daily sma(200,daily close)]and
[weekly sma(10,weekly close) > weekly ema(30,weekly close)]and
[ADX Line(10) > 20.0]and
[close >= 5]
Best Threads (Most Thanked) in the last 7 days on futures io
(login for full post details)
#2 (permalink )
Dubai, UAE
Experience: Intermediate
Platform: TOS, TradeStation
Broker: OX, TradeStation
Trading: Stocks & Basic Options
Posts: 171 since May 2012
Thanks: 44 given,
143
received
here's how I would do this... for example your SHORT scan would look like this
Code
def Vol = if ExpAverage (volume, 60 ) > 300000 then 1 else 0;
def daily = if low > low[1] and low[1] > low [2] then 1 else 0 ;
def SMA10vsEMA30 = if Average(close, 10) < ExpAverage(close, 30) then 1 else 0;
def ClosevsSMA10 = if close > Average(close, 10) then 1 else 0;
def ClosevsEMA30 = if close < ExpAverage(close, 30) then 1 else 0;
def wkSMA10vswkEMA30 = if Average(close(period = AggregationPeriod.WEEK), 10) < ExpAverage(close(period = AggregationPeriod.WEEK), 30) then 1 else 0; def ADX = if DMI(10).ADX > 20 then 1 else 0;
def Price = if close >= 10 then 1 else 0;
Plot Short = Vol * (Daily + SMA10vsEMA30 + ClosevsSMA10 + ClosevsEMA30 + WkSMA10vswkEMA30 + ADX + Price);
I didn't test this as a scan, only as a normal study .. and AFAIK, TOS scans don't allow calling a secondary aggregation, so although the bold line would work in a plot study, it may/should not work in a scan.. so it may need to be separated in a different scan "column"
the successful short candidates will show max score in the scan (in this case a 7), the non-candidates will have lower values, including a 0 if they fail the volume condition .. but that last "plot" line can be changed to show only these ones with a full score and ignore all others, with an IF statement (if the sum is 7 show a "SHORT!" otherwise a blank.
the Long scan would be similar after changing the logical operators ">" and "<"
an interesting exercise thanks for sharing, and hope this helps,
RedK
The following user says Thank You to RedK for this post:
(login for full post details)
#3 (permalink )
Carteret NJ
Posts: 7 since Oct 2014
Thanks: 3 given,
0
received
I know how to insert the scans into TOS platform,
I,m just not savvy enough to know how to create the thinkscripts.
The filter scan i'm looking for are.
#1 50 sma must be angling or moving up
--
#2 slow stochastic with sma % D period 3 crosses oversold 15
#3 momentum lenght 9,price close, turning up and crossing -5
#4 MACD with sma,fast lenght 5,slow lenght 15,macd lenght 20 and crossing above -2.00
Thanks in advance
Dedicated To Your Success!
Last Updated on October 13, 2014
Right now
Ongoing
Coming soon
March
Register to Attend
Elite only
Register to Attend
Elite only
Right now
April