OPEN-SOURCE SCRIPT

Middle Finger Trading Strategy

7 441
Strategy Logic Summary:

Identify Huge Volume: Finds a bar ([1] - the previous bar) where volume is significantly higher (activeHugeVolMultiplier) than the recent average volume (avgVolume[1]). The average calculation excludes specific times (RTH edges, certain ETH).

Confirm Volume Drop: Checks if the current bar's ([0]) volume is lower than the previous bar's huge volume (volume < volume[1]).

Determine Trend Before Spike: Looks at the close two bars ago (close[2]) relative to the SMA two bars ago (priceSma[2]) to determine the trend before the huge volume bar.

Entry Signal (Base):
Long: Bearish trend before spike + Huge Volume on prev bar + Volume drop on current bar.

Short: Bullish trend before spike + Huge Volume on prev bar + Volume drop on current bar.

Time Filter: Optionally filters out entries during the first/last 15 mins of RTH and always filters specific ETH/pre-market times.

Entry Execution:
If a Long signal occurs and no position is open, place a limit order to buy at the low of the huge volume bar (low[1]).

If a Short signal occurs and no position is open, place a limit order to sell at the high of the huge volume bar (high[1]).

Order Processing: process_orders_on_close=false means limit orders can potentially be filled intra-bar if the price touches the limit level during the bar's formation.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.