Price within 10% of 200sma? ThinkScript - ThinkOrSwim | futures io social day trading
futures io futures trading


Price within 10% of 200sma? ThinkScript
Updated: Views / Replies:511 / 14
Created: by Avestro Attachments:0

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 100,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
 

Price within 10% of 200sma? ThinkScript

  #11 (permalink)
Market Wizard
Portland, OR
 
Trading Experience: None
 
Massive l's Avatar
 
Posts: 1,783 since Mar 2011
Thanks: 1,273 given, 3,002 received


Avestro View Post
Appreciate it, working on making the criteria now. That's hard. I'm getting an "at least one plot should be defined" error

change the def = to plot =

Reply With Quote
 
  #12 (permalink)
Sherman Oaks California
 
 
Posts: 7 since Mar 2019
Thanks: 0 given, 0 received


Massive l View Post
change the def = to plot =

Still having issues

1. Scan that looks for 200SMA not moving average but Simple Moving Average to be within x% of Ichimoku(). "Span A"

2. Scan that looks for wicks rejecting 200SMA

Reply With Quote
 
  #13 (permalink)
Super Moderator
London UK
 
Trading Experience: Beginner
Platform: CQG
Broker/Data: S5
Favorite Futures: Futures
 
xplorer's Avatar
 
Posts: 4,823 since Sep 2015
Thanks: 11,885 given, 10,529 received


@Avestro

You have created three or more threads for the same issue. I am going to close all the others as duplicate.


Please do not create others or they will be considered junk posting which is against the site's terms.

Reply With Quote
 
  #14 (permalink)
Los Angeles,CA USA
 
 
Posts: 10 since Mar 2017
Thanks: 0 given, 1 received


Avestro View Post
Price within X percent of 200sma?

So I am working on a project where I need to add a custom study in my scan that will scan for stocks that have closes within (whatever %) of the 200sma.

I've tried to write it out visually here for those who want to see it

Close is within 10% of SimpleMovingAvg("length") = 200)."SMA"

here you go, here is the complete code
to change the percent just change 0.10 to whatever percent you want. 0.10 defines 10%

 
Code
#Code Below price is within 10 Percent of 200SMA
#
def ma = SimpleMovingAvg(close,200);
def percent = ma*0.10;
plot scan = absvalue(close - ma) <= percent;

Reply With Quote
 
  #15 (permalink)
Minneapolis Minnesota
 
 
Posts: 18 since Jul 2019
Thanks: 0 given, 7 received


Avestro View Post
Price within X percent of 200sma?

So I am working on a project where I need to add a custom study in my scan that will scan for stocks that have closes within (whatever %) of the 200sma.

I've tried to write it out visually here for those who want to see it

Close is within 10% of SimpleMovingAvg("length") = 200)."SMA"


Reference this in the scanner. It will return if price is inside the desired percentage above or below the selected moving average


 
Code
declare lower;

input percentWithin = 10;
input price = close;
input length = 200;
input avgType = AverageType.SIMPLE;

def ma = MovingAverage(avgType, price, length);

plot WithinPercent = Between(price, 
                             ma * (1 - (percentWithin / 100)),
                             ma * (1 + (percentWithin / 100)));

Reply With Quote

Reply



futures io > > > > Price within 10% of 200sma? ThinkScript

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

futures io is celebrating 10-years w/ over $18,000 in prizes!

Right now
 

$1,000 in Amazon Gift Cards being given away right now from GFF Brokers

Right now
 

$250 Amazon Gift Cards with our "Thanks Contest" challenge!

Right now
 

Show us your trading desks and win over $5,000 in prizes w/Jigsaw Trading

August
 

Webinar: AutoTrading World Cup Advisor w/GFF Brokers

Aug 22
 

Webinar: Suri Duddella (TBA)

Elite only
 

Webinar: Richard Bailey (TBA)

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
ACSIL: a function that returns the price with the highest volume within a bar yonatan Sierra Chart Programming 15 August 4th, 2019 10:33 AM
Convert ThinkScript to ThinkScript API t0757tlr ThinkOrSwim Programming 0 May 20th, 2018 11:09 AM
Price within X percent of high within Y days eddieo ThinkOrSwim 2 March 30th, 2017 09:50 PM
200sma Zobyi Traders Hideout 1 August 11th, 2014 11:00 PM
Prevent strategy from executing trade at the same price level within a session suprsnipes NinjaTrader Programming 1 February 28th, 2010 10:40 PM


All times are GMT -4. The time now is 05:06 AM. (this page content is cached, log in for real-time version)

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