JayRogers

Simple Horizontal Value and Offsets

Requested by @TAFA94

  • Simple horizontal values extending up and down from a median value.
  • Set Median Value, and set offset values. Simples!
Kommentar: Auto adjusting median version here:

Von Favorisierten Skripten entfernen Zu Favorisierten Skripten hinzufügen
//@version=2

study(title="Simple Horizontal Value and Offsets", shorttitle="SHV", overlay=true)

// Revision:    1
// Author:      JayRogers
//
// Description:
//  - Requested by @TAFA94
//  - Simple horizontal values extending up and down from a median value.
//  - Set Median Value, and set offset values. Simples.

valMedian   = input(defval=1.09, title="Median Value")
valOffset   = input(defval=0.0025, title="Offset Value")

// offset multiplier function.
offsetMult(num) => num * valOffset

// Plot median line
midline     = plot(valMedian, title="Median Line", color=#0099FF, linewidth=2, transp=0)

// ..colour and transparency variables for quicker 'style' edits..
_dc = #0099FF
_dt = 50
// plot upward offsets
plus1   = plot(valMedian + offsetMult(1), title="Plus 1", color=_dc, linewidth=1, transp=_dt)
plus2   = plot(valMedian + offsetMult(2), title="Plus 2", color=_dc, linewidth=1, transp=_dt)
plus3   = plot(valMedian + offsetMult(3), title="Plus 3", color=_dc, linewidth=1, transp=_dt)
plus4   = plot(valMedian + offsetMult(4), title="Plus 4", color=_dc, linewidth=1, transp=_dt)
plus5   = plot(valMedian + offsetMult(5), title="Plus 5", color=_dc, linewidth=1, transp=_dt)
plus6   = plot(valMedian + offsetMult(6), title="Plus 6", color=_dc, linewidth=1, transp=_dt)
plus7   = plot(valMedian + offsetMult(7), title="Plus 7", color=_dc, linewidth=1, transp=_dt)
plus8   = plot(valMedian + offsetMult(8), title="Plus 8", color=_dc, linewidth=1, transp=_dt)
plus9   = plot(valMedian + offsetMult(9), title="Plus 9", color=_dc, linewidth=1, transp=_dt)
plus10  = plot(valMedian + offsetMult(10), title="Plus 10", color=_dc, linewidth=1, transp=_dt)
// plot downward offsets
minus1  = plot(valMedian - offsetMult(1), title="minus 1", color=_dc, linewidth=1, transp=_dt)
minus2  = plot(valMedian - offsetMult(2), title="minus 2", color=_dc, linewidth=1, transp=_dt)
minus3  = plot(valMedian - offsetMult(3), title="minus 3", color=_dc, linewidth=1, transp=_dt)
minus4  = plot(valMedian - offsetMult(4), title="minus 4", color=_dc, linewidth=1, transp=_dt)
minus5  = plot(valMedian - offsetMult(5), title="minus 5", color=_dc, linewidth=1, transp=_dt)
minus6  = plot(valMedian - offsetMult(6), title="minus 6", color=_dc, linewidth=1, transp=_dt)
minus7  = plot(valMedian - offsetMult(7), title="minus 7", color=_dc, linewidth=1, transp=_dt)
minus8  = plot(valMedian - offsetMult(8), title="minus 8", color=_dc, linewidth=1, transp=_dt)
minus9  = plot(valMedian - offsetMult(9), title="minus 9", color=_dc, linewidth=1, transp=_dt)
minus10 = plot(valMedian - offsetMult(10), title="minus 10", color=_dc, linewidth=1, transp=_dt)

Kommentare

Great for lower indicators! Thanks!
Antworten
Great work! Thank you so much! Been searching for something like this on TV for months! You have my respect!
Antworten
Building new, or importing complex indicators and strategies is great if that's what you want/need, but it surprises me how a lot of "simple" things seem to get overlooked here.

Happy to contribute to the K.I.S.S club lol. :)
+2 Antworten
Startseite Aktien-Screener Forex-Screener Krypto-Screener Wirtschaftskalender So funktioniert es! Chartmerkmale Preise Einen Freund empfehlen Hausregeln Hilfe Center Webseite & Brokerlösungen Widgets Charting Lösungen Lightweight Charting Library Blog & News Twitter
Profil Profileinstellungen Konto und Abrechnung Angeworbene Freunde Coins Meine Support Tickets Hilfe Center Veröffentlichte Ideen Followers Ich folge Private Nachrichten Chat Abmelden