OPEN-SOURCE SCRIPT

Link Short Strategy - Short

Hello everyone.

My strategy is only for LINK/USDT based on a grid bot strategy that can be found on a traditional exchange such as: Bitget, Bybit, Bingx...

I've customized it.

### Pine Script strategy summary:

1. **General description:**
- The strategy uses crosses between an **EMA (exponential moving average)** and a **SMA (simple moving average)** to identify short trading opportunities.
- It is active between specific price ranges defined for each segment (LongRange and ShortRange).

2. **Indicators:**
- **EMA9**: Exponential moving average over 13 periods (configurable).
- SMA6**: Simple moving average over 5 periods (configurable).

3. Position logic:** **Short Entry
- Short Entry** :
- Condition: EMA crossing under SMA (**emaCrossSmaDown**) when price is between `ShortRangeLow` and `ShortRangeHigh`.
- A **short** position is opened with `strategy.entry(“Short”, strategy.short)`.
- Long Exit**:
- Inverse condition (EMA crossing above SMA) when price is between `LongRangeLow` and `LongRangeHigh`.
- Long positions are closed if in profit.

4. **Stop Loss (SL) management:**
- Each segment (1 to 5) has a **Stop Loss (SL)** level defined by adding a fixed margin of 0.5 to the `LongRangeLow` level:
- Example: `slLevel = LongRangeLow + 0.5`.
- The **SL** applies only if the position has been opened between the defined ranges (`ShortRangeLow` and `ShortRangeHigh`).

5. **Display:**
- The EMA9 and SMA6 indicators are plotted on the chart for clear visualization.
- Price ranges (ShortRange and LongRange) are also plotted, with distinct colors for each segment.

6. **Multiple segments:**
- The strategy is repeated for 5 distinct price ranges (segmented into ShortRange and LongRange):
- Segment 1: LongRangeHigh = 11.13, ShortRangeHigh = 12.00.
- Segment 2: LongRangeHigh = 13.70, ShortRangeHigh = 14.85.
- Segment 3 : LongRangeHigh = 17.38, ShortRangeHigh = 19.10.
- Segment 4 : LongRangeHigh = 23.70, ShortRangeHigh = 25.75.
- Segment 5 : LongRangeHigh = 28.50, ShortRangeHigh = 30.40.

7. **Activation dates:**
- The strategy is active only between August 5, 2024 and September 1, 2026.

---

### Highlights :
- Well-integrated **Stop Loss** management to minimize losses.
- Visualization of price ranges facilitates analysis.
- The logic is replicable for several segments, making the strategy adaptable to different market ranges.

### Suggested improvements:
- **Take Profit (TP)**: Add TP levels to automate profit-taking.
- Additional filtering**: Use other indicators to confirm signals (e.g. RSI or MACD).
- Optimization**: Test different lengths for EMAs and SMAs to maximize performance.
educationalVolatilityVolume

Script de código abierto

Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?

Exención de responsabilidad