OPEN-SOURCE SCRIPT

Fibonacci + TP/SL Strategy [Backtest]

2 504
✅ Key Features Added and Adjusted:
Fibonacci Retracement Levels:

Automatically calculated based on the last 100 bars' high/low

Plotted levels: 0%, 23.6%, 38.2%, 50%, 61.8%, 78.6%, 100%

Extension targets: 161.8%, 261.8%, 423.6%

Buy/Sell Signal Logic:

Buy: Price is between 78.6% and 38.2% levels

Sell: Price is between 61.8% and 23.6% levels

Both depend on a can_trade time filter to avoid overtrading

ATR-based Stop-Loss:

Stop-loss dynamically adapts to market volatility:

SL = Entry - ATR * 1.5 (long)

SL = Entry + ATR * 1.5 (short)

Fixed Take-Profit:

Configurable via input: default is 4%

Can be changed in TradingView UI

Golden/Death Cross Indicator (Visual Only):

EMA 50 crossing EMA 200 plotted on chart:

Golden Cross = Buy signal (green triangle)

Death Cross = Sell signal (red triangle)

Weekly Profit Cap:

Prevents new trades if weekly profit exceeds 15%

Resets at the start of every week

Visual Elements:

All Fibonacci levels are plotted

Buy/Sell signals are labeled on the chart (BUY, SELL)



면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.