NexusFi: Find Your Edge


Home Menu

 





Help with ThinkorSwim Script


Discussion in ThinkOrSwim

Updated
    1. trending_up 1,889 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
ttharrell
Chicago
 
Posts: 1 since Nov 2018
Thanks Given: 0
Thanks Received: 0

Hi all - I've been searching around for a thread on how to code in ThinkorSwim and I've not having much luck ... If anyone would be willing to help type out a script, it would be much appreciated!

Here's what I'm looking for:
  • 30 day low is lower than the 50 day moving average
  • 30 day low is lower than the 200 day moving average
  • 30 day high is greater than 50 day moving average
  • 30 day high is greater than 200 day moving average

So basically I want the scanner to show me any stocks that have had a 30day low AND high that are LOWER than the 50 and 200 day SMA and HIGHER than the 50 and 200 day SMA, respectively, over the past 30 days only.

I'm unable to post picture, but if you go to this website (delete spaces inbetween): https :// imgur .com/ a/QFwR5z7 , then you can see the type of picture I'm trying to create. The white line is the 50 day SMA and the blue line is the 200 day SMA, so you can see that the 2 circled areas are above and below, respectively, each of these lines.

Thanks in advance guys!
TTH


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Strike Pause Holds, Oil Erases Monday Spike -- May CPI W …
Traders Hideout
CME Group Fee Schedule Changes Hit All Four Exchanges -- …
Traders Hideout
Iran Ceasefire Surges to 19.5% on US 15-Point Plan -- 82 …
Prediction Markets & Event Contracts
Fabrication or Framework? Irans Denied MOU Explains the …
Prediction Markets & Event Contracts
TradingView Deploys AI to Monitor SEC Filings in Real Ti …
TradingView
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
205 thanks
Sober Journey With S&P
21 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
Thanks Mike. Godspeed.
7 thanks
  #2 (permalink)
 
Massive l's Avatar
 Massive l 
OR/USA
Legendary /NQ Trader
 
Experience: None
Posts: 2,129 since Mar 2011
Thanks Given: 1,859
Thanks Received: 5,108

Seems simple enough...hope someone helps you out


Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
gwilson67
Chicago + USA
 
Posts: 2 since Jan 2019
Thanks Given: 0
Thanks Received: 0



ttharrell View Post
Hi all - I've been searching around for a thread on how to code in ThinkorSwim and I've not having much luck ... If anyone would be willing to help type out a script, it would be much appreciated!

Here's what I'm looking for:
  • 30 day low is lower than the 50 day moving average
  • 30 day low is lower than the 200 day moving average
  • 30 day high is greater than 50 day moving average
  • 30 day high is greater than 200 day moving average

So basically I want the scanner to show me any stocks that have had a 30day low AND high that are LOWER than the 50 and 200 day SMA and HIGHER than the 50 and 200 day SMA, respectively, over the past 30 days only.

I'm unable to post picture, but if you go to this website (delete spaces inbetween): https :// imgur .com/ a/QFwR5z7 , then you can see the type of picture I'm trying to create. The white line is the 50 day SMA and the blue line is the 200 day SMA, so you can see that the 2 circled areas are above and below, respectively, each of these lines.

Thanks in advance guys!
TTH


#Scan 30d Low< 50MA and <200Ma and 30dHigh < 50MA and <200Ma
Lowest("data" = low, "length" = 30) is less than SimpleMovingAvg("length" = 50)."SMA" and Lowest("data" = LOW, "length" = 30) is less than SimpleMovingAvg("length" = 200)."SMA" and Highest("data" = HIGH, "length" = 30) is greater than SimpleMovingAvg("length" = 50)."SMA" and Highest("data" = HIGH, "length" = 30) is greater than SimpleMovingAvg("length" = 200)."SMA"


Reply With Quote




Last Updated on January 3, 2019


© 2026 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 - Downloads - Top
no new posts