How to Build a Custom Scan - ThinkOrSwim Programming | futures io social day trading
futures io futures trading


How to Build a Custom Scan
Updated: Views / Replies:14,735 / 6
Created: by mbgaskins Attachments:3

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
 

How to Build a Custom Scan

  #1 (permalink)
Trading Apprentice
Tulsa, OK
 
Futures Experience: Intermediate
Platform: TradeStation
Favorite Futures: Stocks
 
Posts: 2 since Nov 2012
Thanks: 1 given, 1 received

How to Build a Custom Scan

I have been trying to build a custom scan using PPO & ADX.

I can get a label with the PPO and ADX and color the label based upon the PPO and ADX action but cannot get a scan to work.

I want to scan for stocks that have PPO down from 5 days ago and ADX up from 5 days ago.

Following is the code I have. Can someone suggest how to get this to run as a scan?

Thanks!
Brad

#PPO ADX Label

Input PPOShortEMA = 9;
Input PPOLongEMA = 26;
Input ADXLength = 14;

Def PPO = (MovAvgExponential(Close,PPOShortEMA) - MovAvgExponential(Close,PPOLongEMA))/MovAvgExponential(Close,PPOLongEMA);
Def PreviousPPO = (MovAvgExponential(Close,PPOShortEMA)[5] - MovAvgExponential(Close,PPOLongEMA)[5])/MovAvgExponential(Close,PPOLongEMA)[5];
Def CurrentADX = ADX(ADXLength);
Def PreviousADX = ADX(ADXLength)[5];

addlabel(yes,concat("PPO ", ROUND(PPO*100,2)), if PPO < PreviousPPO then color.RED else if PPO > PreviousPPO then color.green else color.gray);
addlabel(yes,concat("ADX ", ROUND(ADX(ADXLength),2)), if CurrentADX > PreviousADX then color.RED else if CurrentADX < PreviousADX then color.green else color.gray);

Reply With Quote
The following user says Thank You to mbgaskins for this post:
 
  #2 (permalink)
Elite Member
desert CA
 
Futures Experience: Intermediate
Platform: NT7, TOS
Broker/Data: AMP/wCQG, TDA
Favorite Futures: CL,YM
 
Posts: 2,023 since Jul 2011
Thanks: 2,211 given, 1,545 received

Hi, unless I'm mistaken, TOS Scan->Stock Hacker seems to have only custom study filters in the form of expressions.

So I made one custom filter for PPO down from 5 days ago & ADX up from 5 days ago, and then another one for the reverse conditions.

Then clicking on scan came up with a result list. Which the results can be saved as a watchlist and then seen in "Marketwatch" -> Quotes


Scripts for custom study filters. (reverse "<" and ">" operators for reverse condition custom study filter)
-------------------------------------------

((MovAvgExponential(Close,9) - (MovAvgExponential(Close,26)/MovAvgExponential(Close,26)))
< (MovAvgExponential(Close,9)[5]- (MovAvgExponential(Close,26)[5])/MovAvgExponential(Close,26)[5]))

and

ADX(14) > ADX(14)[5]



script for column headers:
------------------------------------

# PPO down from 5 days ago

Input PPOShortEMA = 9;
Input PPOLongEMA = 26;
Input ADXLength = 14;

Def PPO = (MovAvgExponential(Close,PPOShortEMA) - MovAvgExponential(Close,PPOLongEMA))/MovAvgExponential(Close,PPOLongEMA);
Def PreviousPPO = (MovAvgExponential(Close,PPOShortEMA)[5] - MovAvgExponential(Close,PPOLongEMA)[5])/MovAvgExponential(Close,PPOLongEMA)[5];
Def CurrentADX = ADX(ADXLength);
Def PreviousADX = ADX(ADXLength)[5];

plot result = PPO;
result.assignValueColor(Color.gray);

assignBackgroundColor(if PPO < PreviousPPO then color.RED else if PPO > PreviousPPO then color.green else color.gray);


-------------------------------------

#ADX up from 5 days ago

Input PPOShortEMA = 9;
Input PPOLongEMA = 26;
Input ADXLength = 14;

Def PPO = (MovAvgExponential(Close,PPOShortEMA) - MovAvgExponential(Close,PPOLongEMA))/MovAvgExponential(Close,PPOLongEMA);
Def PreviousPPO = (MovAvgExponential(Close,PPOShortEMA)[5] - MovAvgExponential(Close,PPOLongEMA)[5])/MovAvgExponential(Close,PPOLongEMA)[5];
Def CurrentADX = ADX(ADXLength);
Def PreviousADX = ADX(ADXLength)[5];

plot result = PPO;
result.assignValueColor(Color.gray);

assignBackgroundColor( if CurrentADX > PreviousADX then color.RED else if CurrentADX < PreviousADX then color.green else color.gray);


Attached Thumbnails
How to Build a Custom Scan-ppo_dn5_adx_up5.jpg   How to Build a Custom Scan-marketwatch.jpg   How to Build a Custom Scan-ppo_up5_adx_dn5.jpg  

Last edited by Cloudy; April 12th, 2013 at 12:26 PM.
Reply With Quote
The following 3 users say Thank You to Cloudy for this post:
 
  #3 (permalink)
Trading Apprentice
Tulsa, OK
 
Futures Experience: Intermediate
Platform: TradeStation
Favorite Futures: Stocks
 
Posts: 2 since Nov 2012
Thanks: 1 given, 1 received


Thanks. This gives me what I asked for but not what I wanted. Back to the drawing board to refine my parameters.

This will allow me to get the scan I want as soon as I get the parameters correct.

Reply With Quote
 
  #4 (permalink)
Trading Apprentice
Buenos Aires, Argentina
 
Futures Experience: Intermediate
Platform: NinjaTrader, TOS
Favorite Futures: ES
 
Posts: 47 since Jun 2013
Thanks: 39 given, 4 received

I am always getting an "RESULT_ERROR Script execution timeout" when I try to scan many of my custom filters.

Some work, but many (like the following) will fail. Do you think its a temporary error by TOS or I am doing something wrong?

 
Code
close("period" = AggregationPeriod.DAY) is greater than DarvasBox()."Upper Band" from 1 bars ago
Any tip will be much appreciated! Thanks

Reply With Quote
 
  #5 (permalink)
Elite Member
Newbury Park , California/United States
 
Futures Experience: Intermediate
Platform: ToS, Tradestation
Favorite Futures: Futures
 
Posts: 4 since Oct 2013
Thanks: 5 given, 3 received

PPO & ADX

Hi,

I was wondering if you were able to come up for a scan or have seen an indicator for the PPO & ADX scan you were working on. Were you looking for candidates for the PPO/ADX "squeeze'? ( I'm not sure what else to call it)
I am working on a couple things for that trade. Let me know you if that is a trade you do. I have seen a good webinar by Wendy Kirkland discussing how she trades that in her portfolio. Thanks!

Josh

Reply With Quote
 
  #6 (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

In reference to this post,
does anyone have the think-script to place in TOS to scan for these PPO pinch as a scan setup
or any PPO scan.

Reply With Quote
 
  #7 (permalink)
Trading Apprentice
Phoenix, AZ
 
Futures Experience: Intermediate
Platform: Nijatrader
Broker/Data: Interactive Brokers
Favorite Futures: Stocks, Options
 
Posts: 8 since Oct 2014
Thanks: 6 given, 0 received

The P3 Squeeze in Ninjatrader

I have been working on Kirkland's squeeze in Ninjatrader as a system and not just a scanner. I have tried a number of ways with comparing a bunch of adx(n)s and ppo(n)s and setting a flag for each and when both hit within some spread buying. Sometimes the "squeeze" doesn't come at the same precise time. I have also tried the Ninjatrader Slope function for adx() and ppo() and setting buy signals based on that. It does work, but usually on all squeezes and not just the major ones. I am looking to do a ratio so I can get the really close squeezes. Maybe by normalizing the adx/ppo ratio. Any ideas?

http://gfullmer.atwebpages.com/screen.html


Last edited by gfullmer; October 6th, 2016 at 11:28 PM. Reason: Invalid image
Reply With Quote

Reply



futures io > > > > > How to Build a Custom Scan

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Introducing daytradr by Jigsaw, new stand-alone platform

Oct 19
 

RandBots: AutoTrading Bots to diversify your trading

Oct 24
 

TopstepTrader: Profiting Without Risking Your Own Money

Oct 26

Building Open Source Indicators for NT8 w/Fat Tails @ Lizard Indicators

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can someone help creating scan code in ThinkorSwim? dlisenko ThinkOrSwim Programming 2 October 13th, 2014 08:23 PM
Programming TTM_squeeze into a scan wireyear ThinkOrSwim Programming 6 September 2nd, 2013 10:56 PM
Average Volume Scan / Scan Results TonyB ThinkOrSwim 5 March 23rd, 2013 02:20 PM
Interval Property in a scan moonshadow ThinkOrSwim 0 July 10th, 2012 07:29 PM
looking to modify vroc and use in a scan. adross1 ThinkOrSwim Programming 2 February 25th, 2012 04:17 PM


All times are GMT -4. The time now is 06:02 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-10-19 in 0.12 seconds with 20 queries on phoenix via your IP 54.158.238.108