OPEN-SOURCE SCRIPT

Trend Following and Swing Strategy (<30% DD) for CashFlow

Strategy Explanation

Multi-Level Take Profit

TP1 triggers partial profit (50% of position) at +15%.
TP2 closes remaining 50% at +30%.
This locks in some gains early (helpful for consistent cashflow) but still leaves room to capture bigger trends.
Stop-Loss & RSI Exit

A 15% stop-loss is configured; adjust to match volatility.
If RSI < 50 or price dips below the 200 EMA, strategy closes the entire long.
Drawdown Control (<30%)

We track peak equity. If the strategy drawdown goes beyond 30%, it closes all open trades (strategy.close_all).
Entry Filters

Only enters if:
Volume above 1M (liquidity),
ADX > 25 (stock is trending),
RSI > 60 (bullish momentum),
ATR > 2 (enough daily range),
Price > 200 EMA (overall uptrend).
Trend Analysis

开源脚本

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

想在图表上使用此脚本?

免责声明