Levels + Next Boundaries (5m/15m/1H)for polymarket 5 min / 15 min / 1h markets for polymarket 5 min / 15 min / 1h markets Penunjuk Pine Script®oleh Haseab0
Gap % Display and Gap/20ADR-Created an indicator that displays Gap% of the day after not seeing one immediately -Also added the Gap value divided by the 20ADR to give you an idea of how significant the size of the gap is -Is my first script so please reach out with suggestions or correctionsPenunjuk Pine Script®oleh erkdajerrkk2
WatermarkThe Watermark indicator displays a customizable text watermark on the chart along with symbol information. It is a utility tool for chart branding, presentations, and screenshots. █ USAGE The indicator places a multi-line text table on the chart displaying: • The current symbol name and exchange • The current timeframe • A customizable text line for branding or notes The watermark is positioned as a non-intrusive overlay that does not interfere with price action visibility while providing consistent branding across all chart views. █ SETTINGS • Watermark Text: Custom text to display (e.g., your brand name or trading group). • Text Color: Color of the watermark text. • Text Size: Size of the displayed text. • Position: Placement on the chart (top-left, top-right, bottom-left, bottom-right, center). This is a visual utility indicator with no analytical function. It does not generate signals or constitute financial advice. Penunjuk Pine Script®oleh lost_sol_0
PVSRA Volume TrendThe PVSRA Volume Trend indicator combines PVSRA (Price Volume Spread Range Analysis) volume classification with a dual-MA volume trend system. Each bar is classified into tiers by its relative volume, while two smoothed moving averages (fast and slow) applied to volume reveal whether overall market participation is increasing or declining — similar to how dual-MA crossover systems work on price, but applied to volume. When the volume trend is enabled, normal (non-vector) bars adopt a lightened shade of the current trend direction color, so even bars with unremarkable volume communicate whether participation is rising or falling. This integration of PVSRA classification with volume trend direction in a single indicator provides both spike detection and trend context without requiring a separate trend tool. █ USAGE Volume Classification (PVSRA) Each bar is classified into one of four categories based on how its volume compares to the rolling average: • Extreme (Climax): Volume exceeds 500% of the average. These bars often indicate institutional activity or significant market events. Colored distinctly (default: yellow) for immediate visibility. • Peak (Above Average): Volume exceeds 200% of the average, OR the product of candle spread × volume is the highest in the lookback period. Notable activity that may signal the beginning of a larger move. • Rising: Volume exceeds 150% of the average. Above-normal activity worth monitoring. • Normal: Volume within the expected range. When Volume Trend is enabled, normal bars are colored with a lightened version of the current trend color (bull or bear). When disabled, they use a neutral gray. Volume Trend (Dual MA) Two moving averages are calculated on volume: a fast SMMA (default: 50 periods) and a slow SMMA (default: 100 periods), each smoothed with an additional EMA(10) pass. When the fast MA is above the slow MA, volume is trending up — market participation and interest are increasing. When below, volume is trending down. A colored ribbon fill between the two lines makes the trend direction immediately visible. The volume trend provides context that PVSRA classification alone does not: a 200% volume spike during an overall rising volume trend has different implications than the same spike during declining participation. By displaying both layers simultaneously, the indicator answers two questions at once — "Is this bar significant?" (PVSRA classification) and "Is overall participation increasing or decreasing?" (volume trend). Volume Moving Average An optional single moving average line (default: 20 periods) can be displayed as a reference level. This provides a simple visual baseline for judging whether current volume is above or below its recent average. Candle Coloring When enabled, chart candles are colored according to their volume classification tier. Vector candles (150%+) use their tier color regardless of trend. Normal candles adopt the lightened trend color when Volume Trend is active, providing directional context on every bar. Binance PERP Volume Override For crypto symbols, the indicator can automatically pull volume data from the Binance perpetual contract instead of the current chart's exchange. This is useful when analyzing spot charts but wanting the more active futures volume data, or for normalizing volume across exchanges. If the Binance perp ticker is unavailable, it falls back to the chart's native volume data automatically. Alerts Built-in alert conditions include: • Volume Trend direction changes (turned up / turned down) • Any vector candle (150%+) • Tier-specific alerts: Extreme (500%), Peak (200%), Rising (150%) • Directional tier alerts: Bullish or bearish variants for each tier █ DETAILS PVSRA Classification Volume is compared against a Simple Moving Average over the configurable lookback period (default: 20 bars). The ratio of current volume to average volume determines the tier. The Peak (200%) tier has a dual condition: it triggers either when volume exceeds 200% of the average OR when the product of candle spread (high − low) × volume exceeds the highest such product in the lookback period. This spread×volume condition captures high-impact bars where a wide spread consumed significant volume, even if raw volume alone didn't reach 200%. Volume Trend Calculation Each MA uses a two-stage smoothing pipeline: 1 — A Smoothed Moving Average (SMMA) is calculated recursively: SMMA = (prev_SMMA × (length − 1) + source) / length 2 — An EMA with a fixed period of 10 is applied to the SMMA output This SMMA+EMA combination produces a smoother line than either method alone, reducing whipsaws in the trend signal while remaining responsive to genuine shifts in volume participation. The fast MA (default: 50) responds more quickly to volume changes; the slow MA (default: 100) establishes the baseline. The crossover determines trend direction. Trend-Integrated Normal Bar Coloring When Volume Trend is enabled, normal (non-vector) volume bars use a lightened version of the current trend color. The lightening is computed by blending each RGB channel 60% toward white: lightened_channel = channel + (255 − channel) × 0.6. This produces a pastel variant that is visually distinct from vector candle colors while still communicating the prevailing volume direction. Binance PERP Override The perpetual ticker is constructed as "BINANCE:" + basecurrency + quotecurrency + ".P". Volume, high, low, close, and open are all fetched from this ticker via request.security(). If the security call returns na (ticker unavailable), all values fall back to the chart's native data, ensuring the indicator never displays blank output. █ SETTINGS Instrument Override • Use Binance PERP Volume: Automatically fetch volume from the equivalent Binance perpetual contract (crypto only). • Force Override Symbol: Manually specify any ticker for volume data. Candle Colours • Set PVSRA candle colours on chart: Color chart candles by volume tier. • 500% / 200% / 150% / Normal Colors: Customizable bull and bear colors for each tier. Volume Moving Average • Show Volume MA: Toggle the single MA reference line. • MA Length: Period for the volume moving average (default: 20). • MA Color / Line Width: Visual customization. Volume Trend • Show Volume Trend: Toggle the dual-MA trend system and ribbon fill. • Fast MA Length: Period for the fast SMMA (default: 50). • Slow MA Length: Period for the slow SMMA (default: 100). • Bull / Bear Color: Colors for the trend lines and ribbon fill. • Fill Transparency: Controls the opacity of the ribbon fill between the two MAs (default: 50). █ METHODOLOGY PVSRA is a known volume classification approach. The source code is protected because it contains the specific implementation of: (1) The tiered classification logic with the dual-condition Peak tier (200% volume OR highest spread×volume in the lookback). (2) The volume trend dual-MA system using a two-stage SMMA→EMA(10) pipeline on both fast and slow MAs with ribbon fill and crossover-based trend determination. (3) The trend-integrated normal bar coloring that blends each RGB channel 60% toward white to produce pastel variants of the current trend color for non-vector bars. (4) The Binance PERP volume override with programmatic ticker construction and automatic fallback. (5) The comprehensive alert system covering trend direction changes and all tier/direction combinations. This indicator measures relative volume and volume trend direction. It does not predict price direction. Volume classification thresholds are fixed and may not suit all market conditions. It does not constitute financial advice. Penunjuk Pine Script®oleh lost_sol_1
SWLib_SignalsLibrary "SWLib_Signals" checkPivotCross_Anlik(sysEn, lvlEn, active, inPos, pVal) Parameters: sysEn (bool) : Pivot system active lvlEn (bool) : This level active active (bool) : This pivot active (reactivated) inPos (bool) : Already entered from this pivot pVal (float) : Pivot price value Returns: Pivot triggered checkPivotCross_MumKapanisi(sysEn, lvlEn, active, inPos, pVal, isLong) Parameters: sysEn (bool) lvlEn (bool) active (bool) inPos (bool) pVal (float) isLong (bool) checkPivotReactivate(sysEn, pVal, isLong) Parameters: sysEn (bool) pVal (float) isLong (bool) checkPivotCross(mode, sysEn, lvlEn, active, inPos, pVal, isLong) Parameters: mode (string) : 'Anlık' (Instant) or 'Mum Kapanışı' (Bar Close) sysEn (bool) lvlEn (bool) active (bool) inPos (bool) pVal (float) isLong (bool) Returns: Pivot triggered f_calcMACD(cfg, flagsL, flagsS) Parameters: cfg (MACDConfig) : MACD configuration flagsL (MACDTrigFlags) : Long trigger flags flagsS (MACDTrigFlags) : Short trigger flags Returns: allowSignal(enabled, src, lvl, rule) Parameters: enabled (bool) : Filter active src (float) : Source value lvl (float) : Comparison level rule (string) : 'Altında Engelle' (Block Below) or 'Üstünde Engelle' (Block Above) Returns: true = signal allowed allowPriceSignal(enabled, line, rule) Parameters: enabled (bool) line (float) rule (string) allowZoneSignal(enabled, zoneSrc) Parameters: enabled (bool) zoneSrc (float) : >= 0.5 means zone is active (entry allowed) Returns: true = signal allowed allowLineRangeDual(enabled, lineLevel, pctAbove, pctBelow, modeAbove, modeBelow) Parameters: enabled (bool) : Filter active lineLevel (float) : Line price level pctAbove (float) : Above % threshold pctBelow (float) : Below % threshold modeAbove (string) : 'Eşik İçi' (Inside) or 'Eşik Dışı' (Outside) modeBelow (string) : 'Eşik İçi' (Inside) or 'Eşik Dışı' (Outside) Returns: true = signal allowed blockPass(mode, e1, p1, e2, p2, e3, p3, eZ, pZ) Parameters: mode (string) : 'AND' or 'OR' e1 (bool) : Blocker 1 enabled p1 (bool) : Blocker 1 passed e2 (bool) : Blocker 2 enabled p2 (bool) : Blocker 2 passed e3 (bool) : Blocker 3 enabled p3 (bool) : Blocker 3 passed eZ (bool) : Zone enabled pZ (bool) : Zone passed Returns: true = signal allowed checkSignalInstant(use, src) Parameters: use (bool) : Source active src (float) : Source value (0 = no signal) Returns: true = signal exists detectTick(use, currentVal, lastVal, prevBarVal) Parameters: use (bool) : Source active currentVal (float) : Current source value lastVal (float) : Last recorded value (held with varip) prevBarVal (float) : Previous bar value (src ) Returns: true = new signal tick detected zoneOrCombine(enableArray, passArray) Parameters: enableArray (array) : bool array: Active states passArray (array) : bool array: Pass results Returns: true = all filters passed (or none active) ppZoneBlock(blockEnable, blockMode, inZone, checkSide) Parameters: blockEnable (bool) : Block active blockMode (string) : 'Long', 'Short', 'Her İkisi' (Both) inZone (bool) : Is in zone (src >= 0.5) checkSide (string) : 'Long' or 'Short' - checked direction Returns: true = signal BLOCKED anySignalActive(signals) Parameters: signals (array) : array: 7 signal slots + pivot + MACD latch results Returns: true = at least one signal active finalTrigger(rawTrigger, blockPassResult, zoneCombined, pivotDistPass, ppZoneBlocked) Parameters: rawTrigger (bool) : Raw signal (before filters) blockPassResult (bool) : BlockPass result zoneCombined (bool) : Zone OR combination pivotDistPass (bool) : Pivot distance filter ppZoneBlocked (bool) : PP zone blocked Returns: true = signal valid (all filters passed) MACDConfig Fields: oscType (series string) fast (series int) slow (series int) sig (series int) sigType (series string) l1 (series float) l2 (series float) l3 (series float) l4 (series float) l5 (series float) MACDTrigFlags Fields: crossUP (series bool) crossDN (series bool) ml1U (series bool) ml1D (series bool) ml2U (series bool) ml2D (series bool) ml3U (series bool) ml3D (series bool) ml4U (series bool) ml4D (series bool) ml5U (series bool) ml5D (series bool) sl1U (series bool) sl1D (series bool) sl2U (series bool) sl2D (series bool) sl3U (series bool) sl3D (series bool) sl4U (series bool) sl4D (series bool) sl5U (series bool) sl5D (series bool) SignalSlot Fields: use (series bool) src (series float) srcPrice (series float) BlockerConfig Fields: enable (series bool) src (series float) level (series float) rule (series string) LineBlockerConfig Fields: enable (series bool) src (series float) pctAbove (series float) pctBelow (series float) modeAbove (series string) modeBelow (series string) ZoneBlocker Fields: enable (series bool) src (series float)Perpustakaan Pine Script®oleh SwSpace0
SWLib_VisualLibrary "SWLib_Visual" drawEntryLabel(isLong, barIdx, priceY, txt, bgCol, txtCol, sz) Parameters: isLong (bool) : Is Long barIdx (int) : Bar index priceY (float) : Y axis price txt (string) : Label text bgCol (color) : Background color txtCol (color) : Text color sz (string) : Size string ('tiny', 'small', 'normal') Returns: Created label drawTPLabel(isLong, barIdx, price, tpNum, pnlStr, isDCA, col) Parameters: isLong (bool) : Is Long barIdx (int) : Bar index price (float) : TP price tpNum (int) : TP number (1, 2, 3) pnlStr (string) : PnL formatted string isDCA (bool) : Is DCA TP col (color) : TP color Returns: Created label drawSLLabel(isLong, barIdx, price, pnlStr, isTrailing, col) Parameters: isLong (bool) barIdx (int) price (float) pnlStr (string) isTrailing (bool) col (color) drawForceExitLabel(isLong, barIdx, price, pnlStr, col) Parameters: isLong (bool) barIdx (int) price (float) pnlStr (string) col (color) drawSwingLabel(fromLong, barIdx, price, pnlStr, col) Parameters: fromLong (bool) barIdx (int) price (float) pnlStr (string) col (color) drawLiqLabel(isLong, barIdx, liqPrice, col) Parameters: isLong (bool) barIdx (int) liqPrice (float) col (color) updateHLine(ln, barIdx, price, col, style, width) Parameters: ln (line) : Current line (if na, creates new) barIdx (int) : Start bar index price (float) : Price level col (color) : Line color style (string) : Line style width (int) : Line width Returns: Updated/Created line deleteLine(ln) Parameters: ln (line) : Line to delete deleteAllLines(grp) Parameters: grp (LineGroup) : Line group updateTPLines(grp, barIdx, tp1, tp2, tp3, colTP) Parameters: grp (LineGroup) : Current line group barIdx (int) : Start bar index tp1 (float) : TP1 price tp2 (float) : TP2 price (na if not drawn) tp3 (float) : TP3 price (na if not drawn) colTP (color) : TP color Returns: Updated line group updateSLLine(grp, barIdx, slPrice, colSL) Parameters: grp (LineGroup) barIdx (int) slPrice (float) colSL (color) updateAvgLine(grp, barIdx, avgPrice, colAvg) Parameters: grp (LineGroup) barIdx (int) avgPrice (float) colAvg (color) panelCell(tbl, row, txt, txtCol, bgCol, tipTxt) Parameters: tbl (table) : Table reference row (int) : Row number txt (string) : Content txtCol (color) : Text color bgCol (color) : Background color (optional) tipTxt (string) : Tooltip (optional) panelCellSimple(tbl, row, txt, txtCol, bgCol) Parameters: tbl (table) row (int) txt (string) txtCol (color) bgCol (color) pnlColor(pnl, posColor, negColor) Parameters: pnl (float) : PnL value posColor (color) : Positive color negColor (color) : Negative color Returns: Appropriate color sessionStatus(dateError, activeSession, sessionStarted) Parameters: dateError (bool) : Is there a date error activeSession (bool) : Is session active sessionStarted (bool) : Has session started Returns: drawPivotLines(pp, r1, r2, r3, s1, s2, s3, showPivots, colPP, colR, colS) Parameters: pp (float) : Pivot Point r1 (float) : Resistance 1 r2 (float) : Resistance 2 r3 (float) : Resistance 3 s1 (float) : Support 1 s2 (float) : Support 2 s3 (float) : Support 3 showPivots (bool) : Show/Hide colPP (color) : Pivot color colR (color) : Resistance color colS (color) : Support color Returns: void (lines updated) tpColor(tpNum, col1, col2, col3) Parameters: tpNum (int) : TP number (1, 2, 3) col1 (color) : TP1 color col2 (color) : TP2 color col3 (color) : TP3 color Returns: Selected color fade(col, transp) Parameters: col (color) : Color transp (int) : Transparency (0-100) Returns: Faded color stackY(stackCount, baseOffset) Parameters: stackCount (int) : Current stack count baseOffset (float) : Base offset value (h-l or mintick*50) Returns: Y axis offset safeOffset() VisualMarker Fields: txt (series string) bgColor (series color) txtColor (series color) sz (series string) LineGroup Fields: entryLine (series line) avgLine (series line) tp1Line (series line) tp2Line (series line) tp3Line (series line) slLine (series line) liqLine (series line) tsLine (series line) PanelTheme Fields: bgColor (series color) borderColor (series color) textPrimary (series color) textGreen (series color) textRed (series color) textYellow (series color) textBlue (series color) textOrange (series color) textCyan (series color)Perpustakaan Pine Script®oleh SwSpaceTelah dikemas kini 0
SWLib_CoreLibrary "SWLib_Core" f_pctToPrice(pct, basePrice) Parameters: pct (float) : Percentage value (e.g., 2.0 = 2%) basePrice (float) : Reference price Returns: Price difference f_pipsToPrice(pips, pipVal) Parameters: pips (float) : Number of pips (e.g., 100 pips) pipVal (float) : Price value of 1 pip (XAUUSD: 0.01) Returns: Price difference f_toPrice(value, basePrice, isForex, pipVal) Parameters: value (float) : Distance value (% or pip) basePrice (float) : Reference price (for percentage mode) isForex (bool) : Is Forex mode pipVal (float) : Pip value (for Forex mode) Returns: Price difference f_lotToNotional(lots, price, contractSize) Parameters: lots (float) : Lot amount (e.g., 0.01) price (float) : Instrument price contractSize (float) : Contract size (XAUUSD: 100) Returns: Position value in Dollars f_lotToMargin(lots, price, contractSize, leverage) Parameters: lots (float) : Lot amount price (float) : Price contractSize (float) : Contract size leverage (int) : Leverage Returns: Required margin (USD) f_calcFee(notional, useFee, feePercent) Parameters: notional (float) : Trade volume useFee (bool) : Is fee active feePercent (float) : Fee percentage Returns: Calculated fee f_calcAvgPrice(oldAvg, oldNotional, newPrice, newNotional) Parameters: oldAvg (float) : Current average price oldNotional (float) : Current position volume newPrice (float) : New entry price newNotional (float) : New entry volume Returns: New weighted average price f_multiplier(lvl, dcaMode) Parameters: lvl (int) : Current DCA level dcaMode (string) : DCA mode ('Adım', '2x', 'Kapalı', 'Seçim Adımlı') Returns: Multiplier value f_unrealizedPnL(isLong, avgPrice, totalNotional, currentPrice) Parameters: isLong (bool) : Long or Short avgPrice (float) : Average entry price totalNotional (float) : Total volume currentPrice (float) : Current price Returns: Unrealized PnL f_totalUnrealizedPnL(avgLongPrice, totalLongNotional, avgShortPrice, totalShortNotional, currentPrice) Parameters: avgLongPrice (float) totalLongNotional (float) avgShortPrice (float) totalShortNotional (float) currentPrice (float) f_liqPrice_Long(avgPrice, totalNotional, availableEquity) Parameters: avgPrice (float) : Long average price totalNotional (float) : Long total volume availableEquity (float) : Available equity (balance + realized PNL - fee - short margin) Returns: Estimated liquidation price f_liqPrice_Short(avgPrice, totalNotional, availableEquity) Parameters: avgPrice (float) : Short average price totalNotional (float) : Short total volume availableEquity (float) : Available equity Returns: Estimated liquidation price f_calcTPLevels_Long(avgPrice, tp1_pct, tp2_pct, tp3_pct) Parameters: avgPrice (float) : Average entry price tp1_pct (float) : TP1 percentage tp2_pct (float) : TP2 percentage tp3_pct (float) : TP3 percentage Returns: TPVisuals structure f_calcTPLevels_Short(avgPrice, tp1_pct, tp2_pct, tp3_pct) Parameters: avgPrice (float) : Average entry price tp1_pct (float) : TP1 percentage tp2_pct (float) : TP2 percentage tp3_pct (float) : TP3 percentage Returns: TPVisuals structure f_calcTPLevels_Long_Unified(avgPrice, tp1_val, tp2_val, tp3_val, isForex, pipVal) Parameters: avgPrice (float) : Average entry price tp1_val (float) : TP1 distance (% or pip) tp2_val (float) : TP2 distance tp3_val (float) : TP3 distance isForex (bool) : Is Forex (pip) mode pipVal (float) : Pip value (for Forex) Returns: TPVisuals structure f_calcTPLevels_Short_Unified(avgPrice, tp1_val, tp2_val, tp3_val, isForex, pipVal) Parameters: avgPrice (float) tp1_val (float) tp2_val (float) tp3_val (float) isForex (bool) pipVal (float) f_calcSL_Long(avgPrice, level, cfg, trailHigh) Parameters: avgPrice (float) level (int) cfg (SLConfig) trailHigh (float) f_calcSL_Short(avgPrice, level, cfg, trailLow) Parameters: avgPrice (float) level (int) cfg (SLConfig) trailLow (float) f_calcSL_Long_Unified(avgPrice, level, cfg, trailHigh, isForex, pipVal) Parameters: avgPrice (float) level (int) cfg (SLConfig) trailHigh (float) isForex (bool) : if true pip based, else % based pipVal (float) : Forex pip value (for Forex mode) Returns: tuple f_calcSL_Short_Unified(avgPrice, level, cfg, trailLow, isForex, pipVal) Parameters: avgPrice (float) level (int) cfg (SLConfig) trailLow (float) isForex (bool) pipVal (float) f_effectiveSL(isLong, slFixed, slTrail) Parameters: isLong (bool) : True if Long slFixed (float) : Fixed SL slTrail (float) : Trailing SL (can be na) Returns: Effective SL price f_calcEquity(walletBalance, totalRealizedPnL, latchedPnL_L, latchedPnL_S, unrealizedTotal) Parameters: walletBalance (float) totalRealizedPnL (float) latchedPnL_L (float) latchedPnL_S (float) unrealizedTotal (float) f_calcFreeMargin(equity, totalLongNotional, totalShortNotional, leverage) Parameters: equity (float) totalLongNotional (float) totalShortNotional (float) leverage (int) f_availableEquityForLiq(walletBalance, totalRealizedPnL, latchedPnL_L, latchedPnL_S, totalFees, useFee, otherSideNotional, leverage) Parameters: walletBalance (float) totalRealizedPnL (float) latchedPnL_L (float) latchedPnL_S (float) totalFees (float) useFee (bool) otherSideNotional (float) leverage (int) Returns: Available equity f_shouldForceFullExit(posNotional, exitAmount, leverage, minThreshold) Parameters: posNotional (float) : Current position volume exitAmount (float) : Amount to exit leverage (int) : Leverage minThreshold (float) : Minimum position size (USDT) Returns: true if full close required f_calcExitPnL(isLong, avgPrice, exitPrice, exitAmount) Parameters: isLong (bool) : Is Long avgPrice (float) : Average price exitPrice (float) : Exit price exitAmount (float) : Exit amount Returns: PnL value f_isApproachingSL(isLong, priceExtreme, slPrice, avgPrice, approachPct) Parameters: isLong (bool) : Is Long priceExtreme (float) : Low (Long) or High (Short) slPrice (float) : SL price avgPrice (float) : Average price approachPct (float) : Approach threshold percentage Returns: true if approaching f_isApproachingLiq(isLong, priceExtreme, liqPrice, avgPrice, approachPct) Parameters: isLong (bool) priceExtreme (float) liqPrice (float) avgPrice (float) approachPct (float) f_isApproachingSL_Unified(isLong, priceExtreme, slPrice, avgPrice, approachVal, isForex, pipVal) Parameters: isLong (bool) priceExtreme (float) slPrice (float) avgPrice (float) approachVal (float) isForex (bool) pipVal (float) f_isApproachingLiq_Unified(isLong, priceExtreme, liqPrice, avgPrice, approachVal, isForex, pipVal) Parameters: isLong (bool) priceExtreme (float) liqPrice (float) avgPrice (float) approachVal (float) isForex (bool) pipVal (float) f_forexUsedMargin(lots, price, contractSize, leverage) Parameters: lots (float) : Lot amount price (float) : Price contractSize (float) : Contract size leverage (int) : Leverage Returns: Used margin (USD) f_forexFreeMargin(equity, usedMarginL, usedMarginS) Parameters: equity (float) usedMarginL (float) usedMarginS (float) f_forexPnL(isLong, entryPrice, exitPrice, lots, contractSize, pipVal) Parameters: isLong (bool) : Is Long entryPrice (float) : Entry price exitPrice (float) : Exit price lots (float) : Lot amount contractSize (float) : Contract size pipVal (float) : Pip value Returns: PnL (USD) f_calcPivots(method, h, l, c) Parameters: method (string) : Pivot method ('Geleneksel', 'Fibonacci', 'Woodie', 'Camarilla') h (float) : Previous High l (float) : Previous Low c (float) : Previous Close Returns: f_getPrice(inlinePrice, currentClose) Parameters: inlinePrice (float) currentClose (float) f_stackOffset(h, l) Parameters: h (float) l (float) TPConfig Fields: tp1_pct (series float) tp1_port (series float) tp1_reverse (series bool) tp2_active (series bool) tp2_pct (series float) tp2_port (series float) tp3_active (series bool) tp3_pct (series float) tp3_port (series float) DCATPConfig Fields: tp1_pct (series float) tp1_port (series float) tp2_pct (series float) tp2_port (series float) tp3_pct (series float) tp3_port (series float) SLConfig Fields: l1_pct (series float) dca_pct (series float) useBE (series bool) be_act_pct (series float) be_offset_pct (series float) useTS (series bool) ts_act_pct (series float) ts_dev_pct (series float) PositionConfig Fields: baseAmount (series float) leverage (series int) maxLevel (series int) dcaMode (series string) selectionStep (series int) useFee (series bool) feePercent (series float) PositionState Fields: level (series int) signalCounter (series int) avgPrice (series float) lastEntryPrice (series float) totalNotional (series float) peakNotional (series float) pctLeft (series float) tpStage (series int) tpStageDCA (series int) accumulatedPnL (series float) TradeStats Fields: slCountWin (series int) slCountLoss (series int) liqCount (series int) maxDcaHit (series int) maxVol (series float) maxLoss (series float) grossLoss (series float) totalFees (series float) totalVolume (series float) tradeCount (series int) peakEquity (series float) maxDrawdown (series float) maxDrawdownPct (series float) currentDrawdownPct (series float) approachSL (series int) approachLiq (series int) TPVisuals Fields: tp1 (series float) tp2 (series float) tp3 (series float) SLState Fields: slFixed (series float) slTrail (series float) trailExtreme (series float) ForexConfig Fields: pipValue (series float) contractSize (series float) baseLot (series float) isForex (series bool)Perpustakaan Pine Script®oleh SwSpaceTelah dikemas kini 0
EMA 19/91 Cross + Candle Confirm + 91 Trend FilterSimple Average Strategy Gives signal to buy and sell u wukll get another warning no doubt but i cannot add alert untill it is publishedStrategi Pine Script®oleh boption4mzrj0
SWLib_AlertsLibrary "SWLib_Alerts" buildCode(action, cfg) Parameters: action (string) : Action code (e.g., 'ENTER-LONG', 'EXIT-SHORT', etc.) cfg (BotConfig) : Bot configuration Returns: Formatted code string buildMPTPSL(tpsl) Parameters: tpsl (AlertTPSL) : TP/SL configuration Returns: JSON string (,"takeProfits": ,"stopLoss":{...}) enterLong(cfg, amount, tpsl) Parameters: cfg (BotConfig) : Bot configuration amount (float) : Trade amount (USDT) tpsl (AlertTPSL) : TP/SL configuration (for MP mode, if na not added) Returns: JSON string enterShort(cfg, amount, tpsl) Parameters: cfg (BotConfig) : Bot configuration amount (float) : Trade amount (USDT) tpsl (AlertTPSL) : TP/SL configuration (for MP mode) Returns: JSON string exitLong(cfg) Parameters: cfg (BotConfig) : Bot configuration Returns: JSON string exitShort(cfg) Parameters: cfg (BotConfig) : Bot configuration Returns: JSON string exitLongPartial(cfg, totalNotional, pctClose) Parameters: cfg (BotConfig) : Bot configuration totalNotional (float) : Current total position volume pctClose (float) : Percentage to close (100 = full) Returns: JSON string exitShortPartial(cfg, totalNotional, pctClose) Parameters: cfg (BotConfig) : Bot configuration totalNotional (float) : Current total position volume pctClose (float) : Percentage to close Returns: JSON string buildTPSL_Normal(tp1_pct, tp1_port, tp2_pct, tp2_port, tp3_pct, tp3_port, sl_pct) Parameters: tp1_pct (float) tp1_port (float) tp2_pct (float) tp2_port (float) tp3_pct (float) tp3_port (float) sl_pct (float) buildTPSL_DCA(dca_tp1_pct, dca_tp1_port, dca_tp2_pct, dca_tp2_port, dca_tp3_pct, dca_tp3_port, dca_sl_pct) Parameters: dca_tp1_pct (float) dca_tp1_port (float) dca_tp2_pct (float) dca_tp2_port (float) dca_tp3_pct (float) dca_tp3_port (float) dca_sl_pct (float) selectTPSL(level, normalTPSL, dcaTPSL) Parameters: level (int) : Current DCA level normalTPSL (AlertTPSL) : Normal entry TP/SL dcaTPSL (AlertTPSL) : DCA entry TP/SL Returns: Appropriate AlertTPSL formatPnL(pnl) Parameters: pnl (float) : PnL value Returns: Formatted string formatPct(pct) Parameters: pct (float) : Percentage value Returns: Formatted string formatPrice(price) Parameters: price (float) : Price value Returns: Formatted string buildEntryLabel(isLong, level, price, amount, leverage) Parameters: isLong (bool) : Is Long level (int) : DCA level price (float) : Entry price amount (float) : Trade amount leverage (int) : Leverage Returns: (emoji) Level - price - amount buildTPLabel(isLong, tpNum, price, pnl, isDCA) Parameters: isLong (bool) : Is Long tpNum (int) : TP number (1, 2, 3) price (float) : Exit price pnl (float) : PnL value isDCA (bool) : Is DCA TP Returns: Formatted label string buildSLLabel(isLong, price, pnl, isTrailing) Parameters: isLong (bool) price (float) pnl (float) isTrailing (bool) buildForceExitLabel(isLong, price, pnl) Parameters: isLong (bool) price (float) pnl (float) buildSwingLabel(isLong, price, pnl) Parameters: isLong (bool) price (float) pnl (float) swb_secretPart(cfg) Parameters: cfg (SWBotConfig) swb_base(cfg, action) Parameters: cfg (SWBotConfig) : SWBot configuration action (string) : Action type ('BUY', 'SELL', 'CLOSE_LONG', etc.) Returns: JSON start swb_buy(cfg, lotSize, slPrice) Parameters: cfg (SWBotConfig) : SWBot configuration lotSize (float) : Lot amount slPrice (float) : SL price (if na, SL not added) Returns: JSON string swb_sell(cfg, lotSize, slPrice) Parameters: cfg (SWBotConfig) : SWBot configuration lotSize (float) : Lot amount slPrice (float) : SL price (if na, SL not added) Returns: JSON string swb_buy_tpsl(cfg, lotSize, slPips, tpPips) Parameters: cfg (SWBotConfig) lotSize (float) slPips (float) : SL distance (pips) tpPips (float) : TP distance (pips) Returns: JSON string swb_sell_tpsl(cfg, lotSize, slPips, tpPips) Parameters: cfg (SWBotConfig) lotSize (float) slPips (float) tpPips (float) swb_closeLong(cfg) Parameters: cfg (SWBotConfig) swb_closeShort(cfg) Parameters: cfg (SWBotConfig) swb_closeLongPartial(cfg, lotToClose) Parameters: cfg (SWBotConfig) lotToClose (float) : Lot amount to close swb_closeShortPartial(cfg, lotToClose) Parameters: cfg (SWBotConfig) lotToClose (float) swb_amendLong(cfg, slPrice, tpPrice) Parameters: cfg (SWBotConfig) slPrice (float) : New SL price tpPrice (float) : New TP price swb_amendShort(cfg, slPrice, tpPrice) Parameters: cfg (SWBotConfig) slPrice (float) tpPrice (float) swb_amendSLLong(cfg, slPrice) Parameters: cfg (SWBotConfig) slPrice (float) swb_amendSLShort(cfg, slPrice) Parameters: cfg (SWBotConfig) slPrice (float) swb_amendTrailingLong(cfg, slPrice) Parameters: cfg (SWBotConfig) slPrice (float) : SL price (broker trailing start point) swb_amendTrailingShort(cfg, slPrice) Parameters: cfg (SWBotConfig) slPrice (float) BotConfig Fields: exchangeName (series string) symbolInput (series string) botName (series string) tfStr (series string) botID (series string) useMultiPair (series bool) leverage (series int) AlertTPSL Fields: tp1_pct (series float) tp1_port (series float) tp2_pct (series float) tp2_port (series float) tp3_pct (series float) tp3_port (series float) sl_pct (series float) SWBotConfig Fields: licenseKey (series string) secretKey (series string) symbol (series string) pipValue (series float) contractSize (series float) useBrokerTPSL (series bool) useMultiPos (series bool)Perpustakaan Pine Script®oleh SwSpace0
Fourier Series Model of the Market v2In the FSMM script the scaling of the harmonics is with the base frequency. Although this may help to visualize the harmonics, in a mathematically correct manner quadrature scaling is by the harmonics frequencies. As the derivative is numerical, the difference is not always noticed, but to include it makes sense, also when the purpose is to visualize the short underlying trend of Hurst, which is the base plus the 2nd and 4th harmonic. The 3rd harmonic then serves as a diagnostic marker, if the M-shape does not appear properly then there may be a contribution from the 3rd harmonics. Typical setting is 55 for intruments that trade 5 days a week and 82 for 7 days a week (Crypto) Enjoy!Penunjuk Pine Script®oleh huub_j_m_degroot0
NY 11AM 4H Anchor - Correctedmarking 4 H levels to analyse Institutional ordersPenunjuk Pine Script®oleh The-Construction-Trader0
Killa CrossoverThe ultimate entry signal for all trades. Stoch and RSI cross combo.Penunjuk Pine Script®oleh thetradebrigade3
Volume Spike DotIndicator shows blue dot when volume increases 200% or more in last 20 candles. Can alter variables for more or less action.Penunjuk Pine Script®oleh laguna80Telah dikemas kini 9
Motivation BannerThis script adds motivational quotes at the top of your chart. It features a rotating larger quote and a smaller rotating quote below that. You can change the quotes in the code to display whatever you see fit. You can also change the session that it alters the quotes. Endless amount of quotes can be added. Helps to motivate you during trades! Penunjuk Pine Script®oleh BradburyITM14
FVG Mapper + FilterHTF FVG Mapper — Multi-Timeframe Imbalance Projection For some reason its not showing on the chart above, this site is a buggy mess sometimes, the UI is just the worst. This script detects Fair Value Gaps (FVGs) on a selectable higher timeframe (HTF) and projects them onto lower timeframes (such as 1-minute) as extended zones. While commonly used with the 4-hour chart, the timeframe is fully customizable, allowing traders to map imbalances from any higher timeframe onto their execution chart. What the Script Does Scans a user-defined higher timeframe using the classic 3-candle FVG model Identifies bullish and bearish imbalances (true displacement gaps) Allows full HTF selection (e.g., 1H, 4H, Daily, etc.) Filters out insignificant gaps using HTF ATR (optional size filter) Draws zones on the lower timeframe chart and extends them right Deletes zones once mitigated (if enabled) Limits the total number of active zones to reduce clutter Optionally removes zones far from current price Allows wick-based or body-based mitigation detection How Fair Value Gaps Are Defined Bullish FVG → Low of candle 3 is greater than High of candle 1 Bearish FVG → High of candle 3 is lower than Low of candle 1 This reflects displacement and temporary imbalance in auction delivery. Important: FVGs are confirmed only after the selected HTF candle closes to prevent repainting. Customisation Options Select the higher timeframe to scan (not restricted to 4H) Set maximum number of visible zones Enable/disable automatic deletion after mitigation Enable minimum size filtering using HTF ATR Adjust minimum gap size sensitivity Enable proximity filtering (show only zones near current price) Toggle wick-based vs body-based fill detection Adjust visual styling (colors, transparency) Intended Usage This indicator is designed for traders who: Trade lower timeframes but anchor bias to higher-timeframe structure Use HTF imbalances as reaction or continuation zones Look for confluence between liquidity sweeps and HTF inefficiencies Want structured multi-timeframe context without visual overload Typical Workflow Select a higher timeframe aligned with your bias (e.g., 4H or Daily) Identify active imbalances on your execution timeframe Wait for price to approach an HTF FVG Drop to lower timeframe structure for confirmation Execute with defined invalidation beyond the zone Important Context This indicator does not generate buy/sell signals It does not predict direction It visualizes higher-timeframe inefficiencies only Trade management and bias determination remain trader-dependent It is not a mechanical strategy. It is a multi-timeframe structural context tool designed to improve execution precision within higher-timeframe imbalance zones. Penunjuk Pine Script®oleh alcomehoTelah dikemas kini 9
Liquidity Confluence TerminalZero-Lag Liquidity Confluence System is a multi-timeframe trend alignment and execution planning indicator designed to highlight high-probability trade opportunities when higher timeframe structure agrees. The script evaluates Daily, Weekly, and Monthly candle bias to determine full directional confluence, only allowing signals when all three timeframes are aligned. A zero-lag EMA model provides responsive trend detection while minimizing delay, acting as the primary trigger mechanism. In addition, the system dynamically identifies volume-backed liquidity breakouts to establish adaptive supply and demand levels, which are then used for intelligent stop placement. When confluence and trigger conditions align, the indicator automatically generates a structured trade plan, including entry, stop loss, and take profit levels based on a configurable risk-to-reward ratio. A real-time dashboard displays higher timeframe bias, while visual glow and background cues emphasize alignment states. This tool is built for traders who prioritize structure, confirmation, and disciplined risk management over reactive signal chasing.Penunjuk Pine Script®oleh Bmillytookprof17
AI Gold Institutional Scalperworks Best on Gold (xausd/MGC) Built For 1 Minute timeframe Has Smart Trend Engine Liquidity break Detection Volume Confirmatone Atr Dynamic stop TP1 /TP2/ TP3 Penunjuk Pine Script®oleh VenusJTelah dikemas kini 11436
Winstons Multi-TF Highs/Lows & SessionsTells you the hourly draws, session highs and lows, and session timesPenunjuk Pine Script®oleh winstonwu11243
AI Pro Scalper work best on gold Build for 1 Minute time frame has smart trent engine Atr Dynamic Stop Tp1/ Tp2/ Tp3 alert ready Penunjuk Pine Script®oleh VenusJ54
Bitcoin Cost Of ProductionDescription This indicator estimates a Bitcoin “Cost Floor” proxy using network difficulty as a substitute for direct energy costs. The goal is not to compute real-world mining costs, but to display a structural cost-pressure baseline derived from on-chain and market data. The model is intentionally simple and uses two externally fitted parameters (alpha, k). No fitting is performed inside Pine. How the model works The cost proxy is defined as: Cost Floor = alpha ⋅ Difficulty^k / Issuance Inputs: • Difficulty (GLASSNODE:BTC_DIFFICULTY) • Issuance = Subsidy ⋅ Blocks Mined + Fees_BTC Parameters (fitted externally in Python): • alpha: scaling factor to map the proxy into price space (USD). • k: damping exponent on difficulty. This reduces the sensitivity of the model to long-term technological progress and efficiency gains in mining hardware. What the indicator displays • Smoothed Cost Floor (purple) • Cost Zone (purple zone): Cost × 1.2 • Raw Cost Floor (yellow, optional) How to use it This is not a timing tool. It provides a macro context for where price trades relative to a difficulty/issuance-based cost-pressure proxy. It may be useful for: • cycle context (stress vs relief regimes) • comparing price drawdowns against a structural baseline • studying long-term support behavior during miner stress phases Important notes • This indicator does not repaint. • This script is designed only for INDEX:BTCUSD. • It does not provide trading signals or financial advice.Penunjuk Pine Script®oleh jv_indicators62
Time-based Liquidity SessionsThis indicator plots the three primary index futures sessions (Asia, London, New York) using fixed Eastern Time windows to help traders visually track where liquidity is most likely to build and be attacked. The goal is not to mark exchange business hours, but to highlight behavioral time blocks where sweeps, displacement, and HTF inefficiency reactions statistically occur more often. Session Windows (ET): Asia: 18:00 – 03:00 Range construction, slower movement, sets highs/lows often targeted later. London: 03:00 – 12:00 Increased volatility, frequent raids on Asia range, early displacement. New York AM: 08:00 – 12:00 Highest probability window for liquidity sweeps, HTF FVG reactions, and expansion. New York PM: 12:00 – 17:00 Secondary continuation or controlled reversals, generally lower volatility than AM.Penunjuk Pine Script®oleh joshteal705
Blackout Outside Two Editable WindowsBlackout Outside Two Editable Windows This indicator visually restricts the trading day to two user-defined time windows by drawing blackout blocks over all other periods. The script allows traders to define: • Window 1 start and end time • Window 2 start and end time • Timezone (New York, UTC, or Exchange time) • Blackout transparency (solid or semi-transparent) • Number of historical days displayed All price action outside the selected windows is covered with vertical blackout boxes spanning the full chart height. Only the specified time ranges remain visible. Purpose This tool is designed to enforce session discipline and reduce overtrading by: • Isolating high-probability execution windows • Removing visual noise from overnight or low-liquidity periods • Structuring backtesting and replay around defined trade windows • Reinforcing rule-based trading behavior How It Works At the start of each new trading day (based on the selected timezone), the script calculates timestamp boundaries for: Midnight → Window 1 Start Window 1 End → Window 2 Start Window 2 End → End of Day It then draws solid background boxes covering those ranges. The two allowed windows remain unobstructed. Best Used For • Opening range breakout strategies • Session-based futures trading (GC, ES, NQ, etc.) • Prop firm rule enforcement • Replay-based execution training • Reducing emotional / impulsive trades outside plan Notes • Windows must occur in chronological order within the same day. • Designed for intraday timeframes. • Visual filter only — does not block strategy orders (unless added separately).Penunjuk Pine Script®oleh JRTrading_X1