OPEN-SOURCE SCRIPT

RSI Overbought and Oversold Levels - Mikel Vaquero

This Pine Script strategy is designed to trade using RSI (Relative Strength Index) overbought and oversold levels. Below is an overview of its functionality:

1. RSI Configuration
RSI Length: Calculates RSI with a customizable length (default is 14).
Key Levels: Includes overbought (70), oversold (30), and an optional middle level (50).
RSI Source: Uses the closing price by default, but it's adjustable.
2. Risk and Reward Parameters
Defines Stop Loss, Take Profit, and Partial Profit levels in pips, converted to the chart's price scale.
3. Trading Window
Operates only within a specific time window in GMT+2 (default: 8:00 to 11:00).
4. RSI Calculation and Conditions
Computes RSI based on price changes.
Detects two conditions:
Overbought: RSI crosses above level 70.
Oversold: RSI crosses below level 30.
5. Visual Representation
Plots RSI and key levels on the chart.
Displays labels when RSI reaches overbought ("B") or oversold ("S") conditions.
6. Alerts
Triggers automatic alerts when RSI crosses overbought or oversold levels.
7. Entry and Exit Management
Entry Conditions:
Long: When RSI is oversold.
Short: When RSI is overbought.
Exit Conditions:
Partial Take Profit: Closes 50% of the position at a predefined price level.
Full Take Profit: Closes the entire position upon reaching the full profit target.
Stop Loss: Closes the position if the price reverses by a defined amount.
Dynamic Breakeven: Moves the Stop Loss to the entry price after reaching the partial profit level.
8. State Management
Prevents duplicate entries in the same direction during an open position.
Strategy Summary
This strategy is ideal for trading within a specific time range using RSI signals. It dynamically manages positions with partial profits and breakeven adjustments, balancing simplicity and customization.

Feel free to adjust parameters such as RSI length, time windows, and pip values to suit your trading style.
OscillatorsRelative Strength Index (RSI)

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明