OPEN-SOURCE SCRIPT

Cycle Buy-Sell

124
This is just for the 4-year market cycle highs and lows for those who are buying and hodling but still want to take profits each cycle. Buy and sell rules are as follows:

### **📊 Buy & Sell Signal Conditions Summary**

---

### **✅ Buy Signal Conditions (`▲` Buy Signal)**
A **buy signal** is triggered when **any** of the following conditions are met:

#### **1️⃣ Standard Buy Condition (Momentum-Based)**
✅ **55 SMA is Below the 220 SMA** (`ma1 < ma2`)
- Confirms that the market is in a **longer-term downtrend** before considering a buy.

✅ **RSI is Below 30** (`rsi < 30`)
- Signals that the asset is **oversold** and could be due for a reversal.

✅ **Stochastic RSI K is Below 25** (`stoch_k < 25`)
- Indicates **extreme bearish momentum**, often preceding a bounce.

✅ **Money Flow Index (MFI) is Below 30** (`mfi < 30`)
- Suggests **weak buying pressure**, often seen at market bottoms.

✅ **Volume is Above 1.2x the 20-Period Moving Average** (`highVolume`)
- Confirms that the buy signal occurs **during strong market participation** to reduce false signals.

---

#### **2️⃣ 1400 SMA Cross Buy Condition (Cycle-Based)**
✅ **Price Crosses Below the 1400 SMA** (`ta.crossunder(close, ma4)`)
- Signals a **potential long-term accumulation opportunity**.
- **Triggers a separate buy signal**, independent of other conditions.

---

### **📉 Sell Signal Conditions (`▼` Sell Signal)**
A **sell signal** is triggered when **any** of the following conditions are met:

#### **1️⃣ Standard Sell Condition (Momentum-Based)**
✅ **55 SMA is Above the 220 SMA** (`ma1 > ma2`)
- Confirms that the market is in a **longer-term uptrend** before considering a sell.

✅ **RSI is Above 70** (`rsi > 70`)
- Indicates that the asset is **overbought** and could be due for a correction.

✅ **Stochastic RSI K is Above 80** (`stoch_k > 80`)
- Signals **extreme bullish momentum**, often seen before a drop.

✅ **Money Flow Index (MFI) is Above 80** (`mfi > 80`)
- Suggests **strong buying pressure**, often occurring near market tops.

✅ **Volume is Above 1.2x the 20-Period Moving Average OR MVRV Z-Score > 2.5**
- `highVolume` = Volume is significantly above the average.
- `mvrvTop = mvrv > 2.5` (Suggests Bitcoin is overvalued based on historical trends).

---

#### **2️⃣ Pi Cycle Top Sell Condition (Cycle-Based)**
✅ **Pi Cycle Top Signal Triggers (`piCycleTop`)**
- `piCycleTop = ta.crossover(ma111, ma350x2)`
- **Overrides all other conditions and forces a sell signal**.
- Historically aligns with **major cycle tops in Bitcoin**.

---

### **📝 Summary of Buy & Sell Conditions**
📍 **A Buy (`▲`) is triggered when**:
- **Momentum-based buy conditions** (RSI, Stoch RSI, MFI, Volume, SMA) are met.
- **OR the price crosses below the 1400 SMA** (Separate buy signal).

📍 **A Sell (`▼`) is triggered when**:
- **Momentum-based sell conditions** (RSI, Stoch RSI, MFI, Volume, SMA, MVRV) are met.
- **OR the Pi Cycle Top is triggered** (Forces a sell).

🚀 **Your strategy now integrates both short-term momentum signals and long-term cycle analysis!** Let me know if you need refinements. 🎯

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน