NexusFi: Find Your Edge


Home Menu

 





scan for stocks whose price is X% within MA


Discussion in ThinkOrSwim

Updated
      Top Posters
    1. looks_one DaveDoggyDogg with 5 posts (6 thanks)
    2. looks_two SamTrader1985 with 2 posts (0 thanks)
    3. looks_3 neilpat95 with 2 posts (0 thanks)
    4. looks_4 fadeyourbets with 1 posts (0 thanks)
    1. trending_up 26,841 views
    2. thumb_up 10 thanks given
    3. group 12 followers
    1. forum 18 posts
    2. attach_file 1 attachments




 
Search this Thread

scan for stocks whose price is X% within MA

  #11 (permalink)
SamTrader1985
Portland
 
Posts: 2 since Feb 2020
Thanks Given: 0
Thanks Received: 0

Great thread and almost the same I was searching. If anyone can help ( I would greatly appreciate), I'm looking for the the scan where ( 8,21,34,55,89) exponential moving avg are stacking up on each other, like they are in very tight range. Take current example of ticker "LK" on 78 minute chart, all my moving avgs are in very tight range. I attached picture, all yellow lines are exponential moving avg on 78 min chart. I tried many things but sadly It didn't work. If any one can please guide me, that would be really helpful.

Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	287
Size:	24.5 KB
ID:	288962  
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
MC PL editor upgrade
MultiCharts
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
What broker to use for trading palladium futures
Commodities
How to apply profiles
Traders Hideout
 
  #12 (permalink)
DaveDoggyDogg
Los Angeles,CA USA
 
Posts: 16 since Mar 2017
Thanks Given: 0
Thanks Received: 7


SamTrader1985 View Post
Great thread and almost the same I was searching. If anyone can help ( I would greatly appreciate), I'm looking for the the scan where ( 8,21,34,55,89) exponential moving avg are stacking up on each other, like they are in very tight range. Take current example of ticker "LK" on 78 minute chart, all my moving avgs are in very tight range. I attached picture, all yellow lines are exponential moving avg on 78 min chart. I tried many things but sadly It didn't work. If any one can please guide me, that would be really helpful.

here you go same... the code for the MA's you requested are "stacked" in the following code.... for "very tight range" you will probably have to look at the results 1 by 1 to your liking unless you can define "very tight range" in terms of parameters.

 
Code
MovAvgExponential("length" = 8)."AvgExp" is greater than or equal to MovAvgExponential("length" = 21)."AvgExp"
and
MovAvgExponential("length" = 21)."AvgExp" is greater than or equal to MovAvgExponential("length" = 34)."AvgExp"
and
MovAvgExponential("length" = 34)."AvgExp" is greater than or equal to MovAvgExponential("length" = 55)."AvgExp"
and
MovAvgExponential("length" = 55)."AvgExp" is greater than or equal to MovAvgExponential("length" = 89)."AvgExp"

Reply With Quote
  #13 (permalink)
SamTrader1985
Portland
 
Posts: 2 since Feb 2020
Thanks Given: 0
Thanks Received: 0


Thank you very much ...really appreciate.

Reply With Quote
  #14 (permalink)
neilpat95
Illinois
 
Posts: 2 since Jul 2020
Thanks Given: 1
Thanks Received: 0

New to the site and the thread but looks to be a solid community of traders.

I’m looking for some help.

I need a custom scanner for TOS that shows me stocks trading above the 9 day MA for 5 consecutive days. Does not matter by how much, but wouldnt hurt to be able to adjust that.

If anyone can point me in the right direction that would be great.

Reply With Quote
  #15 (permalink)
DaveDoggyDogg
Los Angeles,CA USA
 
Posts: 16 since Mar 2017
Thanks Given: 0
Thanks Received: 7


neilpat95 View Post
New to the site and the thread but looks to be a solid community of traders.

I’m looking for some help.

I need a custom scanner for TOS that shows me stocks trading above the 9 day MA for 5 consecutive days. Does not matter by how much, but wouldnt hurt to be able to adjust that.

If anyone can point me in the right direction that would be great.


 
Code
##price low from last 5 bars has traded above the 9 EMA moving average

low from 5 bars ago is greater than or equal to MovAvgExponential()."AvgExp" from 5 bars ago and low from 4 bars ago is greater than or equal to MovAvgExponential()."AvgExp" from 4 bars ago and low from 3 bars ago is greater than or equal to MovAvgExponential()."AvgExp" from 3 bars ago and low from 2 bars ago is greater than or equal to MovAvgExponential()."AvgExp" from 2 bars ago and low from 1 bars ago is greater than or equal to MovAvgExponential()."AvgExp" from 1 bars ago

Reply With Quote
Thanked by:
  #16 (permalink)
neilpat95
Illinois
 
Posts: 2 since Jul 2020
Thanks Given: 1
Thanks Received: 0


DaveDoggyDogg View Post
 
Code
##price low from last 5 bars has traded above the 9 EMA moving average

low from 5 bars ago is greater than or equal to MovAvgExponential()."AvgExp" from 5 bars ago and low from 4 bars ago is greater than or equal to MovAvgExponential()."AvgExp" from 4 bars ago and low from 3 bars ago is greater than or equal to MovAvgExponential()."AvgExp" from 3 bars ago and low from 2 bars ago is greater than or equal to MovAvgExponential()."AvgExp" from 2 bars ago and low from 1 bars ago is greater than or equal to MovAvgExponential()."AvgExp" from 1 bars ago

Thanks for the help,


Can you help me out with scanner with the criteria below?

THE VOLUME AVERAGE OVER THE PAST 20 DAYS IS GREATER THAN THE VOLUME AVERAGE OVER THE PAST 150 DAYS

I WOULD WANT THE 150 DAYS TO EXCLUDE THE PAST 20 DAYS

THANK YOU

Reply With Quote
  #17 (permalink)
kapitalk12
Chicago,IL
 
Posts: 1 since Mar 2021
Thanks Given: 0
Thanks Received: 0

Hi,

can someone help me with a scanner for thinkorswim. I'm looking to find stocks that coming down and are approaching the 20MA from an uptrend. I'm looking to find stocks where it's within 3% of the 20MA

can someone please help me??

Reply With Quote
  #18 (permalink)
sflink
Oklahoma City, OK
 
Posts: 1 since Nov 2022
Thanks Given: 0
Thanks Received: 0

DaveDoggyDogg - Thank you so much for the tip on finding the Moving Average Scan x% above/below a stock's SMA. QUESTION PLEASE: How can I Chart this as well? For example, I'd like to see on the chart when stock ABC's last price/close/open was say 15% below its 150 day SMA. Can this be done? Thank you again!


DaveDoggyDogg View Post
Symbols that the PRICE is 10% AWAY FROM the 30SMA

 
Code
def ma = SimpleMovingAvg(close,30);
def percent = ma*0.10;
plot scan = absvalue(close - ma) is greater than or equal to percent;
or short version (both are the same just coded differently)

 
Code
def ma = SimpleMovingAvg(close,30);
def percent = ma*0.10;
plot scan = absvalue(close - ma) >= percent;
-------------------------------------------------------------------------------
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 )


Reply With Quote
  #19 (permalink)
ColoradoCliff
Parker CO/USA
 
Posts: 22 since Jun 2017
Thanks Given: 0
Thanks Received: 5

This is some simple code that you can use as a custom study on the Stock Scanner tab of ToS....

def FiftySMA = Reference SimpleMovingAvg(length=50);
def priceOffset = Close() - FiftySMA;
def offSetPercentage = AbsValue(priceOffset/FiftySMA);

plot inRange = offsetPercentage <= 0.05;

Run the scan after hours and it should give you the stocks whose daily close is within 5% of the 50 Day SMA.



fadeyourbets View Post
hello,

I would like to create a scan that lists all stocks whose price is 5% within their 50DAY SMA.

is there a way to create that sort of screen in TOS?

any help appreciated.


Reply With Quote




Last Updated on November 20, 2022


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts