Pips Lines Helper

This is a simple indicator which will show you a line every 100 Pips or every 10 pips (optional). 
You can adjust color of lines and thickness. Please note that I developed this script a very long time ago and it contains a persistent bug that causes lines to display incorrectly in some markets.

Pips Lines Helper in action on Gold CFD.

Screenshot taken from the Settings menu of Standard Deviation Volatility Helper..

Here is the complete list of features present in this indicator :

  • Show line every 100 Pips
  • 4 kinds of different line color available. (Black, White, Blue, Silver)
  • Line Thickness Adjustable
  • Optional every 10 pips line

All indicators have their original default settings. You need to be able to readjust them depending on the market instrument you want to analyze. You have the possibility to put alerts which will notify you when an indicator gives a new signal. When placing an alert, be sure to choose the “once per bar” option each time you place an alert.

Rate this Indicator?

Click on a star to rate it!

Average rating 3 / 5. Vote count: 2

No votes so far! Be the first to rate this Indicator.

3
(2)

Or copy / paste the source code into your pine editor :

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © RickSimpson
 
//@version=4

study("Pips Lines Helper", overlay=true, max_bars_back=300)

//Inputs

showhpips   = input(defval=true,    title="Show Line Every 100 Pips?")
hpipscol    = input(defval="black", title="Line Color",      options=["black","white","blue","silver"])
hpipsthick  = input(defval="2",     title="Line Thickness",  options=[ "1","2","3","4"])
showtpips   = input(defval=false,   title="Show Line Every 10 Pips?")
tpipscol    = input(defval="black", title="Line Color",      options=["black","white","blue","silver"])
tpipsthick  = input(defval="1",     title="Line Thickness",  options=[ "1","2","3","4"])

//Settings

hpipslcol   = hpipscol   == "black" ? color.black : hpipscol == "white" ? color.white : hpipscol == "blue" ? color.navy : hpipscol == "silver" ? color.silver : color.black
tpipslcol   = tpipscol   == "black" ? color.black : tpipscol == "white" ? color.white : tpipscol == "blue" ? color.navy : tpipscol == "silver" ? color.silver : color.black
hpipsthickl = hpipsthick == "1" ? 1 : hpipsthick == "2" ? 2 : hpipsthick == "3" ? 3 : hpipsthick == "4" ? 4 : 2
tpipsthickl = tpipsthick == "1" ? 1 : tpipsthick == "2" ? 2 : tpipsthick == "3" ? 3 : tpipsthick == "4" ? 4 : 1

//Calculation

v1 = 1
z1 = 1
d1 = 1
y1 = 1

if close < 4
    v1 := v1 * 100
    d1 := d1 * 100
    y1 := y1 / 100
    z1 := z1 / 1000
else
    if close >= 10 and close <= 400
        v1 := v1
        d1 := d1
        y1 := y1
        z1 := z1 / 10
    else 
        v1 := v1 * 1 / 10
        d1 := d1 * 1 / 10
        y1 := y1 * 10
        z1 := z1
        
redon = round(close * v1) / d1

d  = redon + z1
d2 = redon + z1*2
d3 = redon + z1*3
d4 = redon + z1*4
d5 = redon + z1*5
d6 = redon + z1*6
d7 = redon + z1*7
d8 = redon + z1*8
d9 = redon + z1*9
e  = redon - z1
e2 = redon - z1*2
e3 = redon - z1*3
e4 = redon - z1*4
e5 = redon - z1*5
e6 = redon - z1*6
e7 = redon - z1*7
e8 = redon - z1*8
e9 = redon - z1*9

//Plotting

