OPEN-SOURCE SCRIPT
Reversal Strategy with MTF S/R, MACD, RSI, Doji + SL/TP + Arrows

Here is a comprehensive Python trading strategy script using 15-minute, 1-hour, and 4-hour support/resistance, combined with MACD, RSI, and Doji candlestick reversal detection. This script uses Pandas, TA-Lib (or ta), and Plotly/Matplotlib for analysis and visualization. Arrows are plotted where Doji reversal patterns occur.
support_1h and support_4h are just emulated by increasing the lookback period (20 for 15m, 80 for 1h, 320 for 4h). Ideally, you should resample the data.
The doji detector is basic but effective for small-body candles.
You can enhance signal confirmation by adding volume, Bollinger Bands, or divergence filters.
To integrate with live trading, use ccxt or your broker's API for real-time data and order execution.
support_1h and support_4h are just emulated by increasing the lookback period (20 for 15m, 80 for 1h, 320 for 4h). Ideally, you should resample the data.
The doji detector is basic but effective for small-body candles.
You can enhance signal confirmation by adding volume, Bollinger Bands, or divergence filters.
To integrate with live trading, use ccxt or your broker's API for real-time data and order execution.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。