Pivot indicator works well, need explanation based on code - ThinkOrSwim Programming | futures io social day trading
futures io futures trading

Pivot indicator works well, need explanation based on code
Updated: Views / Replies:677 / 1
Created: by jake0alexander 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

Thread Tools Search this Thread

Pivot indicator works well, need explanation based on code

  #1 (permalink)
Elite Member
New York, New York, USA
Futures Experience: Intermediate
Platform: ThinkOrSwim
Favorite Futures: Stocks, Options, Futures
Posts: 5 since Jan 2015
Thanks: 2 given, 2 received

Pivot indicator works well, need explanation based on code

I just found a site that hasn't been updated in a while but had an interesting pivot indicator I wanted to check out. I threw it up on a few charts and it seems to work really well for futures but not so much for stocks. It looks like it calculates the previous days high and low as well as the over night high and low and creates pivots based on those (although it doesn't seem exact). That's just from looking though. I attempted to decipher some of the code, but I have zero knowledge there. I'd really appreciate if someone could explain to me exactly what this indicator does based on the code which you can find here...


TLDR; explain what this indicator does based on the code please

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, 425 received

The meat of the code is this (the rest is mostly formatting: colors, linetype, hiding):

input _high  = 1043.75;
input _low   = 1033.50;
input settle = 1041.50;

    PP = (_high + _low + settle) / 3;
    R1 = (2 * PP) - _low;
    S1 = (2 * PP) - _high;
    R2 = PP + (r1 - s1);
    S2 = PP - (r1 - s1);
    R3 = _high + 2 * (PP - _low);
    S3 = _low - 2 * (_high - PP);

Inputs are what you manually enter, in this case it is 3 parameters, _high, _low & settle. Previous day, high, low and close.

For the plots there are 7:
PP = Pivot Point
R1 = Resistance 1
S1 = Support 1

The formula is just substituting the abbreviations for the numbers:
PP = (_high + _low + settle) / 3;

_high, _low & settle are the inputs you manually entered. It is adding them and then dividing by 3. That value is PP which is then plotted.

PP = (1043.75 + 1033.50 + 1041.50) / 3
PP = 1,039.58

It calculates PP first to use it on the next plot:

R1 = (2 * PP) - _low;

In this one it is multiplying 2 times the value of PP it just calculated, then subtracting that to the manual input _low.

R1 = (2 * 1,039.58) - 1033.50
R1 = 1,045.66

The rest is the same; just substituting the names (PP,R1,etc) for the values.

Reply With Quote
The following 2 users say Thank You to rmejia for this post:


futures io > > > > > Pivot indicator works well, need explanation based on code

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Updating schedule soon for June


Similar Threads
Thread Thread Starter Forum Replies Last Post
pivot point code... rmiller863 ThinkOrSwim 15 December 27th, 2015 10:00 PM
EL Trend Line based on Pivot Phillo82 EasyLanguage Programming 1 October 14th, 2013 10:45 AM
Help adding a Pivot Range to following code: olobay MultiCharts 3 September 18th, 2012 09:07 AM
MACD_Zero Lag Indicator Explanation GilR NinjaTrader 4 February 25th, 2011 06:36 AM
BMT CCI Pivot Zone easylanguage code for Market Delta? kienow Investor/RT 1 February 16th, 2011 02:37 PM

All times are GMT -4. The time now is 10:11 AM.

Copyright © 2018 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 2018-06-25 in 0.07 seconds with 19 queries on phoenix via your IP