PINE LIBRARY
SPX_0DTE_Engine

Library "SPX_0DTE_Engine"
getATM(price)
Parameters:
price (float)
getCallStrikes(atmStrike, count)
Parameters:
atmStrike (int)
count (int)
getPutStrikes(atmStrike, count)
Parameters:
atmStrike (int)
count (int)
generateOCCSymbol(underlying, year, month, day, optionType, strike)
Parameters:
underlying (string)
year (int)
month (int)
day (int)
optionType (string)
strike (int)
getAdaptiveReference(src, lookback)
Parameters:
src (float)
lookback (int)
detectLiquidityGrabHigh(high, low, close, volume, lookback)
Parameters:
high (float)
low (float)
close (float)
volume (float)
lookback (int)
detectLiquidityGrabLow(high, low, close, volume, lookback)
Parameters:
high (float)
low (float)
close (float)
volume (float)
lookback (int)
getVolatilityRegime(src, bbLength, bbMult)
Parameters:
src (float)
bbLength (int)
bbMult (float)
getESConfirmation(spxClose, esClose, spxHigh, esHigh, spxLow, esLow, lookback)
Parameters:
spxClose (float)
esClose (float)
spxHigh (float)
esHigh (float)
spxLow (float)
esLow (float)
lookback (int)
getDeltaBias(src, adaptiveRef, esClose, spxClose)
Parameters:
src (float)
adaptiveRef (float)
esClose (float)
spxClose (float)
getGammaZone(src, atmStrike)
Parameters:
src (float)
atmStrike (int)
getVegaRegime(vixSymbol)
Parameters:
vixSymbol (simple string)
isFailState(volRegime, hour, minute, vix, atr)
Parameters:
volRegime (int)
hour (int)
minute (int)
vix (float)
atr (float)
checkCallConfluence(liquidityGrabLow, volRegime, esConfirmation, failState, deltaBias, lowGamma)
Parameters:
liquidityGrabLow (bool)
volRegime (int)
esConfirmation (int)
failState (bool)
deltaBias (int)
lowGamma (bool)
checkPutConfluence(liquidityGrabHigh, volRegime, esConfirmation, failState, deltaBias, lowGamma)
Parameters:
liquidityGrabHigh (bool)
volRegime (int)
esConfirmation (int)
failState (bool)
deltaBias (int)
lowGamma (bool)
checkProfitTarget(entryPrice, currentPrice, targetPercent, isCall)
Parameters:
entryPrice (float)
currentPrice (float)
targetPercent (float)
isCall (bool)
checkStopLoss(entryPrice, currentPrice, stopPercent, isCall)
Parameters:
entryPrice (float)
currentPrice (float)
stopPercent (float)
isCall (bool)
checkTimeExit(hour, minute)
Parameters:
hour (int)
minute (int)
checkInvalidation(esConfirmation, isCallPosition)
Parameters:
esConfirmation (int)
isCallPosition (bool)
getATM(price)
Parameters:
price (float)
getCallStrikes(atmStrike, count)
Parameters:
atmStrike (int)
count (int)
getPutStrikes(atmStrike, count)
Parameters:
atmStrike (int)
count (int)
generateOCCSymbol(underlying, year, month, day, optionType, strike)
Parameters:
underlying (string)
year (int)
month (int)
day (int)
optionType (string)
strike (int)
getAdaptiveReference(src, lookback)
Parameters:
src (float)
lookback (int)
detectLiquidityGrabHigh(high, low, close, volume, lookback)
Parameters:
high (float)
low (float)
close (float)
volume (float)
lookback (int)
detectLiquidityGrabLow(high, low, close, volume, lookback)
Parameters:
high (float)
low (float)
close (float)
volume (float)
lookback (int)
getVolatilityRegime(src, bbLength, bbMult)
Parameters:
src (float)
bbLength (int)
bbMult (float)
getESConfirmation(spxClose, esClose, spxHigh, esHigh, spxLow, esLow, lookback)
Parameters:
spxClose (float)
esClose (float)
spxHigh (float)
esHigh (float)
spxLow (float)
esLow (float)
lookback (int)
getDeltaBias(src, adaptiveRef, esClose, spxClose)
Parameters:
src (float)
adaptiveRef (float)
esClose (float)
spxClose (float)
getGammaZone(src, atmStrike)
Parameters:
src (float)
atmStrike (int)
getVegaRegime(vixSymbol)
Parameters:
vixSymbol (simple string)
isFailState(volRegime, hour, minute, vix, atr)
Parameters:
volRegime (int)
hour (int)
minute (int)
vix (float)
atr (float)
checkCallConfluence(liquidityGrabLow, volRegime, esConfirmation, failState, deltaBias, lowGamma)
Parameters:
liquidityGrabLow (bool)
volRegime (int)
esConfirmation (int)
failState (bool)
deltaBias (int)
lowGamma (bool)
checkPutConfluence(liquidityGrabHigh, volRegime, esConfirmation, failState, deltaBias, lowGamma)
Parameters:
liquidityGrabHigh (bool)
volRegime (int)
esConfirmation (int)
failState (bool)
deltaBias (int)
lowGamma (bool)
checkProfitTarget(entryPrice, currentPrice, targetPercent, isCall)
Parameters:
entryPrice (float)
currentPrice (float)
targetPercent (float)
isCall (bool)
checkStopLoss(entryPrice, currentPrice, stopPercent, isCall)
Parameters:
entryPrice (float)
currentPrice (float)
stopPercent (float)
isCall (bool)
checkTimeExit(hour, minute)
Parameters:
hour (int)
minute (int)
checkInvalidation(esConfirmation, isCallPosition)
Parameters:
esConfirmation (int)
isCallPosition (bool)
ไลบรารีไพน์
ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนได้เผยแพร่ Pine code นี้เป็นโอเพนซอร์สไลบรารีเพื่อให้ Pine โปรแกรมเมอร์คนอื่นในชุมชนของเราสามารถนำไปใช้ซ้ำได้ ต้องขอบคุณผู้เขียน! คุณสามารถใช้ไลบรารีนี้ในแบบส่วนตัวหรือในการเผยแพร่แบบโอเพนซอร์สอื่น ๆ แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
ไลบรารีไพน์
ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนได้เผยแพร่ Pine code นี้เป็นโอเพนซอร์สไลบรารีเพื่อให้ Pine โปรแกรมเมอร์คนอื่นในชุมชนของเราสามารถนำไปใช้ซ้ำได้ ต้องขอบคุณผู้เขียน! คุณสามารถใช้ไลบรารีนี้ในแบบส่วนตัวหรือในการเผยแพร่แบบโอเพนซอร์สอื่น ๆ แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน