Can someone help creating scan code in ThinkorSwim? - ThinkOrSwim Programming | futures io social day trading
futures io futures trading


Can someone help creating scan code in ThinkorSwim?
Updated: Views / Replies:5,020 / 2
Created: by dlisenko Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 
Thread Tools Search this Thread
 

Can someone help creating scan code in ThinkorSwim?

  #1 (permalink)
Trading Apprentice
Chicago IL
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: Stocks
 
Posts: 1 since Feb 2013
Thanks: 0 given, 0 received

Can someone help creating scan code in ThinkorSwim?

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]

Reply With Quote
 
  #2 (permalink)
Knowledge Seeker
Dubai, UAE
 
Futures Experience: Intermediate
Platform: TOS, TradeStation
Broker/Data: OX, TradeStation
Favorite Futures: Stocks & Basic Options
 
RedK's Avatar
 
Posts: 171 since May 2012
Thanks: 44 given, 138 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

Reply With Quote
 
  #3 (permalink)
Trading Apprentice
Carteret NJ
 
Futures Experience: Intermediate
Platform: TOS & OX
Favorite Futures: Stocks and Options
 
Posts: 7 since Oct 2014
Thanks: 3 given, 0 received

Need some help creating Scan code for TOS


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!

Reply With Quote

Reply



futures io > > > > > Can someone help creating scan code in ThinkorSwim?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming TTM_squeeze into a scan wireyear ThinkOrSwim Programming 6 September 2nd, 2013 11:56 PM
Average Volume Scan / Scan Results TonyB ThinkOrSwim 5 March 23rd, 2013 03:20 PM
Interval Property in a scan moonshadow ThinkOrSwim 0 July 10th, 2012 08:29 PM
How to install Range Bar code in Thinkorswim rcs9234 ThinkOrSwim 5 July 7th, 2011 03:12 PM
Creating a function to condense code brightredmegaphone NinjaTrader Programming 10 December 17th, 2010 12:27 AM


All times are GMT -4. The time now is 01:36 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-17 in 0.11 seconds with 19 queries on phoenix via your IP 54.226.113.250