Daily Pivot Points – Midline

Posted by on Feb 7, 2009 in Indicator, Support and Resistance | 0 comments

Plots the midline between the various daily pivot levels. Code updated after the February ToS build broke the script.

Daily Pivots Midline

# PIVOTPOINTSMIDLINE
# http://www.thinkscripter.com
# thinkscripter@gmail.com
# Last Update 26 Jan 2009

def pp = pivotPoints()."PP";
def r1 = pivotPoints()."R1";
def r2 = pivotPoints()."R2";
def r3 = pivotPoints()."R3";
def s1 = pivotPoints()."S1";
def s2 = pivotPoints()."S2";
def s3 = pivotPoints()."S3";

plot PR1M = pp+((r1-pp)/2);
PR1M.setstyle(curve.POINTS);
PR1M.setDefaultColor(color.DARK_GRAY);
PR1M.setLineWeight(1);

plot R1R2M = r1+((r2-r1)/2);
R1R2M.setstyle(curve.POINTS);
R1R2M.setDefaultColor(color.DARK_GRAY);
R1R2M.setLineWeight(1);

plot R2R3M = r2+((r3-r2)/2);
R2R3M.setstyle(curve.POINTS);
R2R3M.setDefaultColor(color.DARK_GRAY);
R2R3M.setLineWeight(1);

plot PS1M = s1+((pp-s1)/2);
PS1M.setstyle(curve.POINTS);
PS1M.setDefaultColor(color.DARK_GRAY);
PS1M.setLineWeight(1);

plot S1S2M = s2+((s1-s2)/2);
S1S2M.setstyle(curve.POINTS);
S1S2M.setDefaultColor(color.DARK_GRAY);
S1S2M.setLineWeight(1);

plot S2S3M = s3+((s2-s3)/2);
S2S3M.setstyle(curve.POINTS);
S2S3M.setDefaultColor(color.DARK_GRAY);
S2S3M.setLineWeight(1);

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>