OPEN-SOURCE SCRIPT

Fibonacci + TP/SL Strategy [Backtest]

1 848
✅ 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)



כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.