PROTECTED SOURCE SCRIPT

Strategi FVG 09:31 (Pro)

34
FVG 09:31 Strategy (Pro)
In short, this is an automated trading strategy (bot) for TradingView designed to execute buy or sell orders based on a Fair Value Gap (FVG) pattern. The strategy is highly specific, as it only triggers on the 1-minute timeframe and looks for an FVG that forms precisely at 09:32 AM New York time.

Main Purpose of the Strategy
The primary goal of this script is to identify and capitalize on short-term price imbalances, known as Fair Value Gaps (FVGs). It operates during a specific, high-volatility window right after the U.S. stock market opens, often referred to by traders as the "Silver Bullet" session. By automating the detection and execution, it aims to trade these fleeting opportunities with precision.

How the Strategy Works
The strategy follows a clear, step-by-step logical flow on your chart.

1. Time & Timeframe Restriction
1-Minute Timeframe: The strategy is hard-coded to work only on the 1-minute (1m) chart. A warning label will appear on your chart if you apply it to any other timeframe.

Specific Time Window: The core logic activates only between 09:32 and 09:33 AM New York time. It searches for an FVG pattern formed by the three candles from 09:29, 09:30, and 09:31, with the pattern confirmation happening on the close of the 09:31 candle.

2. Fair Value Gap (FVG) Detection
An FVG is a three-candle pattern that signals a price imbalance.

Bullish FVG (Potential Buy): Occurs when the low of the first candle is higher than the high of the third candle. The space between these two prices is the FVG zone.

Bearish FVG (Potential Sell): Occurs when the high of the first candle is lower than the low of the third candle. The space between these two prices is the FVG zone.

If this pattern is detected at the target time, the strategy draws a colored box on the chart to visualize the FVG zone (aqua for bullish, fuchsia for bearish).

3. Entry Logic
The strategy provides two user-selectable methods for entering a trade:

Retracement (Immediate Entry): The strategy will open a position with a market order as soon as the price retraces back into the identified FVG zone.

For a Bullish FVG, a Long (buy) position is opened when the price drops to touch the upper boundary of the FVG.

For a Bearish FVG, a Short (sell) position is opened when the price rises to touch the lower boundary of the FVG.

Limit Order (Pending Entry): The strategy places a pending limit order at the edge of the FVG zone.

For a Bullish FVG, a Buy Limit order is placed at the upper boundary of the FVG.

For a Bearish FVG, a Sell Limit order is placed at the lower boundary of the FVG.

Order Expiration: If the limit order is not filled within a specified number of candles (default is 15), it is automatically canceled to avoid chasing a stale setup.

4. Exit Logic
Once a position is active, the strategy automatically manages the exit by setting a Take Profit (TP) and Stop Loss (SL) level. You can choose between two types:

Ticks (Fixed Points): You define a fixed profit target and loss limit in ticks (the smallest price movement). For example, a 200-tick TP and a 100-tick SL.

Last Swing (Dynamic Levels): The TP and SL are set dynamically based on the most recent swing high or swing low.

For a Long position: Take Profit is set at the last swing high; Stop Loss is at the last swing low.

For a Short position: Take Profit is set at the last swing low; Stop Loss is at the last swing high.

5. Daily Management
At the start of each new trading day, the script performs a reset. All variables, including any FVG data from the previous day, are cleared. This ensures the strategy only acts on fresh signals from the current day and cancels any pending orders from the day before.

Explanation of Settings (Inputs)
Here is what each user-configurable setting does:

Entry Type: Choose your preferred entry method: Retracement or Limit Order.

Order Expiration (Candles): Applies only to the Limit Order type. Sets how many candles an unfilled order will remain active before being canceled.

Stop Loss Type: Choose Ticks for a fixed-distance stop loss or Last Swing for a dynamic level.

Take Profit Type: Choose Ticks for a fixed-distance profit target or Last Swing for a dynamic level.

Pivot Lookback (SL/TP Swing): Defines how many candles the script looks back to identify the most recent swing high/low for the Last Swing SL/TP type.

Contract Size: The quantity or lot size for each trade.

Take Profit (in Ticks): The profit target distance if using the Ticks type.

Stop Loss (in Ticks): The maximum loss distance if using the Ticks type.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.