Fontiramisu

The Ultimate Backtest - Fontiramisu

Fontiramisu Premium Updated   
█  OVERVIEW
The Ultimate Backtest allows you to create an infinite number of trading strategies and backtest them easily and quickly.
You can leverage the trading setup you created with the tradingview's real-time alert system.
The tool is constantly being improved to accommodate more in-house indicators in order to imagine more trading strategies.

█  HOW IT WORKS.
The tool is divided into 3 main parts:
  • 1. The indicators:
    These are the indicators that you will be able to set up to create your setups.
    Example: rsi , exponential moving average , home made resistance/support indicator etc.
    We are working to add more and more in-house indicators to multiply the trading strategies.
  • 2. The entry/exit strategy:
    The entry/exit trades management is a central point of the strategy.
    Here we propose several ways to take profits and in-house optimizations to enter a position.
  • 3. The setup: the combination of indicators
    Here it is up to you to create your own recipe.
    You combine the different indicators set up above to make a real strategy.
    Example: RSI Divergence + Location on a support.

Let's look at this in more detail.
Below is a description of all sections



█  1. THE INDICATORS

TREND: MA (moving average) -->
Set up a moving average from multiple methods ( sma , ema , smma ...) of the type and length you want.
> A long is taken if the price is above the MA.
> A short is taken if the price comes below the MA.
You can set up a smoothing MA from the existing moving average and use it in the same way.

ENVELOPE: SUPER TREND -->
The supertrend is a trend following indicator. It clearly describes the distinction between downtrends and uptrends with a red or green direction. It is calculated according to the ATR and a factor.
> A long is taken when the direction is green and the price touches the supertrend support line.
> A short is taken when the direction is red and the price touches the supertrend resistance line.

ENVELOPE: BOLLINGER BAND -->
Bollinger bands are used to evaluate the volatility and probable evolution of prices, here we exploit the envelope
> A long is taken if the price crosses the lower band.
> A short is taken if the price crosses the upper band.

CLOUD: ICHIMOKU -->
The Ichimoku cloud aims to identify the direction and reversal points of dominant market trends. It displays support and resistance levels.
> A long is taken when the price enters the green ichimoku cloud .
> A short is taken when the price enters the red ichimoku cloud .

MOMENTUM: MACD ZERO LAG / MACD / RSI -->
RSI ( Relative Strength Index ) reflects the relative strength of upward movements, compared to downward movements.
MACD (Moving Average Convergence Divergence) is a momentum indicator that follows the trend and shows the correlation between two moving averages of the asset price.
MACD ZERO LAG is calculated in the same way except that the exponential moving averages that make up the calculation do not lag.

> A long is taken on a potential bullish divergence .
> A short is taken on a potential bearish divergence.
For now, with these indicators, we only take a trade based on divergences but we will add overbuy/oversell etc.

MOMENTUM: MA SLOPE -->
This house indicator allows you to use the slope of a moving average as a measure of momentum.
Define the length of the moving average whose slope we will take.
We then take a fast ma of the slope then a slow ma (You define the lengths with the parameters)
The tool foresees a subtraction between the slow and fast ma to have another interpretation of the slope.
This indicator is available and can be viewed freely on my tradingview profile.

> A long is taken when there is a potential bullish divergence on the fast/slow MA or the difference.
> A short is taken when there is a potential bear divergence on the fast/slow MA or the difference.

RESISTANCE: R/S FONTIRAMISU -->
An in-house indicator that shows resistances and supports according to the chosen parameters.
Indicator available and can be viewed freely on my tradingview profile.

> A long is taken when the price arrives on a support.
> A short is taken when the price arrives on a resistance.

-----
MOMENTUM DIVERGENCE -->
Section used to set the divergence detection.
The first field allows you to select which momentum you want to calculate the divergence on.

PIVOT DETECTION -->
Used to calculate top and dip on the chart, it is used with divergences/resistances/enter-exit optimizations....
Default parameters are: Deviation: 2.5, Depth: 10.


█  2. STRATEGY FOR ENTERING/EXITING TRADES.

STRATEGY: TP/SL -->
Enter/Exit Trade Mode" field: The first field allows you to choose between two modes:
  • 1. TP/SL Mode:
    This mode allows you to take entries with take profits that you define afterwards with the TP1 and TP2 parameters.
    > The stop loss is calculated automatically by taking the last dip if it is a long and the last top if it is a short.
    > You can add a "Stop Loss % Offset" which will increase the size of the stop loss by the % value you set.
    > If you activate TP2, the profit taking is split between TP1 and TP2, you can select the percentage of profit taking split between TP1 and TP2 via the "Percent Exit Profit TP1" field.
    > The "TPX Multiplier" fields allow you to define the desired Risk Reward, if = 1 then RR = 1/1.
    > A Trailing stop option is available, if active then the profit take will be split between TP1 and Trailing stop.
    For the moment you can choose between the two MA's set up above to serve as trailing stop:
    > In long, if the price goes below the MA then you take the profit (or the loss)
    > In short, if the price goes above the MA then you take the profit (or the loss)
  • 2. ONLY BUY/SELL:
    Here the take profits are not taken into account, we only have an alternation between the long and the shorts.
    The trailing stop applies to this mode and can be interesting depending on the use.

