PROTECTED SOURCE SCRIPT
Momentum Flow TP11

/version=5
indicator('Momentum Flow TP11', overlay=false)
//----------------------------------------------------------------------------------------------------
// Momentum Flow------------------------------------------------------------------------------------------
grp1 = "Momentum Flow"
lenFastF = input.int(7, title='FEMA', minval=1, group=grp1)
lenSlowF = input.int(25, title='SEMA', minval=1, group=grp1)
srcF = input.source(close, title='Source', group=grp1)
FundflowF(s, fastLenF, slowLenF, sigLenF) =>
fastF = ta.ema(s, fastLenF)
slowF = ta.ema(s, slowLenF)
femaF = fastF - slowF
sigF = ta.ema(femaF, sigLenF)
[femaF, sigF, femaF - sigF]
lenSigF = 9
[macF, signalF, macHistF] = FundflowF(srcF, lenFastF, lenSlowF, lenSigF)
candleColorF = macF >= macF[1] ? #1cff00 : #ff0000
sigColorF = signalF > signalF[1] ? #1cff00 : #ff0000
plotcandle(open=macF[1], close=macF, high=macF, low=macF[1], color=candleColorF)
//----------------------------------------------------------------------------------------------------
//2Line------------------------------------------------------------------------------------------------
grp2 = "2Line"
ma(source, length, type) =>
switch type
"SMA" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"SMMA (RMA)" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)
typeMAE = input.string(title="Method MA", defval = "EMA", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group=grp2)
len1E = input.int(5, title="Length 1", group=grp2)
len2E = input.int(56, title="Length 2", group=grp2)
col1E = input.color(color.blue, title="Color 1", group=grp2)
col2E = input.color(#1cff00, title="Color 2", group=grp2)
iE = input.bool(true, "2Line On/Off ?", group=grp2)
plot(ma(macF, len1E, typeMAE), color=col1E,linewidth=2)
plot(ma(macF, len2E, typeMAE), color=col2E,linewidth=2)
//----------------------------------------------------------------------------------------------------
//FBB-------------------------------------------------------------------------------------------------
grp3="Bands"
typeMAFB = input.string(title="Method FB", defval = "VWMA", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group=grp3)
srcMAFB = input.source(hlc3, title="Source Fibo BB", group=grp3)
lenFB = input.int(200, title="Length Fibo BB", group=grp3)
colFB = input.color(color.fuchsia, title="Color Fibo BB", group=grp3)
iFB = input.bool(true, title="MA Fibo BB On/Off ?", group=grp3)
basisFB = ma(macF, lenFB, typeMAFB)
plot(iFB ? basisFB : na, color=colFB,linewidth=2)
//----------------------------------------------------------------------------------------------------
//BB--------------------------------------------------------------------------------------------------
grp4="Swing Bands"
typeMABB = input.string(title="Method BB", defval = "SMA", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group=grp4)
lenMABB = input.int(39, title="Length BB", group=grp4)
multBB = input.float(2.0, title="Multiplier BB", group=grp4)
colBasisBB = input.color(color.rgb(245, 243, 242, 100), title="Color Basis BB", group=grp4)
colUpperBB = input.color(#0ed4b3, title="Color Upper BB", group=grp4)
colLowerBB = input.color(#f3f2ed00, title="Color Lower BB", group=grp4)
iBB = input.bool(true, title="BB On/Off ?", group=grp4)
basisBB = ma(macF, lenMABB, typeMABB)
devBB = ta.stdev(macF, lenMABB)
upperBB = basisBB+(multBB*devBB)
lowerBB = basisBB-(multBB*devBB)
plot(iBB ? basisBB : na, color=colBasisBB)
plot(iBB ? upperBB : na, color=colUpperBB,linewidth=2)
plot(iBB ? lowerBB : na, color=colLowerBB)
hline(0, title="Zero Line", color=color.gray, linestyle = hline.style_dashed)
indicator('Momentum Flow TP11', overlay=false)
//----------------------------------------------------------------------------------------------------
// Momentum Flow------------------------------------------------------------------------------------------
grp1 = "Momentum Flow"
lenFastF = input.int(7, title='FEMA', minval=1, group=grp1)
lenSlowF = input.int(25, title='SEMA', minval=1, group=grp1)
srcF = input.source(close, title='Source', group=grp1)
FundflowF(s, fastLenF, slowLenF, sigLenF) =>
fastF = ta.ema(s, fastLenF)
slowF = ta.ema(s, slowLenF)
femaF = fastF - slowF
sigF = ta.ema(femaF, sigLenF)
[femaF, sigF, femaF - sigF]
lenSigF = 9
[macF, signalF, macHistF] = FundflowF(srcF, lenFastF, lenSlowF, lenSigF)
candleColorF = macF >= macF[1] ? #1cff00 : #ff0000
sigColorF = signalF > signalF[1] ? #1cff00 : #ff0000
plotcandle(open=macF[1], close=macF, high=macF, low=macF[1], color=candleColorF)
//----------------------------------------------------------------------------------------------------
//2Line------------------------------------------------------------------------------------------------
grp2 = "2Line"
ma(source, length, type) =>
switch type
"SMA" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"SMMA (RMA)" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)
typeMAE = input.string(title="Method MA", defval = "EMA", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group=grp2)
len1E = input.int(5, title="Length 1", group=grp2)
len2E = input.int(56, title="Length 2", group=grp2)
col1E = input.color(color.blue, title="Color 1", group=grp2)
col2E = input.color(#1cff00, title="Color 2", group=grp2)
iE = input.bool(true, "2Line On/Off ?", group=grp2)
plot(ma(macF, len1E, typeMAE), color=col1E,linewidth=2)
plot(ma(macF, len2E, typeMAE), color=col2E,linewidth=2)
//----------------------------------------------------------------------------------------------------
//FBB-------------------------------------------------------------------------------------------------
grp3="Bands"
typeMAFB = input.string(title="Method FB", defval = "VWMA", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group=grp3)
srcMAFB = input.source(hlc3, title="Source Fibo BB", group=grp3)
lenFB = input.int(200, title="Length Fibo BB", group=grp3)
colFB = input.color(color.fuchsia, title="Color Fibo BB", group=grp3)
iFB = input.bool(true, title="MA Fibo BB On/Off ?", group=grp3)
basisFB = ma(macF, lenFB, typeMAFB)
plot(iFB ? basisFB : na, color=colFB,linewidth=2)
//----------------------------------------------------------------------------------------------------
//BB--------------------------------------------------------------------------------------------------
grp4="Swing Bands"
typeMABB = input.string(title="Method BB", defval = "SMA", options=["SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA"], group=grp4)
lenMABB = input.int(39, title="Length BB", group=grp4)
multBB = input.float(2.0, title="Multiplier BB", group=grp4)
colBasisBB = input.color(color.rgb(245, 243, 242, 100), title="Color Basis BB", group=grp4)
colUpperBB = input.color(#0ed4b3, title="Color Upper BB", group=grp4)
colLowerBB = input.color(#f3f2ed00, title="Color Lower BB", group=grp4)
iBB = input.bool(true, title="BB On/Off ?", group=grp4)
basisBB = ma(macF, lenMABB, typeMABB)
devBB = ta.stdev(macF, lenMABB)
upperBB = basisBB+(multBB*devBB)
lowerBB = basisBB-(multBB*devBB)
plot(iBB ? basisBB : na, color=colBasisBB)
plot(iBB ? upperBB : na, color=colUpperBB,linewidth=2)
plot(iBB ? lowerBB : na, color=colLowerBB)
hline(0, title="Zero Line", color=color.gray, linestyle = hline.style_dashed)
סקריפט מוגן
סקריפט זה פורסם כמקור סגור. עם זאת, אתה יכול להשתמש בו באופן חופשי וללא כל הגבלה - למד עוד כאן.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.
סקריפט מוגן
סקריפט זה פורסם כמקור סגור. עם זאת, אתה יכול להשתמש בו באופן חופשי וללא כל הגבלה - למד עוד כאן.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.