Basic scripting question for study filter - ThinkOrSwim Programming | futures io social day trading
futures io futures trading


Basic scripting question for study filter
Updated: Views / Replies:799 / 4
Created: by Hockster 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
 

Basic scripting question for study filter

  #1 (permalink)
Trading Apprentice
Singapore
 
Futures Experience: None
Platform: thinkorswim
Favorite Futures: Options
 
Posts: 3 since Aug 2014
Thanks: 2 given, 0 received

Basic scripting question for study filter

Hi all,

I'm pretty new to the thinkscript and have been trying without avail to program a script to do what I want. I am hoping some of the experts here can help to start me off

I'm trying to do a study filter in the stock hacker which will screen for the stocks that will meet the following criteria:
1. Closing price of previous trading day crossed below 22 SMA (SMA based on closing prices of past 22 trading days)
2. Current price still below 22 SMA

Can anyone help?

Thank you!

Reply With Quote
 
  #2 (permalink)
Trading Apprentice
Singapore
 
Futures Experience: None
Platform: thinkorswim
Favorite Futures: Options
 
Posts: 3 since Aug 2014
Thanks: 2 given, 0 received

I tried to start off like below:

close from 1 bars ago is less than Average("data" = close, "length" = 22) and close is less than Average("data" = close, "length" = 22)

What I'm trying to do is to scan for stock whose price is under the 22 SMA the previous trading day and current price is still under the 22 SMA. I hit "scan" and the scan results doesn't seem to be what I want. Some of the stocks have their current price above the 22 SMA. What am I missing here?

Reply With Quote
 
  #3 (permalink)
Elite Member
Trubchevsk
 
Futures Experience: Beginner
Platform: tos
Favorite Futures: stocks
 
Posts: 48 since May 2011
Thanks: 34 given, 64 received


Hockster, the formula, you created is right one. Sometimes the scanner of ToS returns bad results...no one still know why. Check the timeframe setting on which your scan query is working on.
also you can try this query: (the same as yours)

plot scan = close[1] < average (close,22) && close < average (close,22);

Dont forget to set "D" as timeframe....

Reply With Quote
The following user says Thank You to growex for this post:
 
  #4 (permalink)
Trading Apprentice
Singapore
 
Futures Experience: None
Platform: thinkorswim
Favorite Futures: Options
 
Posts: 3 since Aug 2014
Thanks: 2 given, 0 received


growex View Post
Hockster, the formula, you created is right one. Sometimes the scanner of ToS returns bad results...no one still know why. Check the timeframe setting on which your scan query is working on.
also you can try this query: (the same as yours)

plot scan = close[1] < average (close,22) && close < average (close,22);

Dont forget to set "D" as timeframe....

hi growex,

Thanks for the reply. I got it to work somehow. Do you happen to know how I can get the average implied volatility? I'm trying to scan for stocks that has an avg imp vol within a certain range..

Thanks!

Reply With Quote
 
  #5 (permalink)
Elite Member
Trubchevsk
 
Futures Experience: Beginner
Platform: tos
Favorite Futures: stocks
 
Posts: 48 since May 2011
Thanks: 34 given, 64 received

the same as an average of any variable...

plot s = imp_volatility < average(imp_volatility,10);

works on Day timeframe.

Reply With Quote
The following user says Thank You to growex for this post:

Reply



futures io > > > > > Basic scripting question for study filter

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
basic black scholes question mcteague Options on Futures 2 March 31st, 2014 02:02 PM
"Roofing filter" study slickiam Sierra Chart 1 June 14th, 2013 03:59 PM
news filter code question ceramictilepro NinjaTrader Programming 6 July 21st, 2012 08:52 PM
Classical Momentum indicator variation - EL study question Laurus12 EasyLanguage Programming 3 April 10th, 2011 02:30 PM
basic R question sam028 Matlab, R project and Python 2 March 20th, 2010 07:32 PM


All times are GMT -4. The time now is 05:35 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-12 in 0.09 seconds with 19 queries on phoenix via your IP 54.167.44.32