miyako.pro

Broker Spread Overlay v2.1a

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

Version 2.1a
- Fixed Heikenashi Colors.

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

오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?
// 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 = heikenashiOpen < heikenashiClose ? 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)