OPEN-SOURCE SCRIPT
تم تحديثه

b1r1nc1 - AI Trade Strategy v1

RSI Entry Logic

In this script, you are going long when RSI crosses under 30. This means RSI has just moved below 30 from above (i.e., entering oversold territory). Typically, some traders prefer going long when RSI crosses above 30 (rebound from oversold). Your approach is contrarian—entering as soon as RSI becomes oversold. That may be intentional, but make sure it aligns with your trading logic.
Exit Logic

Similarly, you exit a long either when RSI crosses above 50 or the trend flips to bearish. You may want to experiment with different thresholds (e.g., RSI crossing back above 30 or 40) to see which performs best historically.
Stop/Take Profit

You used strategy.exit() with stop and limit parameters. This will submit both orders (stop and limit) at once. If you prefer the built-in stop_loss or profit_target approach, you could replace them. Both work well; it’s personal preference.
If you want to see your stop and TP lines drawn on the chart, you can use the optional plot(...) statements. They’ll appear only for active positions.
Trend Definition

You’re using a simple 50/200 SMA cross to define bullish/bearish. That’s a classic approach, but you can also experiment with EMAs or different lengths (e.g., 20/50 or 20/100) to find a better fit for your market or timeframe.
Date Range

The date range is set from 2018 to 2069, which is quite wide. It’s perfectly fine, but if your backtests only go so far, you can tighten those timestamps as needed.
Performance & Optimization

If you plan on heavily optimizing (e.g., searching for the best RSI length, ATR multipliers, etc.), you can expose them as inputs and run TradingView’s strategy tester optimizations. It helps to keep code clean and ensure each parameter is an input for easier tweaking.
ملاحظات الأخبار
update

إخلاء المسؤولية