STRATEGY: SETUP OPTIMIZER ( FP ) -->
Here we have 3 home made optimization tools to take more relevant trades.
  • 1. FAVORABLE ENTRY FROM PIVOT .
    Here the tool will favor entries with interesting locations depending on dips and tops before.
    A red cross with "FP" will appear on the chart each time a trade does not meet this condition.

  • 2.STOP LOSS MAX (SL).
    Will only take trades where the stop loss is maximum at X%.
    A red cross with "%SL" will appear on the chart each time a trade does not meet this condition.

  • 3. MOVE ALREADY TRADED.
    Will not take several trades in the same move.
    This can avoid cascading losing trades on some setups.
    A red cross with "MT" will appear on the chart each time a trade does not meet this condition.


█  3. THE SETUP: THE COMBINATION OF INDICATORS
Here, let your creativity speak.
You are free to assemble the indicators in the following way:

The conditions defined inside a group (group1/group2/group3) are combined to each other via an OR operator.
Example, if "cond01 = Momentum DIv" and "cond02 = Res/Sup Location", then trades will be triggered if one of the two conditions is met.

The conditions defined between several groups are multiplied via the AND operator.
Example, if "cond01 = Momentum DIv" and "cond12 = Res/Sup Location", then trades are taken if both conditions are met at the same time.


ALL CONDITIONS:
> NONE
No conditions selected.

> Momentum Div
Triggers when a potential divergence occurs on the selected momentum (in the divergence section).

> Momentum Div UT Sup
Triggers when a potential divergence occurs on the selected momentum (in the divergence section) in the upper timeframe.
The upper timeframe of the momentum is calculated directly in the code by multiplying the set parameters by 4 (fastlenght/slowlenght...).

> Multi MA
It is set in the "Trend: MA" section and is triggered by the conditions mentioned in the "INDICATORS" section.

> Smooting MA
Is set in the "Trend: MA" section and is triggered by the conditions mentioned in the "INDICATORS" section.

> Super Trend Env
Is set in the "ENVELOPE: SUPER TREND" section and is triggered by the conditions mentioned in the "INDICATORS" section.

> BB Env
It is set in the "ENVELOPE: BOLLINGER BAND" section and is triggered by the conditions mentioned in the "INDICATORS" section.

> Ichimoku Cloud
Is set in the "CLOUD: ICHIMOKU" section and is triggered by the conditions mentioned in the "INDICATORS" section.

> Res/Sup Location
Is set in the "RESISTANCE: R/S" section and is triggered by the conditions mentioned in the "INDICATORS" section.

Release Notes: UI Updates
> Improve all titles and descriptions.
> Option to show MA and Candlestick patterns.
> Add emoticons for better navigation.

1. INDICATORS Updates
TREND: MA (moving average) -->
> Add Double ema & Zero lag sma
> Add two additional trading modes:
  • MA direction
    > A long is taken if MA's direction is up.
    > A short is taken if MA's direction is down.
  • MA direction change
    > A long is taken if MA's direction changes from down to up.
    > A short is taken if MA's direction changes from up to down

PATTERN: Engulfing -->
> A long is taken when a bullish Engulfing pattern is recognized.
> A short is taken when a bearish Engulfing pattern is recognized.
TREND: Volume Impulse -->
> A long is taken when a bullish Volume Impulse pattern is recognized.
> A short is taken when a bearish Volume Impulse pattern is recognized.

█  2. STRATEGY FOR ENTERING/EXITING TRADES Updates.
  • TP from Pivot
    > Take optimized profits depending on highs & lows, display.
    > When entry is too close to the exit, target trade is aborted and ✖️CTP is displayed on the chart.
    > Parameter "Retracement Move Factor Target": Factor that affects the exit target of the trade. If factor > 1 then exit target will be eather Above the last high for a buy-trade or Under the last low for a sell-trade
    > Parameters "TP1 multiplier" and "TP2 multiplier"
  • TP from SL
    > Trades exit target depends on stop loss size.
    > You set the risk reward you want with "TP1 multiplier" and "TP2 multiplier" parameters. If "TP1 multiplier" is set to 1 then RR=1 --> meaning that "stop loss size equals the take profit size".
Release Notes: Update Instructions.
Release Notes: █ 1. INDICATORS Updates
ENVELOPE: DEMA SUPERTREND -->
> A long is taken if the price crosses the lower band.
> A short is taken if the price crosses the upper band.

