PINE LIBRARY
MirPapa_Lib_trend

Library: MirPapa_Lib_trend
getMaColor(level)
Parameters:
level (int): 1 = lowest, 2 = low, 3 = mid, 4 = high, 5 = highest, 6 = base
getMA(mode, src, len)
Parameters:
mode (string): MA type
src (float): source
len (simple int): period
Returns: selected MA
getMA(maName, src, intLow, intMid, intHigh)
Parameters:
maName (string): MA type
src (float): source
intLow (simple int): short-term
intMid (simple int): mid-term
intHigh (simple int): long-term
Returns: [Low, Mid, High] array
getMA(maName, src, intLowest, intLow, intMid, intHigh, intHighest, intBase)
Parameters:
maName (string): MA type
src (float): source
intLowest (simple int): ultra-short
intLow (simple int): short
intMid (simple int): mid
intHigh (simple int): long
intHighest (simple int): ultra-long
intBase (simple int): base line
Returns: [Lowest, Low, Mid, High, Highest, Base] array
getStochastic(src, intLen)
Parameters:
src (float): source
intLen (int): period
Returns: selected stochastic
getStochastic(src, intLow, intMid, intHigh)
Parameters:
src (float): source
intLow (int): short-term
intMid (int): mid-term
intHigh (int): long-term
Returns: [stoLow, stoMid, stoHigh]
getStochastic(src, intLowest, intLow, intMid, intHigh, intHighest, intBase)
Parameters:
src (float): source
intLowest (int): ultra-short
intLow (int): short
intMid (int): mid
intHigh (int): long
intHighest (int): ultra-long
intBase (int): base
Returns: [stoLowest, stoLow, stoMid, stoHigh, stoHighest, stoBase]
getRSX(src, intLen)
Parameters:
src (float): source
intLen (int): period
Returns: selected RSX
getRSX(src, intLow, intMid, intHigh)
Parameters:
src (float): source
intLow (int): short-term
intMid (int): mid-term
intHigh (int): long-term
Returns: [Low, Mid, High]
getRSX(src, intLowest, intLow, intMid, intHigh, intHighest, intBase)
Parameters:
src (float): source
intLowest (int): ultra-short
intLow (int): short
intMid (int): mid
intHigh (int): long
intHighest (int): ultra-long
intBase (int): base
Returns: [Lowest, Low, Mid, High, Highest, Base]
getMACD(src, fastLen, slowLen, signalLen)
Parameters:
src (float): source
fastLen (simple int): fast EMA period
slowLen (simple int): slow EMA period
signalLen (simple int): signal line period
Returns: [macdLine, signalLine, histLine]
getBollingerBand(src, len, mult)
Parameters:
src (float): source
len (int): period
mult (float): standard deviation multiplier
Returns: [basis, upper, lower]
getATR(intLen)
Parameters:
intLen (simple int): ATR period
Returns: selected ATR
getATR(intLow, intMid, intHigh)
Parameters:
intLow (simple int): short-term
intMid (simple int): mid-term
intHigh (simple int): long-term
Returns: [ATR Low, Mid, High] array
getATR(intLowest, intLow, intMid, intHigh, intHighest, intBase)
Parameters:
intLowest (simple int): ultra-short
intLow (simple int): short
intMid (simple int): mid
intHigh (simple int): long
intHighest (simple int): ultra-long
intBase (simple int): base
isCross(fastLine, baseLine)
Parameters:
fastLine (float): fast line
baseLine (float): base line
Returns: state (true/false)
isMAtrend(maLow, maMid, maHigh)
Parameters:
maLow (float): fast MA
maMid (float): mid MA
maHigh (float): slow MA
Returns: trend state
isMAline(val, valPrev, intBaseLine)
Parameters:
val (float): current value
valPrev (float): previous value
intBaseLine (int): base value
Returns: state
getStage(v1, v2, v3)
Parameters:
v1 (float): first value
v2 (float): second value
v3 (float): third value
Returns: stage number (1–6)
getBgColor(stage)
Parameters:
stage (int): stage number
Returns: color
getBgColor(stage, transp)
Parameters:
stage (int): stage number
transp (int): transparency
Returns: color
getBGColor(v1, v2, v3)
Parameters:
v1 (float): first value
v2 (float): second value
v3 (float): third value
Returns: color
getBGColor(v1, v2, v3, transp)
Parameters:
v1 (float): first value
v2 (float): second value
v3 (float): third value
transp (int): transparency
Returns: color
createStackedLabel(labelText, isUp, maLowest, maLow, maMid, maHigh, maHighest, maBase)
Parameters:
labelText (string): label text
isUp (bool): true = up, false = down
maLowest (float)
maLow (float)
maMid (float)
maHigh (float)
maHighest (float)
maBase (float)
Returns: created label
isDoubleBottom(src, left, right)
Parameters:
src (float): reference series (e.g., mid MA or low)
left (int): left bar count for pivot search
right (int): right bar count for pivot search
Returns: true if double bottom detected (previous pivot low < current pivot low)
isDoubleTop(src, left, right)
Parameters:
src (float): reference series (e.g., mid MA or high)
left (int): left bar count for pivot search
right (int): right bar count for pivot search
Returns: true if double top detected (previous pivot high > current pivot high)
isFractalHigh(src, left, right)
Parameters:
src (float): high series (e.g., high or mid MA)
left (int): left confirmation bars
right (int): right confirmation bars
Returns: true if fractal high detected
isFractalLow(src, left, right)
Parameters:
src (float): low series (e.g., low or mid MA)
left (int): left confirmation bars
right (int): right confirmation bars
Returns: true if fractal low detected
getMaColor(level)
Parameters:
level (int): 1 = lowest, 2 = low, 3 = mid, 4 = high, 5 = highest, 6 = base
getMA(mode, src, len)
Parameters:
mode (string): MA type
src (float): source
len (simple int): period
Returns: selected MA
getMA(maName, src, intLow, intMid, intHigh)
Parameters:
maName (string): MA type
src (float): source
intLow (simple int): short-term
intMid (simple int): mid-term
intHigh (simple int): long-term
Returns: [Low, Mid, High] array
getMA(maName, src, intLowest, intLow, intMid, intHigh, intHighest, intBase)
Parameters:
maName (string): MA type
src (float): source
intLowest (simple int): ultra-short
intLow (simple int): short
intMid (simple int): mid
intHigh (simple int): long
intHighest (simple int): ultra-long
intBase (simple int): base line
Returns: [Lowest, Low, Mid, High, Highest, Base] array
getStochastic(src, intLen)
Parameters:
src (float): source
intLen (int): period
Returns: selected stochastic
getStochastic(src, intLow, intMid, intHigh)
Parameters:
src (float): source
intLow (int): short-term
intMid (int): mid-term
intHigh (int): long-term
Returns: [stoLow, stoMid, stoHigh]
getStochastic(src, intLowest, intLow, intMid, intHigh, intHighest, intBase)
Parameters:
src (float): source
intLowest (int): ultra-short
intLow (int): short
intMid (int): mid
intHigh (int): long
intHighest (int): ultra-long
intBase (int): base
Returns: [stoLowest, stoLow, stoMid, stoHigh, stoHighest, stoBase]
getRSX(src, intLen)
Parameters:
src (float): source
intLen (int): period
Returns: selected RSX
getRSX(src, intLow, intMid, intHigh)
Parameters:
src (float): source
intLow (int): short-term
intMid (int): mid-term
intHigh (int): long-term
Returns: [Low, Mid, High]
getRSX(src, intLowest, intLow, intMid, intHigh, intHighest, intBase)
Parameters:
src (float): source
intLowest (int): ultra-short
intLow (int): short
intMid (int): mid
intHigh (int): long
intHighest (int): ultra-long
intBase (int): base
Returns: [Lowest, Low, Mid, High, Highest, Base]
getMACD(src, fastLen, slowLen, signalLen)
Parameters:
src (float): source
fastLen (simple int): fast EMA period
slowLen (simple int): slow EMA period
signalLen (simple int): signal line period
Returns: [macdLine, signalLine, histLine]
getBollingerBand(src, len, mult)
Parameters:
src (float): source
len (int): period
mult (float): standard deviation multiplier
Returns: [basis, upper, lower]
getATR(intLen)
Parameters:
intLen (simple int): ATR period
Returns: selected ATR
getATR(intLow, intMid, intHigh)
Parameters:
intLow (simple int): short-term
intMid (simple int): mid-term
intHigh (simple int): long-term
Returns: [ATR Low, Mid, High] array
getATR(intLowest, intLow, intMid, intHigh, intHighest, intBase)
Parameters:
intLowest (simple int): ultra-short
intLow (simple int): short
intMid (simple int): mid
intHigh (simple int): long
intHighest (simple int): ultra-long
intBase (simple int): base
isCross(fastLine, baseLine)
Parameters:
fastLine (float): fast line
baseLine (float): base line
Returns: state (true/false)
isMAtrend(maLow, maMid, maHigh)
Parameters:
maLow (float): fast MA
maMid (float): mid MA
maHigh (float): slow MA
Returns: trend state
isMAline(val, valPrev, intBaseLine)
Parameters:
val (float): current value
valPrev (float): previous value
intBaseLine (int): base value
Returns: state
getStage(v1, v2, v3)
Parameters:
v1 (float): first value
v2 (float): second value
v3 (float): third value
Returns: stage number (1–6)
getBgColor(stage)
Parameters:
stage (int): stage number
Returns: color
getBgColor(stage, transp)
Parameters:
stage (int): stage number
transp (int): transparency
Returns: color
getBGColor(v1, v2, v3)
Parameters:
v1 (float): first value
v2 (float): second value
v3 (float): third value
Returns: color
getBGColor(v1, v2, v3, transp)
Parameters:
v1 (float): first value
v2 (float): second value
v3 (float): third value
transp (int): transparency
Returns: color
createStackedLabel(labelText, isUp, maLowest, maLow, maMid, maHigh, maHighest, maBase)
Parameters:
labelText (string): label text
isUp (bool): true = up, false = down
maLowest (float)
maLow (float)
maMid (float)
maHigh (float)
maHighest (float)
maBase (float)
Returns: created label
isDoubleBottom(src, left, right)
Parameters:
src (float): reference series (e.g., mid MA or low)
left (int): left bar count for pivot search
right (int): right bar count for pivot search
Returns: true if double bottom detected (previous pivot low < current pivot low)
isDoubleTop(src, left, right)
Parameters:
src (float): reference series (e.g., mid MA or high)
left (int): left bar count for pivot search
right (int): right bar count for pivot search
Returns: true if double top detected (previous pivot high > current pivot high)
isFractalHigh(src, left, right)
Parameters:
src (float): high series (e.g., high or mid MA)
left (int): left confirmation bars
right (int): right confirmation bars
Returns: true if fractal high detected
isFractalLow(src, left, right)
Parameters:
src (float): low series (e.g., low or mid MA)
left (int): left confirmation bars
right (int): right confirmation bars
Returns: true if fractal low detected
Pine kitaplığı
Gerçek TradingView ruhuyla, yazar bu Pine kodunu açık kaynaklı bir kütüphane olarak yayınladı, böylece topluluğumuzdaki diğer Pine programcıları onu yeniden kullanabilir. Yazara saygı! Bu kütüphaneyi özel olarak veya diğer açık kaynaklı yayınlarda kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Site Kuralları tarafından yönetilmektedir.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Pine kitaplığı
Gerçek TradingView ruhuyla, yazar bu Pine kodunu açık kaynaklı bir kütüphane olarak yayınladı, böylece topluluğumuzdaki diğer Pine programcıları onu yeniden kullanabilir. Yazara saygı! Bu kütüphaneyi özel olarak veya diğer açık kaynaklı yayınlarda kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Site Kuralları tarafından yönetilmektedir.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.