Help Creating Percent off High Indicator - ThinkOrSwim Programming | futures io social day trading
futures io futures trading


Help Creating Percent off High Indicator
Updated: Views / Replies:547 / 3
Created: by eclipsemf 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 90,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
 

Help Creating Percent off High Indicator

  #1 (permalink)
Elite Member
Manchester NH
 
Futures Experience: Intermediate
Platform: Thinkorswim
Broker/Data: TD Ameritrade
Favorite Futures: /ES
 
Posts: 87 since Feb 2014
Thanks: 29 given, 55 received

Help Creating Percent off High Indicator

I'm looking to find some one that could help me convert my words to a simple program to use in TD Ameritrade's Quotes tab under MarketWatch. I'm am going to use this to aid in screening stock. I know this is more of a futures and that's what I trade but do regular stocks on the side and feel like this will help.

Here's what I have, it does what I want I'm just am not to good with ThinkScript yet.



LastPrice - 52WeekLowPrice = DollarOffLow
DollarOffLow / LastPrice = DecimalPercent
DecimalPercent * 100 = PercentOffLow


Update: I got this to show me the % off the Low off the day Im just not sure how to make it the 52 week low.


Update Number 2 Getting close some work out perfect but some others dont!!! Any one have an ideas. I have the 52 week low to plot where it should its just the % off the low doesnt seem to want to work.
input price = close;


Def atl = Lowestall(price);

def Dollarofflow = (price - atl);
def Decimal = (Dollarofflow / price);


def Percentofflow = (Decimal * 100);

plot data = Percentofflow;


Last edited by eclipsemf; November 3rd, 2015 at 10:48 PM.
Reply With Quote
 
  #2 (permalink)
1.Fibs 2.??? 3.Profit
Puerto Rico
 
Futures Experience: Intermediate
Platform: thinkorswim
Broker/Data: TD Ameritrade
Favorite Futures: ES
 
rmejia's Avatar
 
Posts: 384 since Oct 2010
Thanks: 3,597 given, 421 received

I tried something very similar years ago; don't remember the logic behind the code or the testing to make sure the numbers were right but this was the code:

 
Code
# 52 Week High and Low
# If higher from Low, Green
# If lower from High, Red
 
 
input HLaggregationPeriod = AggregationPeriod.WEEK;
input HLlength = 52;

def WeekHigh = Highest(high(period = HLaggregationPeriod), HLlength);
def WeekLow = Lowest(low(period = HLaggregationPeriod), HLlength);
 
 
# Current Price
def last = close;
 
 
# Plot 

def HighP = Round(((1 - (last / WeekHigh)) * 100), 2);
def LowP = Round((((last / WeekLow) - 1) * 100), 2);

plot dif = if HighP > LowP then HighP else LowP;


assignBackgroundColor(if HighP>LowP then Color.Dark_Red else Color.Dark_Green);
#AssignBackgroundColor(if HighP > LowP then CreateColor(51, 0, 0) else CreateColor(0, 51, 0));

Reply With Quote
The following user says Thank You to rmejia for this post:
 
  #3 (permalink)
Elite Member
Manchester NH
 
Futures Experience: Intermediate
Platform: Thinkorswim
Broker/Data: TD Ameritrade
Favorite Futures: /ES
 
Posts: 87 since Feb 2014
Thanks: 29 given, 55 received


@rmejia Thank you for that! It looks like it has a few things I was missing! I will give it a look over and testing tomorrow when I am awake and will report back with some numbers so if any one in the future is looking to do the same thing they will have the numbers to back it.

Reply With Quote
 
  #4 (permalink)
Elite Member
Manchester NH
 
Futures Experience: Intermediate
Platform: Thinkorswim
Broker/Data: TD Ameritrade
Favorite Futures: /ES
 
Posts: 87 since Feb 2014
Thanks: 29 given, 55 received

Final Prgram

This is what I came up with between what I had and what rmejia had posted. I changed it a bit so it would do exactly what I wanted. But this will give you the % the stock is off its low point for the year based off of the close of the last day. I ran 10 or so stocks with different prices and they all came out perfect using different inputs. Any questions feel free to ask!

# 52 Week Low


input HLaggregationPeriod = AggregationPeriod.WEEK;
input HLlength = 52;

def WeekLow = Lowest(low(period = HLaggregationPeriod), HLlength);

# Current Price
def last = close;


# Plot

def LowP = Round((((last / weeklow) -1) * 100), 2);

Plot data = LowP;

Reply With Quote

Reply



futures io > > > > > Help Creating Percent off High Indicator

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Price within X percent of high within Y days eddieo ThinkOrSwim 2 March 30th, 2017 10:50 PM
close of previous bar less than twenty five percent from the high or low The Gurok ThinkOrSwim 2 August 18th, 2014 05:15 PM
US poverty at new high: 16 percent, or 49.1M kbit News and Current Events 0 November 7th, 2011 03:53 PM
Please help creating a NinjaTrader Indicator jjl1753 NinjaTrader Programming 4 June 13th, 2011 10:26 PM
Help creating this indicator in NT7 marin NinjaTrader Programming 1 October 24th, 2010 12:30 PM


All times are GMT -4. The time now is 05:23 AM.

Copyright © 2017 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
Page generated 2017-12-16 in 0.08 seconds with 19 queries on phoenix via your IP 54.160.245.121