█  2. STRATEGY FOR ENTERING/EXITING TRADES Updates.
> Fix Bugs
Release Notes: █ 1. INDICATORS Updates
MOMENTUM : MULTI TYPE RSI -->
Different modes available:
  • Counter Trend: OverBougth/Sell
    > buy trade when: rsi is oversold.
    > short trade when: rsi is overbought .
  • Counter Trend: Cross 2 MAs
    > buy trade when: rsi oversold & fast MA rsi crosses over slow MA rsi
    > short trade when: rsi overbought & fast MA rsi crosses under slow MA rsi
  • Counter Trend: Cross Band
    > buy trade when: rsi crosses over lower band.
    > short trade when: rsi crosses under upper band.
  • Trend Cont: OverBougth/Sell
    > buy trade when: rsi is oversold.
    > short trade when: rsi is overbought.
  • Trend Cont: Cross Band
    > buy trade when: rsi crosses over upper band.
    > sell trade when: rsi crosses under lower band.
Release Notes: █ 1. INDICATORS Updates
ENVELOPE: PIVOT-BASED CHANNELS/BANDS-->
Different modes available:
  • Pivot Band Breakout
    > buy trade when: price cross over pivot upper band.
    > short trade when: price cross under pivot lower band.
  • Pivot Band Res/Sup
    > buy trade when: price cross over pivot lower band.
    > short trade when: price cross under pivot upper band.
  • Pivot Channel Res/Sup
    > buy trade when: price cross over pivot lower channel.
    > short trade when: price cross under pivot upper channel.


█ 2. STRATEGY FOR ENTERING/EXITING TRADES Updates.
TRADING MODE: "TP from Last Move"
> Take optimized profit based on last move size.

█ Other Updates
> Ui Update
> Fix Bug
Release Notes: screen update
Release Notes: █ 1. INDICATORS Updates
PATTERN: V top & V bottom-->
> buy trade when: V bottom is confirmed.
> short trade when: V top is confirmed.
Release Notes: █ 1. INDICATORS Updates
TREND: MA (moving average) --> Adding Multiple Moving Average
> SMA
> EMA
> SMMA (RMA)
> WMA
> VWMA
> DEMA
> TEMA
> ZLSMA
> ZLDEMA
> ZLTEMA
> McGinley-D
> HMA
Release Notes: █ 1. INDICATORS Updates
TREND: SUPERTREND (update) -->
Different trading modes available:
  • Trend
    > long trade when: trend is up.
    > short trade when: trend is down.
  • Trend Change
    > long trade when: trend changes from down to up.
    > short trade when: trend changes up to down.
  • Envelope
    > long trade when: price goes under upper band.
    > short trade when: price goes above lower band.

TREND: ATR TREND BAND (new) -->
Different trading modes available:
  • Trend
    > long trade when: trend is up.
    > short trade when: trend is down.
  • Trend Change
    > long trade when: trend changes from down to up.
    > short trade when: trend changes up to down.

TREND: INTER TREND BAND (new) -->
Indicator based on highs and lows to determine trend direction.
Different trading modes available:
  • Trend
    > long trade when: trend is up.
    > short trade when: trend is down.
  • Trend Change
    > long trade when: trend changes from down to up.
    > short trade when: trend changes from up to down.
  • Range
    > long trade when: price is ranging.
    > short trade when: price is ranging.

MOMENTUM: MULTI TYPE MACD (update) -->
MOMENTUM: MULTI TYPE RSI (update) -->
We added multiple moving average calculation:
SMA: Simple moving average
EMA: Exponential MA
SMMA (RMA): Running MA
WMA: Weighted MA
VWMA: Volume weighted MA
DEMA: Double exponential MA
TEMA: Triple exponential MA
ZLSMA: Zero lag sma
ZLDEMA: Zero lag dema
ZLTEMA: Zero lag tema
McGinley-D: McGinley Dynamic
HMA: Hull ma
Release Notes: 1. INDICATORS Updates
ENVELOPE: BOLLINGER BANDS -->
New Trading modes:
  • Trend Cont: Over Bands
    > long trade when: price goes over the upper band.
    > short trade when: price goes under the lower band.
  • Trend Counter: Over Bands
    > long trade when: price goes under the lower band.
    > short trade when: price goes over the upper band.
  • Trend Counter: Reintegrate Bands
    > long trade when: price goes over the lower band
    > short trade when: price goes under the upper band.

UI Updates
The various indicators are now visible on the screen.
New field:
> Checkbox "Show Indicator": If active, it will display the indicators depending on the strategy chosen.
Release Notes: Remove Table.

Invite-only script

Access to this script is restricted to users authorized by the author and usually requires payment. You can add it to your favorites, but you will only be able to use it after requesting permission and obtaining it from its author. Contact Fontiramisu for more information, or follow the author's instructions below.

TradingView does not suggest paying for a script and using it unless you 100% trust its author and understand how the script works. In many cases you can find a good open-source alternative for free in our Community Scripts.

Disclaimer

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.

Author's instructions

Get access: https://www.theultimatebacktest.com Contact me on discord: Misu#0530 Email misu@theultimatebacktest.com.

Want to use this script on a chart?

Warning: please read before requesting access.