PaBuy/PaSell + EMA 11 + RSI + H1/H4 Filter

960
Here is a clear and professional technical explanation of your trading strategy system in English. You can use this documentation for your records, code comments, or presentations.

---

## 📈 System Architecture & Logic Overview

This automated strategy is a **Multi-Timeframe Trend-Following and Price Action System** designed for lower timeframes (such as M5). It combines **High Timeframe (HTF) directional bias**, **moving average trend alignment**, **RSI momentum filtering**, and **candlestick Price Action entry triggers** with strict risk management.

---

### 1. High Timeframe (HTF) Trend Filter

To ensure trades are executed only in the direction of the dominant market trend, the system checks the closed candles of higher timeframes (**H1** and **H4**):

* **Sell Condition:** The previous closed candles on **both H1 and H4** must be **Bearish (Red)** (`Close < Open`).
* **Buy Condition:** The previous closed candles on **both H1 and H4** must be **Bullish (Green)** (`Close > Open`).

---

### 2. Lower Timeframe Indicators (M5)

The system uses two key indicators on the execution timeframe:

* **EMA 11 (Exponential Moving Average):**
* **Sell:** Price must close **below** EMA 11.
* **Buy:** Price must close **above** EMA 11.


* **RSI 14 (Relative Strength Index):**
* **Sell Filter:** RSI must be **below 45** (indicating strong downward momentum).
* **Buy Filter:** RSI must be **above 55** (indicating strong upward momentum).



---

### 3. Price Action (PA) Trigger

Entry signals are generated when specific 2-candle Price Action patterns occur:

* **PaSell (Sell Trigger):**
1. Current candle is **Red** (`Close < Open`).
2. Previous candle is **Red** (`Close[1] < Open[1]`).
3. Current Close is **lower** than the previous Close (`Close < Close[1]`).


* **PaBuy (Buy Trigger):**
1. Current candle is **Green** (`Close > Open`).
2. Previous candle is **Green** (`Close[1] > Open[1]`).
3. Current Close is **higher** than the previous Close (`Close > Close[1]`).



---

### 4. Entry Rules Summary

#### 🔴 Short / Sell Order

Executes when **ALL** of the following conditions are met simultaneously:

1. **H1 & H4 Bias:** Previous H1 candle is Red **AND** previous H4 candle is Red.
2. **Trend & Momentum:** Price is below EMA 11 **AND** RSI (14) < 45.
3. **Execution Pattern:** **PaSell** pattern forms on M5.

#### 🟢 Long / Buy Order

Executes when **ALL** of the following conditions are met simultaneously:

1. **H1 & H4 Bias:** Previous H1 candle is Green **AND** previous H4 candle is Green.
2. **Trend & Momentum:** Price is above EMA 11 **AND** RSI (14) > 55.
3. **Execution Pattern:** **PaBuy** pattern forms on M5.

---

### 5. Risk Management (SL / TP)

* **Stop Loss (SL):**
* **Sell:** Placed at the highest high of the last 2 candles (`max(High, High[1])`) + Buffer points.
* **Buy:** Placed at the lowest low of the last 2 candles (`min(Low, Low[1])`) - Buffer points.


* **Take Profit (TP):** Calculated dynamic Take Profit based on a customizable **Risk-to-Reward (R:R) ratio** (e.g., 1 : 1.5).

---

If you need to add this explanation as code documentation (block comments) inside your Pine Script file, let me know!

כתב ויתור

המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.