plot(showhpips and redon ? redon : na, color=hpipslcol, linewidth=hpipsthickl, transp=20, trackprice=true, offset=-9999)
plot(showhpips and redon + y1 ? redon + y1 : na, trackprice=true, offset=-9999, color=hpipslcol,     linewidth=hpipsthickl)
plot(showhpips and redon + y1*2 ? redon + y1*2 : na, trackprice=true, offset=-9999, color=hpipslcol, linewidth=hpipsthickl)
plot(showhpips and redon + y1*3 ? redon + y1*3 : na, trackprice=true, offset=-9999, color=hpipslcol, linewidth=hpipsthickl)
plot(showhpips and redon + y1*4 ? redon + y1*4 : na, trackprice=true, offset=-9999, color=hpipslcol, linewidth=hpipsthickl)
plot(showhpips and redon + y1*5 ? redon + y1*5 : na, trackprice=true, offset=-9999, color=hpipslcol, linewidth=hpipsthickl)
plot(showhpips and redon - y1   ? redon - y1   : na, trackprice=true, offset=-9999, color=hpipslcol, linewidth=hpipsthickl)
plot(showhpips and redon - y1   ? redon - y1   : na, trackprice=true, offset=-9999, color=hpipslcol, linewidth=hpipsthickl)
plot(showhpips and redon - y1*2 ? redon - y1*2 : na, trackprice=true, offset=-9999, color=hpipslcol, linewidth=hpipsthickl)
plot(showhpips and redon - y1*3 ? redon - y1*3 : na, trackprice=true, offset=-9999, color=hpipslcol, linewidth=hpipsthickl)
plot(showhpips and redon - y1*4 ? redon - y1*4 : na, trackprice=true, offset=-9999, color=hpipslcol, linewidth=hpipsthickl)
plot(showhpips and redon - y1*5 ? redon - y1*5 : na, trackprice=true, offset=-9999, color=hpipslcol, linewidth=hpipsthickl)
plot(d  and showtpips ? d  : na, trackprice=true, offset=-9999, color=tpipslcol, linewidth=tpipsthickl)
plot(d2 and showtpips ? d2 : na, trackprice=true, offset=-9999, color=tpipslcol, linewidth=tpipsthickl)
plot(d3 and showtpips ? d3 : na, trackprice=true, offset=-9999, color=tpipslcol, linewidth=tpipsthickl)
plot(d4 and showtpips ? d4 : na, trackprice=true, offset=-9999, color=tpipslcol, linewidth=tpipsthickl)
plot(d5 and showtpips ? d5 : na, trackprice=true, offset=-9999, color=tpipslcol, linewidth=tpipsthickl)
plot(d6 and showtpips ? d6 : na, trackprice=true, offset=-9999, color=tpipslcol, linewidth=tpipsthickl)
plot(d7 and showtpips ? d7 : na, trackprice=true, offset=-9999, color=tpipslcol, linewidth=tpipsthickl)
plot(d8 and showtpips ? d8 : na, trackprice=true, offset=-9999, color=tpipslcol, linewidth=tpipsthickl)
plot(d9 and showtpips ? d9 : na, trackprice=true, offset=-9999, color=tpipslcol, linewidth=tpipsthickl)
plot(e  and showtpips ? e  : na, trackprice=true, offset=-9999, color=tpipslcol, linewidth=tpipsthickl)
plot(e2 and showtpips ? e2 : na, trackprice=true, offset=-9999, color=tpipslcol, linewidth=tpipsthickl)
plot(e3 and showtpips ? e3 : na, trackprice=true, offset=-9999, color=tpipslcol, linewidth=tpipsthickl)
plot(e4 and showtpips ? e4 : na, trackprice=true, offset=-9999, color=tpipslcol, linewidth=tpipsthickl)
plot(e5 and showtpips ? e5 : na, trackprice=true, offset=-9999, color=tpipslcol, linewidth=tpipsthickl)
plot(e6 and showtpips ? e6 : na, trackprice=true, offset=-9999, color=tpipslcol, linewidth=tpipsthickl)
plot(e7 and showtpips ? e7 : na, trackprice=true, offset=-9999, color=tpipslcol, linewidth=tpipsthickl)
plot(e8 and showtpips ? e8 : na, trackprice=true, offset=-9999, color=tpipslcol, linewidth=tpipsthickl)
plot(e9 and showtpips ? e9 : na, trackprice=true, offset=-9999, color=tpipslcol, linewidth=tpipsthickl)
plot(redon - z1 and showtpips ? redon - z1 : na, trackprice=true, offset=-9999, color=color.silver, linewidth=1)

The content covered on this website is NOT investment advice and I am not a financial advisor.