miyako.pro

Broker Spread Overlay v2.1

This is for displaying a price line showing the spread difference of brokers such as 1broker.com or trading212.com where price is different than actual price. It may also be used as an ask line or to provide an additional alternate chart.

Version 2.1:
- JPY pip correction
- Price Line
- Area
- Kagi, Does not work on Forex pairs!
- Western Bar
- Candlesticks
- Heikenashi
- Renko, ATR and Traditional
- Line Break

If you like this indicator and/or it has helped you to earn profits, please donate.
- PayPal: ma.spencer@gmx.com
- Bitcoin: 1foxypuyuoNp5n1LNCCCCmjZ4RAXntQ8X

Keluarkan daripada Skrip Pilihan Tambah kepada Skrip Pilihan
// Coded by: Matthew Spencer
// If you like this indicator and/or it has helped you to earn money, please donate.
// Paypal: ma.spencer@gmx.com
// Bitcoin: 1foxypuyuoNp5n1LNCCCCmjZ4RAXntQ8X
// "If I die in the land of the dead, will I be sent to the land of the dead again?"
study("Broker Spread Overlay v2.1", overlay=true)

// Settings
separator = input(defval="Spread", title="---", type=string)
oneSpread = input(defval=0.0002, type="float", title="Pips")
jpyToggle = input(type=bool, defval=false, title="JPY Pips")
separator1 = input(defval="Chart", title="---", type=string)
lineToggle = input(type=bool, defval=true, title="Show Price Line")
areaToggle = input(type=bool, defval=false, title="Area")
barToggle = input(type=bool, defval=false, title="Bar")
candleToggle = input(type=bool, defval=false, title="Candlesticks")
heikenashiToggle = input(type=bool, defval=false, title="Heikinashi")
renkoToggle = input(type=bool, defval=false, title="Renko")
renkoSize = input(defval=10, type="integer", title="Renko Size")
renkoType = input(type=bool, defval=false, title="Traditional Renko")
lbToggle = input(type=bool, defval=false, title="Line Break")
lbSize = input(defval=3, type="integer", title="Line Break Lines")
kagiToggle = input(type=bool, defval=false, title="Kagi")
kagiAmount = input(defval=1, type="integer", title="Kagi Reversal Amount")

// OHCL
oneOpen = open + (jpyToggle ? oneSpread * 100 : oneSpread)
oneHigh = high + (jpyToggle ? oneSpread * 100 : oneSpread)
oneLow = low + (jpyToggle ? oneSpread * 100 : oneSpread)
oneClose = close + (jpyToggle ? oneSpread * 100 : oneSpread)

// Heikenashi
heikenashiOpen = security(heikenashi(tickerid), period, open) + oneSpread
heikenashiHigh = security(heikenashi(tickerid), period, high) + oneSpread
heikenashiLow = security(heikenashi(tickerid), period, low) + oneSpread
heikenashiClose = security(heikenashi(tickerid), period, close) + oneSpread

// Renko
renkoOpen = security(renko(tickerid, "close", renkoType ? "Traditional" : "ATR", renkoSize), period, open)
renkoHigh = security(renko(tickerid, "close", renkoType ? "Traditional" : "ATR", renkoSize), period, high)
renkoLow = security(renko(tickerid, "close", renkoType ? "Traditional" : "ATR", renkoSize), period, low)
renkoClose = security(renko(tickerid, "close", renkoType ? "Traditional" : "ATR", renkoSize), period, close)

// Line Break
lbOpen = security(linebreak(tickerid, "close", lbSize), period, open)
lbHigh = security(linebreak(tickerid, "close", lbSize), period, high)
lbLow = security(linebreak(tickerid, "close", lbSize), period, low)
lbClose = security(linebreak(tickerid, "close", lbSize), period, close)

// Kagi (Note: Doesn't work with Forex pairs)
kagiClose = security(kagi(tickerid, "close", kagiAmount), period, close)

// Colors
linecolor = open < close ? green : red
linecolor2 = open < close ? blue : maroon
renkocolor = renkoOpen < renkoClose ? teal : orange
lbcolor = lbOpen < lbClose ? teal : orange
pfcolor = lbOpen < lbClose ? black : red

// Plot Charts
plot(areaToggle ? oneClose:na, title="Area", color=teal, style=areabr, linewidth=2, trackprice=false, transp=75, editable=true)
plot(kagiToggle ? kagiClose:na, title="Kagi", color=black)
plotcandle(renkoToggle ? renkoOpen:na, renkoToggle ? renkoHigh:na, renkoToggle ? renkoLow:na, renkoToggle ? renkoClose:na , title='Renko', color = renkocolor, wickcolor=black)
plotcandle(lbToggle ? lbOpen:na, lbToggle ? lbHigh:na, lbToggle ? lbLow:na, lbToggle ? lbClose:na , title='Line Break', color = lbcolor, wickcolor=black)
plotbar(barToggle ? oneOpen:na, barToggle ? oneHigh:na, barToggle ? oneLow:na, barToggle ? oneClose:na , title='Bar', color = linecolor)
plotcandle(candleToggle ? oneOpen:na, candleToggle ? oneHigh:na, candleToggle ? oneLow:na, candleToggle ? oneClose:na , title='Candles', color = linecolor, wickcolor=black)
plotcandle(heikenashiToggle ? heikenashiOpen:na, heikenashiToggle ? heikenashiHigh:na, heikenashiToggle ? heikenashiLow:na, heikenashiToggle ? heikenashiClose:na , title='Heikenashi Candles', color = linecolor2, wickcolor=black)
plot(lineToggle ? oneClose:na, title="Price Line", color=linecolor, style=areabr, linewidth=2, trackprice=true, transp=100, editable=false)
Hotfix for Heikenashi candle colors.

linecolor2 = heikenashiOpen < heikenashiClose ? blue : maroon
Balas
Laman Utama Penyaring Saham Penyaring Forex Penyaring Kripto Kalendar Ekonomi Bagaimana ia berfungsi Ciri-ciri Carta Harga Peraturan Dalaman Moderator Laman web dan Penyelesaian Broker Widget Solusi pencartaan Dapatkan Bantuan Permintaan Ciri Blog & Berita Soalan Lazim Wiki Twitter
Profil Tetapan Profil Akaun dan Pengebilan Dapatkan Bantuan Idea-idea yang diterbitkan Pengikut Mengikut Mesej Peribadi Sembang Daftar Keluar