OPEN-SOURCE SCRIPT
GemScope Signals

## 📊 GemScope Signals – Strategy Summary
This is an **automated trading strategy (Pine Script v5)** designed to trade market trends using a **custom GemScope oscillator**, **EMA trend filter**, **risk control**, and **multi-level take profit system**.
---
### 🔹 Trading Modes
* **Long Only**
* **Short Only**
* **Both Long & Short**
---
### 🔹 Entry Logic
**Long Trades**
* No active long position
* Entry allowed (not in cool-down after stop loss)
* GemScope shows **bullish trend (bull > bear)**
* If EMA filter is enabled: **price must be above EMA 200**
**Short Trades**
* No active short position
* Entry allowed
* GemScope gives **bearish signal (bull < bear)**
---
### 🔹 Exit Logic
* Positions close on **opposite GemScope signals**
* Short positions also close when:
* EMA filter is enabled
* Price moves above EMA
* Trend turns bullish
---
### 🔹 Stop Loss System
* **Percentage-based stop loss** for both long and short trades
* After a stop loss:
* New entries are blocked
* Trading resumes only after a fixed number of candles (cool-down)
---
### 🔹 Take Profit System (Partial Exits)
* Up to **three take-profit levels (TP1, TP2, TP3)**
* Each TP has:
* Independent price distance (%)
* Independent position size to close (%)
* Helps lock profits gradually while keeping runners open
---
### 🔹 Trend & Visuals
* Candles turn **green in bullish trend** and **red in bearish trend**
* **EMA 200** is plotted for trend confirmation
* Chart signals:
* **“G”** → Long signal
* **“S”** → Short signal
---
### 🔹 Risk & Money Management
* Uses **100% of account equity per trade**
* **No pyramiding** (one trade at a time)
* Built-in protection against over-trading after losses
---
### 🔹 Overall Purpose
The strategy aims to:
* Trade only in **confirmed trends**
* Reduce false entries using EMA filtering
* Protect capital with stop loss and cool-down
* Maximize profits using **structured partial exits**
This is an **automated trading strategy (Pine Script v5)** designed to trade market trends using a **custom GemScope oscillator**, **EMA trend filter**, **risk control**, and **multi-level take profit system**.
---
### 🔹 Trading Modes
* **Long Only**
* **Short Only**
* **Both Long & Short**
---
### 🔹 Entry Logic
**Long Trades**
* No active long position
* Entry allowed (not in cool-down after stop loss)
* GemScope shows **bullish trend (bull > bear)**
* If EMA filter is enabled: **price must be above EMA 200**
**Short Trades**
* No active short position
* Entry allowed
* GemScope gives **bearish signal (bull < bear)**
---
### 🔹 Exit Logic
* Positions close on **opposite GemScope signals**
* Short positions also close when:
* EMA filter is enabled
* Price moves above EMA
* Trend turns bullish
---
### 🔹 Stop Loss System
* **Percentage-based stop loss** for both long and short trades
* After a stop loss:
* New entries are blocked
* Trading resumes only after a fixed number of candles (cool-down)
---
### 🔹 Take Profit System (Partial Exits)
* Up to **three take-profit levels (TP1, TP2, TP3)**
* Each TP has:
* Independent price distance (%)
* Independent position size to close (%)
* Helps lock profits gradually while keeping runners open
---
### 🔹 Trend & Visuals
* Candles turn **green in bullish trend** and **red in bearish trend**
* **EMA 200** is plotted for trend confirmation
* Chart signals:
* **“G”** → Long signal
* **“S”** → Short signal
---
### 🔹 Risk & Money Management
* Uses **100% of account equity per trade**
* **No pyramiding** (one trade at a time)
* Built-in protection against over-trading after losses
---
### 🔹 Overall Purpose
The strategy aims to:
* Trade only in **confirmed trends**
* Reduce false entries using EMA filtering
* Protect capital with stop loss and cool-down
* Maximize profits using **structured partial exits**
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.