OPEN-SOURCE SCRIPT
מעודכן [Fedra Algotrading LR + TTP Indicator Lite]

How it works?
- It calculates the linear regression of the last X candles and define a range based on a linear regression deviation (represented by the 3 parallel lines over the last candle).
-Open trades based on the breakout of the deviation of the linear regression (represented by the yellow triangle).
-Advanced trend filter to not open trades against the trend consist in 2 SMA cross and and a few other conditions, including sptionally super trend (Represented by the red and green background).
-Percentage take profit (represented by the horizontal green line. configurable)
-Percentage stop loss (represented by the horizontal red line. Configurable
-Break even when a trade has already opened and there is a change of trend. Calculated in 1.5% when the price is under the yellow SMA.
Alerts in each case to receive notifications (BUY & SELL, TP BE SL).
Added labels with entry price and PnL of each closed trade to facilitate optimization
- It calculates the linear regression of the last X candles and define a range based on a linear regression deviation (represented by the 3 parallel lines over the last candle).
-Open trades based on the breakout of the deviation of the linear regression (represented by the yellow triangle).
-Advanced trend filter to not open trades against the trend consist in 2 SMA cross and and a few other conditions, including sptionally super trend (Represented by the red and green background).
-Percentage take profit (represented by the horizontal green line. configurable)
-Percentage stop loss (represented by the horizontal red line. Configurable
-Break even when a trade has already opened and there is a change of trend. Calculated in 1.5% when the price is under the yellow SMA.
Alerts in each case to receive notifications (BUY & SELL, TP BE SL).
Added labels with entry price and PnL of each closed trade to facilitate optimization
הערות שחרור
Version= 2.1Cosmetic changes:
Buy label= blue
TP label = green
BE label = orange
SL label = red
הערות שחרור
Version 2.3Added Unrealized PnL label (gray)
הערות שחרור
Instructions have been added to disable the closing in Break even (you only have to set it to a value greater than TP).הערות שחרור
Added cumulative PnL and "Buy & hold" values to facilitate parameter optimization.These values are in a table, at the top right of the chart.
הערות שחרור
Version 2.4Added closed trades counter and Win Ratio to the backtest panel.
הערות שחרור
Win ratio background changes red/green when is negative/positiveהערות שחרור
Version 2.5Fixed "Profit Factor" label instead o "Win Ratio"
הערות שחרור
cosmetic changesהערות שחרור
V 3.0Added a session filter. Now you can choose what week days the script can open a trade, and backtest with this filter too.
הערות שחרור
v 3.5Added a 200 (configurable) SMA for trend confirmation (optional)
סקריפט קוד פתוח
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
כתב ויתור
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
סקריפט קוד פתוח
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
כתב ויתור
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.