OPEN-SOURCE SCRIPT
Strategy_501 de FranPineda

**Strategy_501 de FranPineda**
Strategy_501 is a New York session liquidity-based strategy built around a predefined 3-hour range.
The model first creates a range from **06:00 to 08:59 New York time**. Once that range is completed, the strategy starts tracking the highest high and the lowest low formed by the M5 candles after the range closes.
The active entry window runs from **09:00 to 12:30 New York time**.
The strategy does not enter immediately after a liquidity sweep. Instead, it waits for price to take one side of the 3-hour range and then places a pending stop order at the opposite post-range extreme.
For a **long setup**, price must first take the low of the 3-hour range. After that, the strategy places a buy stop order at the highest M5 high formed after the range close. The stop loss is placed below the lowest M5 low formed after the range close, with a configurable buffer.
For a **short setup**, price must first take the high of the 3-hour range. After that, the strategy places a sell stop order at the lowest M5 low formed after the range close. The stop loss is placed above the highest M5 high formed after the range close, with a configurable buffer.
The take profit is always calculated using a fixed **1:1 risk-to-reward ratio**. It is not limited to the opposite side of the 3-hour range. If the opposite range level is not far enough to provide a full 1R target, the take profit is extended until the 1:1 RR level is reached.
If no entry is triggered before **12:30 New York time**, the pending setup is cancelled and the strategy waits for the next trading day.
If a trade is still open at **16:00 New York time**, the stop loss is moved to break even.
**Core logic:**
* 3-hour New York range: 06:00–08:59 NY.
* Entry window: 09:00–12:30 NY.
* Liquidity sweep of the range high or low.
* Pending stop entry at the opposite post-range M5 extreme.
* Stop loss beyond the post-range extreme with buffer.
* Take profit always at 1:1 RR.
* Break even rule at 16:00 NY.
* One trade maximum per day.
* Designed for the M5 timeframe.
The purpose of this strategy is to study how price behaves after taking liquidity from a key intraday range and whether a later breakout of the post-range structure can offer a cleaner continuation toward a fixed 1R target.
Strategy_501 is a New York session liquidity-based strategy built around a predefined 3-hour range.
The model first creates a range from **06:00 to 08:59 New York time**. Once that range is completed, the strategy starts tracking the highest high and the lowest low formed by the M5 candles after the range closes.
The active entry window runs from **09:00 to 12:30 New York time**.
The strategy does not enter immediately after a liquidity sweep. Instead, it waits for price to take one side of the 3-hour range and then places a pending stop order at the opposite post-range extreme.
For a **long setup**, price must first take the low of the 3-hour range. After that, the strategy places a buy stop order at the highest M5 high formed after the range close. The stop loss is placed below the lowest M5 low formed after the range close, with a configurable buffer.
For a **short setup**, price must first take the high of the 3-hour range. After that, the strategy places a sell stop order at the lowest M5 low formed after the range close. The stop loss is placed above the highest M5 high formed after the range close, with a configurable buffer.
The take profit is always calculated using a fixed **1:1 risk-to-reward ratio**. It is not limited to the opposite side of the 3-hour range. If the opposite range level is not far enough to provide a full 1R target, the take profit is extended until the 1:1 RR level is reached.
If no entry is triggered before **12:30 New York time**, the pending setup is cancelled and the strategy waits for the next trading day.
If a trade is still open at **16:00 New York time**, the stop loss is moved to break even.
**Core logic:**
* 3-hour New York range: 06:00–08:59 NY.
* Entry window: 09:00–12:30 NY.
* Liquidity sweep of the range high or low.
* Pending stop entry at the opposite post-range M5 extreme.
* Stop loss beyond the post-range extreme with buffer.
* Take profit always at 1:1 RR.
* Break even rule at 16:00 NY.
* One trade maximum per day.
* Designed for the M5 timeframe.
The purpose of this strategy is to study how price behaves after taking liquidity from a key intraday range and whether a later breakout of the post-range structure can offer a cleaner continuation toward a fixed 1R target.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.