PINE LIBRARY
Core

Library "Core"
inRTH()
gapFlags(prevDayClose, gapPct)
Parameters:
prevDayClose (float)
gapPct (float)
gapInfo(prevClose)
Parameters:
prevClose (float)
relativeVolume(len)
Parameters:
len (int)
barSeconds()
barSecondsOpt(rthSecondsDefault)
Parameters:
rthSecondsDefault (int)
relVolRealtime(len)
Parameters:
len (int)
mtfAlign(htfEma, tol)
Parameters:
htfEma (float)
tol (float)
htfDistanceAbs(htfEma, fallback)
Parameters:
htfEma (float)
fallback (float)
mtfState(htfEma, tol)
Parameters:
htfEma (float)
tol (float)
adaptiveLength(rocLen, minSmooth, maxSmooth, useAdaptive, baseSmoothing, speedLookback)
Parameters:
rocLen (int)
minSmooth (int)
maxSmooth (int)
useAdaptive (bool)
baseSmoothing (int)
speedLookback (int)
adaptiveTrend(src, adaptiveLen)
Parameters:
src (float)
adaptiveLen (float)
atrBands(atrLen, atrMult, basis)
Parameters:
atrLen (simple int)
atrMult (float)
basis (float)
calcTrendStrength(closePrice, fastEMA, slowEMA, volumeConfirmed, speedConfirmed)
Parameters:
closePrice (float)
fastEMA (float)
slowEMA (float)
volumeConfirmed (bool)
speedConfirmed (bool)
calcMovementPotential(inExpansionZone, trendStrength, speedConfirmed)
Parameters:
inExpansionZone (bool)
trendStrength (int)
speedConfirmed (bool)
combineSignalScore(trendStrength, movementPotential, mtfBonus, volumeSurgeBonus)
Parameters:
trendStrength (int)
movementPotential (int)
mtfBonus (int)
volumeSurgeBonus (int)
strength10(dirLong, volRatio, htfDistance, isTraditional, isAltPattern, bodySize, rsi)
Parameters:
dirLong (bool)
volRatio (float)
htfDistance (float)
isTraditional (bool)
isAltPattern (bool)
bodySize (float)
rsi (float)
sessionProfile()
microstructure(lookback)
Parameters:
lookback (int)
normalizePressure(pressure, lookback)
Parameters:
pressure (float)
lookback (int)
tickPressureNorm(lb)
Parameters:
lb (int)
zscore(x, lb)
Parameters:
x (float)
lb (int)
tickPressureZ(lb)
Parameters:
lb (int)
strength10DayTrade(dirLong, volRatio, htfDistance, isTraditional, isAltPattern, bodySize, rsi, sessionBonus, tickPressure)
Parameters:
dirLong (bool)
volRatio (float)
htfDistance (float)
isTraditional (bool)
isAltPattern (bool)
bodySize (float)
rsi (float)
sessionBonus (bool)
tickPressure (float)
vwapBands(vwap, length)
Parameters:
vwap (float)
length (int)
vwapChop(vwap, dev, atrPct, rsi)
Parameters:
vwap (float)
dev (float)
atrPct (float)
rsi (float)
calcRiskReward(entry, stop, tp1, tp2, tp3, shares)
Parameters:
entry (float)
stop (float)
tp1 (float)
tp2 (float)
tp3 (float)
shares (float)
squeezeBBKC()
marketRegime(lookback)
Parameters:
lookback (int)
squeezeBucket(ratio)
Parameters:
ratio (float)
dynamicCooldown(baseBars, atrPct, inChop, maxBars)
Parameters:
baseBars (int)
atrPct (float)
inChop (bool)
maxBars (int)
vwapMode(inChop)
Parameters:
inChop (bool)
toPctStr(x)
Parameters:
x (float)
yesNo(b)
Parameters:
b (bool)
trendLabel(state)
Parameters:
state (int)
minRByPct(price, pct)
Parameters:
price (float)
pct (float)
vwapChopScore(vwap, dev, atrPct, rsi)
Parameters:
vwap (float)
dev (float)
atrPct (float)
rsi (float)
strengthGateSuggest(isQualityTime, inChop, baseGate)
Parameters:
isQualityTime (bool)
inChop (bool)
baseGate (int)
cooldownReason(atrPct, inChop)
Parameters:
atrPct (float)
inChop (bool)
readyGates(isQualityTime, inChop, relVol, atrPct, baseGate)
Parameters:
isQualityTime (bool)
inChop (bool)
relVol (float)
atrPct (float)
baseGate (int)
readyVerdict(isLong, mtfStateVal, relVol, atrPercent, strengthScore, strengthGate)
Parameters:
isLong (bool)
mtfStateVal (int)
relVol (float)
atrPercent (float)
strengthScore (int)
strengthGate (int)
structuralStops(isLong, sigLow, sigHigh, vwap, dev, atr, stopBufAtr)
Parameters:
isLong (bool)
sigLow (float)
sigHigh (float)
vwap (float)
dev (float)
atr (float)
stopBufAtr (float)
emaSlopePct(ema, bars)
Parameters:
ema (float)
bars (int)
atrPct(len)
Parameters:
len (simple int)
cooldownStatus(lastSigBar, cooldownBars)
Parameters:
lastSigBar (int)
cooldownBars (int)
emaSlopeSign(ema, bars)
Parameters:
ema (float)
bars (int)
barProgress()
rthMarkers()
badge(ok)
Parameters:
ok (bool)
triBadge(x)
Parameters:
x (int)
priceAcceptanceAdaptive(minBodyFrac)
Parameters:
minBodyFrac (float)
speedConfirmed(rocLen, emaLen, smaLen)
Parameters:
rocLen (int)
emaLen (simple int)
smaLen (int)
setupScore(isLoose, isNormal, vwapTrend, emaUp, mtfBull, relVolOK, microOK, cooldownOK)
Parameters:
isLoose (bool)
isNormal (bool)
vwapTrend (bool)
emaUp (bool)
mtfBull (bool)
relVolOK (bool)
microOK (bool)
cooldownOK (bool)
setupTier(score)
Parameters:
score (int)
setupQuality(score)
Parameters:
score (int)
setupQualityColor(score)
Parameters:
score (int)
setupScoreDir(isLong, isLoose, isNormal, vwapTrend, emaUp, mtfBull, relVolOK, priceAccept, tickNorm, cooldownOK)
Parameters:
isLong (bool)
isLoose (bool)
isNormal (bool)
vwapTrend (bool)
emaUp (bool)
mtfBull (bool)
relVolOK (bool)
priceAccept (bool)
tickNorm (float)
cooldownOK (bool)
setupScoresBoth(isLoose, isNormal, vwapTrend, emaUp, mtfBull, relVolOK, priceAccept, tickNorm, cooldownOK)
Parameters:
isLoose (bool)
isNormal (bool)
vwapTrend (bool)
emaUp (bool)
mtfBull (bool)
relVolOK (bool)
priceAccept (bool)
tickNorm (float)
cooldownOK (bool)
ruleGatesDir(isLong, squeezeTight, emaUp, vwapTrend, relVol, relVolThresh, tickNorm, useSqzGate, useEmaGate, useVwapGate, useVolGate, useMicroGate)
Parameters:
isLong (bool)
squeezeTight (bool)
emaUp (bool)
vwapTrend (bool)
relVol (float)
relVolThresh (float)
tickNorm (float)
useSqzGate (bool)
useEmaGate (bool)
useVwapGate (bool)
useVolGate (bool)
useMicroGate (bool)
ruleGates(squeezeTight, emaUp, vwapTrend, relVol, relVolThresh, tickNorm, useSqzGate, useVwapGate, useVolGate, useMicroGate)
Parameters:
squeezeTight (bool)
emaUp (bool)
vwapTrend (bool)
relVol (float)
relVolThresh (float)
tickNorm (float)
useSqzGate (bool)
useVwapGate (bool)
useVolGate (bool)
useMicroGate (bool)
arrowColor(bucket, baseColor, useRegimeColor)
Parameters:
bucket (string)
baseColor (color)
useRegimeColor (bool)
orbHiLo(minutes)
Parameters:
minutes (int)
prevDayHL()
inRTH()
gapFlags(prevDayClose, gapPct)
Parameters:
prevDayClose (float)
gapPct (float)
gapInfo(prevClose)
Parameters:
prevClose (float)
relativeVolume(len)
Parameters:
len (int)
barSeconds()
barSecondsOpt(rthSecondsDefault)
Parameters:
rthSecondsDefault (int)
relVolRealtime(len)
Parameters:
len (int)
mtfAlign(htfEma, tol)
Parameters:
htfEma (float)
tol (float)
htfDistanceAbs(htfEma, fallback)
Parameters:
htfEma (float)
fallback (float)
mtfState(htfEma, tol)
Parameters:
htfEma (float)
tol (float)
adaptiveLength(rocLen, minSmooth, maxSmooth, useAdaptive, baseSmoothing, speedLookback)
Parameters:
rocLen (int)
minSmooth (int)
maxSmooth (int)
useAdaptive (bool)
baseSmoothing (int)
speedLookback (int)
adaptiveTrend(src, adaptiveLen)
Parameters:
src (float)
adaptiveLen (float)
atrBands(atrLen, atrMult, basis)
Parameters:
atrLen (simple int)
atrMult (float)
basis (float)
calcTrendStrength(closePrice, fastEMA, slowEMA, volumeConfirmed, speedConfirmed)
Parameters:
closePrice (float)
fastEMA (float)
slowEMA (float)
volumeConfirmed (bool)
speedConfirmed (bool)
calcMovementPotential(inExpansionZone, trendStrength, speedConfirmed)
Parameters:
inExpansionZone (bool)
trendStrength (int)
speedConfirmed (bool)
combineSignalScore(trendStrength, movementPotential, mtfBonus, volumeSurgeBonus)
Parameters:
trendStrength (int)
movementPotential (int)
mtfBonus (int)
volumeSurgeBonus (int)
strength10(dirLong, volRatio, htfDistance, isTraditional, isAltPattern, bodySize, rsi)
Parameters:
dirLong (bool)
volRatio (float)
htfDistance (float)
isTraditional (bool)
isAltPattern (bool)
bodySize (float)
rsi (float)
sessionProfile()
microstructure(lookback)
Parameters:
lookback (int)
normalizePressure(pressure, lookback)
Parameters:
pressure (float)
lookback (int)
tickPressureNorm(lb)
Parameters:
lb (int)
zscore(x, lb)
Parameters:
x (float)
lb (int)
tickPressureZ(lb)
Parameters:
lb (int)
strength10DayTrade(dirLong, volRatio, htfDistance, isTraditional, isAltPattern, bodySize, rsi, sessionBonus, tickPressure)
Parameters:
dirLong (bool)
volRatio (float)
htfDistance (float)
isTraditional (bool)
isAltPattern (bool)
bodySize (float)
rsi (float)
sessionBonus (bool)
tickPressure (float)
vwapBands(vwap, length)
Parameters:
vwap (float)
length (int)
vwapChop(vwap, dev, atrPct, rsi)
Parameters:
vwap (float)
dev (float)
atrPct (float)
rsi (float)
calcRiskReward(entry, stop, tp1, tp2, tp3, shares)
Parameters:
entry (float)
stop (float)
tp1 (float)
tp2 (float)
tp3 (float)
shares (float)
squeezeBBKC()
marketRegime(lookback)
Parameters:
lookback (int)
squeezeBucket(ratio)
Parameters:
ratio (float)
dynamicCooldown(baseBars, atrPct, inChop, maxBars)
Parameters:
baseBars (int)
atrPct (float)
inChop (bool)
maxBars (int)
vwapMode(inChop)
Parameters:
inChop (bool)
toPctStr(x)
Parameters:
x (float)
yesNo(b)
Parameters:
b (bool)
trendLabel(state)
Parameters:
state (int)
minRByPct(price, pct)
Parameters:
price (float)
pct (float)
vwapChopScore(vwap, dev, atrPct, rsi)
Parameters:
vwap (float)
dev (float)
atrPct (float)
rsi (float)
strengthGateSuggest(isQualityTime, inChop, baseGate)
Parameters:
isQualityTime (bool)
inChop (bool)
baseGate (int)
cooldownReason(atrPct, inChop)
Parameters:
atrPct (float)
inChop (bool)
readyGates(isQualityTime, inChop, relVol, atrPct, baseGate)
Parameters:
isQualityTime (bool)
inChop (bool)
relVol (float)
atrPct (float)
baseGate (int)
readyVerdict(isLong, mtfStateVal, relVol, atrPercent, strengthScore, strengthGate)
Parameters:
isLong (bool)
mtfStateVal (int)
relVol (float)
atrPercent (float)
strengthScore (int)
strengthGate (int)
structuralStops(isLong, sigLow, sigHigh, vwap, dev, atr, stopBufAtr)
Parameters:
isLong (bool)
sigLow (float)
sigHigh (float)
vwap (float)
dev (float)
atr (float)
stopBufAtr (float)
emaSlopePct(ema, bars)
Parameters:
ema (float)
bars (int)
atrPct(len)
Parameters:
len (simple int)
cooldownStatus(lastSigBar, cooldownBars)
Parameters:
lastSigBar (int)
cooldownBars (int)
emaSlopeSign(ema, bars)
Parameters:
ema (float)
bars (int)
barProgress()
rthMarkers()
badge(ok)
Parameters:
ok (bool)
triBadge(x)
Parameters:
x (int)
priceAcceptanceAdaptive(minBodyFrac)
Parameters:
minBodyFrac (float)
speedConfirmed(rocLen, emaLen, smaLen)
Parameters:
rocLen (int)
emaLen (simple int)
smaLen (int)
setupScore(isLoose, isNormal, vwapTrend, emaUp, mtfBull, relVolOK, microOK, cooldownOK)
Parameters:
isLoose (bool)
isNormal (bool)
vwapTrend (bool)
emaUp (bool)
mtfBull (bool)
relVolOK (bool)
microOK (bool)
cooldownOK (bool)
setupTier(score)
Parameters:
score (int)
setupQuality(score)
Parameters:
score (int)
setupQualityColor(score)
Parameters:
score (int)
setupScoreDir(isLong, isLoose, isNormal, vwapTrend, emaUp, mtfBull, relVolOK, priceAccept, tickNorm, cooldownOK)
Parameters:
isLong (bool)
isLoose (bool)
isNormal (bool)
vwapTrend (bool)
emaUp (bool)
mtfBull (bool)
relVolOK (bool)
priceAccept (bool)
tickNorm (float)
cooldownOK (bool)
setupScoresBoth(isLoose, isNormal, vwapTrend, emaUp, mtfBull, relVolOK, priceAccept, tickNorm, cooldownOK)
Parameters:
isLoose (bool)
isNormal (bool)
vwapTrend (bool)
emaUp (bool)
mtfBull (bool)
relVolOK (bool)
priceAccept (bool)
tickNorm (float)
cooldownOK (bool)
ruleGatesDir(isLong, squeezeTight, emaUp, vwapTrend, relVol, relVolThresh, tickNorm, useSqzGate, useEmaGate, useVwapGate, useVolGate, useMicroGate)
Parameters:
isLong (bool)
squeezeTight (bool)
emaUp (bool)
vwapTrend (bool)
relVol (float)
relVolThresh (float)
tickNorm (float)
useSqzGate (bool)
useEmaGate (bool)
useVwapGate (bool)
useVolGate (bool)
useMicroGate (bool)
ruleGates(squeezeTight, emaUp, vwapTrend, relVol, relVolThresh, tickNorm, useSqzGate, useVwapGate, useVolGate, useMicroGate)
Parameters:
squeezeTight (bool)
emaUp (bool)
vwapTrend (bool)
relVol (float)
relVolThresh (float)
tickNorm (float)
useSqzGate (bool)
useVwapGate (bool)
useVolGate (bool)
useMicroGate (bool)
arrowColor(bucket, baseColor, useRegimeColor)
Parameters:
bucket (string)
baseColor (color)
useRegimeColor (bool)
orbHiLo(minutes)
Parameters:
minutes (int)
prevDayHL()
Bibliothèque Pine
Dans l'esprit TradingView, l'auteur a publié ce code Pine sous forme de bibliothèque open source afin que d'autres programmeurs Pine de notre communauté puissent le réutiliser. Bravo à l'auteur! Vous pouvez utiliser cette bibliothèque à titre privé ou dans d'autres publications open source, mais la réutilisation de ce code dans des publications est régie par nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Bibliothèque Pine
Dans l'esprit TradingView, l'auteur a publié ce code Pine sous forme de bibliothèque open source afin que d'autres programmeurs Pine de notre communauté puissent le réutiliser. Bravo à l'auteur! Vous pouvez utiliser cette bibliothèque à titre privé ou dans d'autres publications open source, mais la réutilisation de ce code dans des publications est régie par nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.