close of previous bar less than twenty five percent from the high or low - futures io
futures io futures trading



close of previous bar less than twenty five percent from the high or low


Discussion in ThinkOrSwim

Updated by The Gurok
    1. trending_up 1,504 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 2 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
 

close of previous bar less than twenty five percent from the high or low

(login for full post details)
  #1 (permalink)
Poplar Bluff
 
 
Posts: 7 since Aug 2014
Thanks: 0 given, 1 received

Hello Everyone,

I am trying to make a simple indicator in thinkorswim that will tell me if the close of previous bar was less than or equal to twenty five percent from the high, or less than or equal to twenty five percent from the low. Here is my code. It is not working I am very new to programming LOL.

def twentyfivepercent = 0.25;
def calcHIGH = close <= high;
def calcLOW = close >= low;
def candleendONE = calcHIGH <= 0.25;
def candleendTWO = calcLOW <= 0.25;
plot candlesOne = candleendONE is true;
plot candleTwo = candleendTWO is true;

Reply With Quote

Can you help answer these questions
from other members on futures io?
IB Bracker Order
Platforms and Indicators
DLL with webrequest function for MC
MultiCharts
Horizontal Line Indicator
Platforms and Indicators
is there an easy way to obtain by code the price variation percentual
MultiCharts
Indicator to help refine my method
Traders Hideout
 
 
(login for full post details)
  #2 (permalink)
los angeles, California, USA
 
 
Posts: 8 since Aug 2014
Thanks: 2 given, 0 received

Is this a scan or an indicator?
As an indicator all this would plot is a true or false, or a 1/0.
If it's a scan, you can only have a single plot.

 
Code
declare lower; #remove this if it's a scan.

input percent = 1.25; # 1.25 allows for more easy addition & subtraction to h / l.
def calcHIGH = close <= high[1] / percent;
def calcLOW = close >= low[1]  * percent;

plot signal = calcHIGH or calcLOW; # this will plot a 1 if true, 0 if false.

Reply With Quote
 
(login for full post details)
  #3 (permalink)
Poplar Bluff
 
 
Posts: 7 since Aug 2014
Thanks: 0 given, 1 received



emanon View Post
Is this a scan or an indicator?
As an indicator all this would plot is a true or false, or a 1/0.
If it's a scan, you can only have a single plot.

 
Code
declare lower; #remove this if it's a scan.

input percent = 1.25; # 1.25 allows for more easy addition & subtraction to h / l.
def calcHIGH = close <= high[1] / percent;
def calcLOW = close >= low[1]  * percent;

plot signal = calcHIGH or calcLOW; # this will plot a 1 if true, 0 if false.


Turns out I had a solution to this problem all along(just using my eyes LOL) thank you so much for your help.

Reply With Quote


futures io Trading Community Platforms and Indicators ThinkOrSwim > close of previous bar less than twenty five percent from the high or low


August 18, 2014


Upcoming Webinars and Events
 

Getting Comfortable with Price Action Patterns w/Earn2Trade

Aug 4
 

Live Video Panel: Ask Me Anything w/Ironbeam Brokerage

Aug 6
     



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