TOS Script (Code attached): Close inbetween 30 and 50 ma with 30ma<50ma<100ma - futures io
futures io futures trading



TOS Script (Code attached): Close inbetween 30 and 50 ma with 30ma<50ma<100ma


Discussion in ThinkOrSwim

Updated by kjhosken
    1. trending_up 331 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 1 replies
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

TOS Script (Code attached): Close inbetween 30 and 50 ma with 30ma<50ma<100ma

(login for full post details)
  #1 (permalink)
San Antonio
 
 
Posts: 1 since Oct 2020
Thanks: 0 given, 0 received

Hello! I've been trying to make a TOS script which scans for stocks that close in between the 30 and 50ma without the price crossing the 50 ma. The price can also touch the 30ma. The moving averages cannot cross and the 30ma must be less than the 50ma which must be less than the 100ma. Here is my script so far. I thought it was right but every time I run it I get literally all the stocks in the market.

def ma30 = SimpleMovingAvg(close,30);
def ma50 = SimpleMovingAvg(close,50);
def ma100 = SimpleMovingAvg(close,100);
def trend = ma30 < ma50 < ma100;
def target = ma30 <= close < ma50;
plot scan = target;

I will also be doing one in reverse where the 30ma is greater than the 50ma which is greater than the 100ma.

Reply With Quote

Can you help answer these questions
from other members on futures io?
Move indicator on Chart
NinjaTrader
Seeking an MT4 Indicator/EA that scans all Currency Pairs to identify setup
Platforms and Indicators
Sending an ACH from BoA to GFF Brokers
Brokers
Traderoomplus
Trading Reviews and Vendors
US OTCQB STOCK Brooker for UK BASED RESIDENT
Brokers
 
 
(login for full post details)
  #2 (permalink)
Seattle, WA/USA
 
Experience: Intermediate
Platform: TOS, TS
Trading: Forex, crude
 
Posts: 83 since Sep 2016
Thanks: 7 given, 28 received

TOS typically doesn't like multiple conditions strung together. So if you separate out your conditions with "AND" it should work.

 
Code
def ma30 = SimpleMovingAvg(close,30);
def ma50 = SimpleMovingAvg(close,50);
def ma100 = SimpleMovingAvg(close,100);
def trend = ma30 < ma50 and ma50 < ma100 and ma30 < ma100;
def target = ma30 <= close and close < ma50;
plot scan = target;

Follow me on Twitter Reply With Quote


futures io Trading Community Platforms and Indicators ThinkOrSwim > TOS Script (Code attached): Close inbetween 30 and 50 ma with 30ma<50ma<100ma


October 20, 2020


Upcoming Webinars and Events
 

Order Flow Tools w/MotiveWave & Zytrade Brokerage

Oct 22
 

Technical Analysis Workshop w/NinjaTrader

Oct 27
 

Bookmap

Oct TBD
 

SharkIndicators

Oct TBD
 

Carley Garner

Oct TBD
 

GruttePier

Oct TBD
     



Copyright © 2020 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