OPEN-SOURCE SCRIPT

Order Flow + Spread Proxy Prediction [Pine v6]

715
Order Flow + Spread Proxy Prediction [Pine v6] is a market microstructure-inspired indicator designed to estimate short-term directional pressure using TradingView-accessible OHLCV data. Since Pine Script does not normally provide full Level 2 order book depth, true bid-ask spread, tick-by-tick trade classification, or real aggressive buy and sell order flow, this script does not claim to measure institutional order flow directly. Instead, it builds a volume-price order-flow proxy model based on candle structure, volume behavior, close-location value, cumulative volume delta proxy, VWAP deviation, range-based spread risk, Amihud illiquidity, VPIN-like toxic flow risk, and liquidity confirmation. The model first estimates directional buying or selling pressure from candle body direction, close position within the bar, and volume distribution. It then measures whether that pressure is accumulating through a CVD slope proxy and adjusts the signal using VWAP positioning, liquidity conditions, spread risk, and toxicity risk. The final composite score is smoothed and converted into an estimated probability of upward price movement. A long signal is generated when the estimated upside probability exceeds the bullish threshold, the composite score is sufficiently positive, and the EMA trend filter confirms a bullish regime. A short signal is generated when the estimated upside probability falls below the bearish threshold, the composite score is sufficiently negative, and the EMA trend filter confirms a bearish regime. The indicator also includes background coloring, signal labels, VWAP and EMA plots, and a dashboard showing probability, composite score, OFI proxy, CVD score, VWAP score, spread risk, VPIN risk, and trend direction. This tool is best suited for liquid intraday markets such as BTC, ETH, major futures, and high-volume equities on short timeframes such as 1-minute, 3-minute, 5-minute, and 15-minute charts. It should be understood as a proxy-based microstructure indicator rather than a true order book or institutional flow system, and its signals should be used together with risk management, execution-cost awareness, and independent market judgment.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน