Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
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 for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Open Scan Tab and click on Add Study Filter button.
On the left hand side there is a dropbox with a Criteria caption, open it and choose Custom field (the one on the bottom of dropdown list)
Scanner Custom Filter window will appear. Open ThinkscriptEditor tab.
Delete ADXCrossover() line.
Paste the following code into thinkscript editor:
def ma = SimpleMovingAvg(close,50);
def s = ma*0.05;
plot scan = absvalue(close - ma) is less than or equal to s;
Choose the aggregation period you want to scan on.
Click OK
Now click Save Scan Query so you can load this scan later
def ma = SimpleMovingAvg(close,50);
def s = ma*0.05;
plot scan = absvalue(close - ma) is less than or equal to s;
I noticed on some Think or Swim study filters, there are drop down boxes.
Is it possible to create our own drop down box for the Simple Moving Average (say 10, 13,20,30,50,200)
and for the Percent (.05, .10, .15, .20 and so on)?
I did copy and paste above code and it works great. Before I make a scan for each one that I want and change the numbers, thought I would ask first?
or short version (both are the same just coded differently)
-------------------------------------------------------------------------------
For the exact moving average scanner scan you want it is already built into TOS "jym shoe"
no custom thinkscript needed do what you want, just do the following in thinkorswim :
**STOCK HACKER > ADD STUDY FILTER>POPULAR STUDIES>MOVINGAVERAGE_SCAN>
select
**The Close is atleast 10% above the 30 period Simple moving average
(you can choose ema ( exponential ) sma ( simple ) weighted wilders and hull )