Setup Mafia 3.5
Setup Mafia 3.5
0 at
https://mozilla.org/MPL/2.0/
// © Tio_Buza
//@version=5
indicator(title = "Ichimoku Signals", shorttitle = "Ichimoku +", overlay = true,
max_labels_count=500)
//Ichimoku Inputs
conversionPeriods = input.int(9, minval=1, title="Conversion Line", group="Ichimoku
Cloud")
basePeriods = input.int(26, minval=1, title="Base Line", group="Ichimoku Cloud")
laggingSpan = input.int(52, minval=1, title="Senkou Span B", group="Ichimoku
Cloud")
displacement = input.int(26, minval=1, title="Lagging Span", group="Ichimoku
Cloud")
//Plot to Chart
plot(conversionLine, color=#2196f3, title="Conversion Line")
plot(baseLine, color=#B71C1C, title="Base Line")
plot(close, offset = -displacement + 1, color=#25ec2c, title="Lagging Span",
linewidth=2)
p1 = plot(leadLine1, offset = displacement - 1, color=#4caf50, linewidth = 2,
title="Leading Span A")
p2 = plot(leadLine2, offset = displacement - 1, color=#f23645, linewidth = 2,
title="Leading Span B")
fill(p1, p2, color = leadLine1 > leadLine2 ? color.rgb(67, 160, 71, 75) :
color.rgb(244, 67, 54, 75))
// Heiken Trade
heikinashi_open = request.security(ticker.heikinashi(syminfo.tickerid),
timeframe.period, open)
heikinashi_high = request.security(ticker.heikinashi(syminfo.tickerid),
timeframe.period, high)
heikinashi_low = request.security(ticker.heikinashi(syminfo.tickerid),
timeframe.period, low)
heikinashi_close = request.security(ticker.heikinashi(syminfo.tickerid),
timeframe.period, close)
// Condition Variable
var Bearish = false
var Bullish = false
var Bullish_label = label.new(na, na, "", style=label.style_triangleup,
color=#089981, size=size.tiny, yloc=yloc.belowbar)
var Bearish_label = label.new(na, na, "", style=label.style_triangledown,
color=#ff5252, size=size.tiny, yloc=yloc.abovebar)
//Count How many candles for current Pivot Level, If new reset.
countH = 0
countL = 0
countH := na(ph) ? nz(countH[1]) + 1 : 0
countL := na(pl) ? nz(countL[1]) + 1 : 0
pvtH = 0.0
pvtL = 0.0
pvtH := na(ph) ? pvtH[1] : srcH[rightLenH]
pvtL := na(pl) ? pvtL[1] : srcL[rightLenL]
// Alerts
alertcondition(buy or sell,title="Fractal Break Arrow",message="Alert")
alertcondition(buy,title="Fractal Break Long",message="Long")
alertcondition(sell,title="Fractal Break Short",message="Short")
//RSI Inputs
rsiLength = input.int(14, minval=1, title="RSI Length"), editable = false
rsiSource = input.source(close, "Source")
//RSI
rsiOverbought = input.int(75, title="RSI Overbought Level", group = "RSI Options")
rsiOversold = input.int(28, title="RSI Oversold Level", group = "RSI Options")