hossein_ghasem_altajer

Smart Money Concept + Strategy Backtesting Toolkit [Shah]

This indicator, primarily designed for strategy backtest. It’s important to emphasize that the orders generated by this indicator are in the form of stop-limit orders.

For Long setup, When lower lows and lower highs form, after price moving up from the last higher high, a “change of character” occurs. Entry will takes place in the golden zone.
This the Long setup:

And this is the Long setup Example on chart:

For Short setup, When higher lows and higher highs form after the price moves down from the last higher low, a “change of character” occurs. Entry will take place within the golden zone.
This the Short setup:

And this is the Short setup Example on chart:


Key Features:

Date Period:
Users can customize the date period during which the strategy is tested, allowing for a more granular analysis of performance over specific timeframes.

DCA Entry:
  • Entry is based on Fibonacci level between the Lower Low and Higher High pivots for Long deals.
  • Entry is based on Fibonacci level between the Higher High and Lower Low pivots for Short deals.
  • Allowing a second entry with a specified position size
  • Entering at a different price based on a Percent or ATR change.
There is a feature that If the risk-to-reward ratio is below the specified input (rr), the trading deal wont initiate, and the signal alert wont be triggered.

Stop Loss:
Adjustable based on Fibonacci levels , Percent and ATR.
The percent and ATR is calculate from LL pivot point for Long and HH pivot point for short (not Entry price)’

Targets:
Adjustable based on Source, Fibonacci levels , Percent and ATR.

  • Source indicates the maximum (minimum) value between the open and close of the candle where the Higher High (Lower Low) pivot point was formed for Long (Short) deals.
  • Percent and ATR calculates from Entry 1 Price
There is a feature that closes the part of the position size at Target 1 based on a percentage, leaving the rest to close at Target 2, entry, exit price, or stop loss.


Plots:
The visual representation of the indicator includes the key plots:
  • Reset Deal Calculation Fibonacci Level
  • Alert Fire Fibonacci Level
  • Entry 1
  • Entry 2
  • Entry Average
  • Stop Loss
  • Target 1
  • Target 2

Labels:
Displays informative labels upon trade open and close, providing details about each transaction like gain and equity and etc.

Risk Management:
Allows setting initial capital, risk per trade, and commission for each transaction.

Score Table:
Provides statistical information for Regular deals (refers to deals that closed in Target price or Stop loss price) and Exited deals (representing deals that didn’t touch the stop loss or targets.):
  • Number of trades
  • Win rate
  • Profit factor
  • Average Risk to Reward ratio
  • Total Profit and Loss (PnL)
  • Commission paid
  • Live equity

It should note that Winrate calculated based on closed deals at target or stop loss. (Exited trades doesn’t into account in calculation of Winrate)

Exit Methods :
The goal is to offer users a diverse set of exits before the price touches the target or stop loss.

1. Pending Entry Time-out
cancel pending entry based on candle counting since alert fired. (before deal started)
2. Break Even
If Target 2 is reached, the stop loss automatically adjusts to the entry price.
3. Active Deal Reverse
If a deal (long or short position) is currently open, and the reverse signal is emitted, the script will close the existing deal.
4. Reverse Deal Exit
If a deal (long or short position) is currently open, and the reverse signal is emitted, the script will automatically close the existing deal.
5. Move Exit
With this method, if Entry 2 is triggered, the deal will be closed when the price touches the Entry price.
6. Candle Counting Exit
This exit type is based on the number of candles since the deal started.
7. Profit Zone Shield Exit
Once a deal enters profit, the Exit level moves to the entry level after reaching a Fibonacci level between TP1 and Entry 1.


Deep Backtesting Table:
It includes:
  • Time period of the backtest
  • Pair name and timeframe
  • Count the long and short trades
  • Win streak and loss streak
  • Total deal chances and missed chances
  • Count the deals goes directly from entry 1 to tp1 and entry 2 to tp1
  • Count the deals that touched entry 2 and entry 2 filled percent
  • Count the number of each exit type
  • Other statistics such as CAGR, Sharpe, Kurtosis, Skewness, and Max Drawdown.
Note di rilascio:
  • added "Base Pivot" option to stoploss. It uses low of recent LL before deal started for Long deal and high of recent HH before deal started for Short deal.
  • fixed calculation of Percent and ATR in stoploss.
  • added "RR" option to Targets.
  • minor bug fixed
Script protetto
Questo script è pubblicato con codice protetto, ma puoi comunque usarlo gratuitamente. Mettendolo tra i preferiti potrai applicarlo al grafico, senza però la possibilità di visualizzare o modificare il codice sorgente.
Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?