Risk Reward Optimiser [ChartPrime]█ CONCEPTS
In modern day strategy optimization there are few options when it comes to optimizing a risk reward ratio. Users frequently need to experiment and go through countless permutations in order to tweak, adjust and find optimal in their data.
Therefore we have created the Risk Reward Optimizer.
The Risk Reward Optimizer is a technical tool designed to provide traders with comprehensive insights into their trading strategies.
It offers a range of features and functionalities aimed at enhancing traders' decision-making process.
With a focus on comprehensive data, it is there to help traders quickly and efficiently locate Risk Reward optimums for inbuilt of custom strategies.
█ Internal and external Signals:
The script can optimize risk to reward ratio for any type of signals
You can utilize the following :
🔸Internal signals ➞ We have included a number of common indicators into the optimizer such as:
▫️ Aroon
▫️ AO (Awesome Oscillator)
▫️ RSI (Relative Strength Index)
▫️ MACD (Moving Average Convergence Divergence)
▫️ SuperTrend
▫️ Stochastic RSI
▫️ Stochastic
▫️ Moving averages
All these indicators have 3 conditions to generate signals :
Crossover
High Than
Less Than
🔸External signal
▫️ by incorporating your own indicators into the analysis. This flexibility enables you to tailor your strategy to your preferences.
◽️ How to link your signal with the optimizer:
In order to be able to analysis your signal we need to read it and to do so we would need to PLOT your signal with a defined value
plot( YOUR LONG Condition ? 100 : 0 , display = display.data_window)
█ Customizable Risk to Reward Ratios:
This tool allows you to test seven different customizable risk to reward ratios , helping you determine the most suitable risk-reward balance for your trading strategy. This data-driven approach takes the guesswork out of setting stop-loss and take-profit levels.
█ Comprehensive Data Analysis:
The tool provides a table displaying key metrics, including:
Total trades
Wins
Losses
Profit factor
Win rate
Profit and loss (PNL)
This data is essential for refining your trading strategy.
🔸 It includes a tooltip for each risk to reward ratio which gives data for the:
Most Profitable Trade USD value
Most Profitable Trade % value
Most Profitable Trade Bar Index
Most Profitable Trade Time (When it occurred)
Position and size is adjustable
█ Visual insights with histograms:
Visualize your trading performance with histograms displaying each risk to reward ratio trade space, showing total trades, wins, losses, and the ratio of profitable trades.
This visual representation helps you understand the strengths and weaknesses of your strategy.
It offers tooltips for each RR ratio with the average win and loss percentages for further analysis.
█ Dynamic Highlighting:
A drop-down menu allows you to highlight the maximum values of critical metrics such as:
Profit factor
Win rate
PNL
for quick identification of successful setups.
█ Stop Loss Flexibility:
You can adjust stop-loss levels using three different calculation methods:
ATR
Pivot
VWAP
This allows you to align risk-reward ratios with your preferred risk tolerance.
█ Chart Integration:
Visualize your trades directly on your price chart, with each trade displayed in a distinct color for easy tracking.
When your take-profit (TP) level is reached , the tool labels the corresponding risk-reward ratio for that specific TP, simplifying trade management.
█ Detailed Tooltips:
Tooltips provide deeper insights into your trading performance. They include information about the most profitable trade, such as the time it occurred, the bar index, and the percentage gain. Histogram tooltips also offer average win and loss percentages for further analysis.
█ Settings:
█ Code:
In summary, the Risk Reward Optimizer is a data-driven tool that offers traders the ability to optimize their risk-reward ratios, refine their strategies, and gain a deeper understanding of their trading performance. Whether you're a day trader, swing trader, or investor, this tool can help you make informed decisions and improve your trading outcomes.
Backtester
TTP Volume CSThis indicator helps you flagging areas where the volume is higher or lower than a moving average of the volume.
You can define a % threshold and whether you want the volume to be below or above the simple moving average of the volume.
The areas that are above the MA of the volume are shown in green and below in red.
Lookback parameter
This parameter allows you to check back in time for your condition. You can use it for reducing the noise of volume fluctuations
Examples of use:
- show areas where the volume is 20% above the SMA30 of the volume
- show areas where the volume is 40% below the SMA30 of the volume
Examples of trading ideas with this indicator:
- Areas of low volume can act as a reversal of the price.
- Areas where volume is too high as well.
- Trading in areas of low volume can affect the results when scalping
Crodl Pump & DumpThe reason why this indicator is called Pump and Dump is because it is based on volume.
The indicator focuses on volume levels to see if there is an increase in volume before deciding if it is worth entering a Position.
Long example = This will use ATR and price averages to trend Bullish and once the trend favours the upside it will then look at the Volume candles and if a candle is bigger then the average volume and the trend (ATR) is above a certain level it will then Give us a long entry if those conditions are true. We can have more than one long after one another since it will give us a position every-time the conditions are true and after TP(take profit) 1 or a Stop Loss was hit.
Short example = If the trend based on average price is trending downwards and we can see an increase of volume it will wait till we break a certain level breaks when we get the average price from the highs and Lows, then once the trend has met the bearish conditions it will wait for increase in volume and trigger a Sell. The sell will close once TP(take profit) 1 or a Stop Loss is hit.
In the inputs you can adjust the MA (moving average length. This helps to decide if the Trend is bearish or bullish. Higher moving averages will give you less entries and a lower moving average will give you more entries ,since price crosses lower MA's more it will change the trend more often.
Sensitivity is a divider of the MA values is so the higher the Sensitivity the lower the more trades you get since the trend is changing faster.
You will see that there is a backtesting panel on your chart when you look in the inputs there will be a statistics tab which will have 1. Simple 2. Mobile 3. Hide options
1. Simple is designed when you are using a PC or Laptop
2.Can be used when you are using your mobile it will show less data but won't be in your way
3.This will hide the backtesting panel on your screen.
Exit strategy.
there are 3 Types of exits for this indicator.
1 .CrodlExit which is ATR indicator based Exit with a divider.
2 . fIxed SL , this works in % so 1 = 1% market move.
3 .Reverse exits = Longs exit shorts and shorts exit longs.
there are 4 take profit targets and all of them are adjustable.
1= 0.5% by default
2=1% by default
3=1.5% by default
4=2% by default
on the Back tester you will find the following information :
Timeframe of your chart and then the Symbol or pair you are trading.
First trade = when the back tester starts to read data.
Total trade = Total buy and total sell signals and then total trades are buy + sell signals.
total win = total buys hit take profit 1 and total sells that hit take profit 1 and then total buy + total sells that hit take profit 1.
total loss = total buys that hit which ever exit mode you selected in the inputs by default it is crodl exit and total sells that hit which ever exit mode you selected in the inputs by default it is crodl exit and then you will get total buy losses + total sell losses to get total loss.
TP1= the % difference between total trades won and lost for the 1st take profit target and your stop loss method you chose.
TP2= the % difference between total trades won and lost for the 2nd take profit target and your stop loss method you chose.
TP3= the % difference between total trades won and lost for the 3rd take profit target and your stop loss method you chose.
TP4= the % difference between total trades won and lost for the 4th take profit target and your stop loss method you chose.
average win streak give you the average of how many winning trades you had every time before hitting a stop loss.
average loss streak is how many stop loss you hit on average before take profit one has been reached.
longest win streak give you the amount of winning trades you had without hitting a stop lossl that is selected in your inputs.
longest loss streak give you the amount of losing trades you had one after the other before hitting take profit 1.
Easy Backtester PROWHAT IS EasyBacktester ?
EasyBacktester is a tool that helps you backtest trading strategies built by yourself with an included strategy builder and a multitude of options.
From within the parameters of the tool, you can specifically pick your entry settings across 12 most common indicators, such as "RSI", "MACD", "Moving Averages" etc... Then you can immediately visualise your setup's Stop-loss & Take Profit, your expected Profits & Loss and a lot of other statistics for your entry strategy. Once you are satisfied with your entry strategy, you are given a set of tools to optimize your setup using stop-loss rules, take profits rules, partial profits, trailing-stops, entry timing...
WHY IS THIS TOOL DIFFERENT ?
EasyBacktester is a backtesting engine with no coding skills required. TradingView allows for "Strategy Scripting" using PineScript, which is not an option for non-coder audience. EasyBacktester fills this gap and allow non-coders to get an idea of how their trading strategies may perform using mouse clicks only.
Some similar attempts have been made on TradingView, allowing some limited options, but none have the same capabilities EasyBacktester offers, for instance, as of April 2022 these features have not been seen in any other TradingView tools:
- partial take profits
- leverage simulation
- a multitude of trailing stop-loss possibilities including trail triggers and trail parameters
- visualisation of entries including stop-loss, take profits, partial take profits, and trailing stops. One can now visualize such complex setups.
- visualisation of Profits & Loss
- time in trade
- wait strategy after a signal: for example, when RSI is oversold, "WAIT until price retraces 100% of the original signal" amongst other possibilities
QUICK START GUIDE:
STEP 1: DEFINE YOUR SIGNAL STRATEGY
From the settings of the tool, find the "SIGNALS STRATEGY" section.
Select a type of entry you wish to simulate, for example "LONGs", and activate the checkbox right before "Simulate".
Right below, you will find 4 signal builder for you to play with and pick your strategy accordingly.
For example, to simulate a signal when RSI is oversold, follow these steps:
- On the 1st multiple choice box, select "RSI"
- On the 2nd multiple choice box, select "is below..."
- On the 3rd multiple choice box, select "OverSold level"
Don't forget to activate this rule by checking the checkbox in front of it.
After this first step, one should immediately see the chart affected with some plots. The dots represents the signal entry defined by the rule we just created, and the red/green boxes visually represent trades that could have been taken with this signal which, in this example, occurs "when RSI is below oversold level". Note that all specific parameters for RSI including its specific "oversold level" is customisable at the end of the tools settings along with all other indicators settings.
STEP 2: STATISTICS
By default, the "APPEARANCE" section only plots potential entry signals (materialized by dots) and actual entry boxes (materialized by red/green boxes).
But the user can easily add other precious statistics to the chart, and obviously the most important one for backtesting: Profits & Loss (P&L).
In the "STATISTICS" section please check the "P&L" box to see appear a chart of the simulated P&L for our example. You should immediately see a new graph below the chart representing the evolution of the P&L after each entry.
Other statistics are available to the user, including: Equity, Number of Trades, Time in Position, Number of trades Won, Number of trades Lost, Number of trades Stopped.
Play around with those to see them plotted on your chart.
STEP 3: OPTIMIZE YOUR ENTRY
Under the "ENTRY STRATEGY" section, one can pick how to enter AFTER the signal, which provides the user with an extensive flexibility to pick its timing.
Here there are a various set of choices offered, ranging from the default "Market Order at Next Candle Open", to "Limit Order: at signal's candle open" or even "Stop-Buy: at break of last candle high". As its name suggests, this option allows you to actually wait before randomly enter in trade.
It is important to also note that the user can totally prevent entry if the conditions are not filled after a customizable number of candles represented in "Max bars to wait for entry" (default being 1, meaning the engine will wait the condition to be filled during only 1 candle)
STEP 4: MANAGE YOUR RISK
Under the "RISK MANAGEMENT" section, the user is given a series of options to set the amount (s)he would like to risk.
This is extremely important to set, and is the result of a combination of customizable options including:
- the Initial Capital of the account
- the amount to risk per trade, and HOW to risk it: some fixed % the initial equity or adjust the stop-loss to the desired risk ?
- use of leverage or not
- initial stop-loss, as well as minimum and maximum
- trailing stop-loss: what should trigger the trailing ? and by how much should the engine trail ?
STEP 5: HAVE AN EXIT PLAN
Under the "EXIT STRATEGY", the user can define how to exit the trade.
For instance, here again a lot of options are given:
- Take Profit: exit at some level of profits defined by a multiple of the stop-loss, or a multiple of the ATR, or some % or points
- Partial Profit taking before exit
- Panic close position after some time spent on the trade
STEP 6: FURTHER OPTIMIZATIONS
Under the sections "Commissions" & "Calendar & Sessions", one can simulate real trading conditions by including commissions fees as well as filtering actual dates and trading sessions. These sections are straightforward for any user to use.
SETP 7: INDICATORS SETTINGS
Since EasyBacktester uses a predefined set of indicators to get started, those indicators are also customizable in the last section of the settings. Here, one can easily customize RSI periodicity, MACD lengths, Moving averages types & lengths, ATR, etc...
STEP 8: GOING FURTHER
This is only a start to give users an overview of how various options affect their trading performance. But of course, each trader has its special recipe and specific detailed setup that is not possible to embed in a single tool. For advanced simulation, EasyBacktester provides plug & play connectors for advanced users. Namely, there are 3 connectors:
- signal connector
- trail trigger connector
- exit connector
Each of these connectors are an opportunity to customize the engine signals, trail trigger and exit choices with the user's own options. This case does require a little bit of coding, but it can easily be implemented by copy-pasting existing resources or with a slight help of a professional. In fact, the only conditions to build a proper connector is to export a plot with the numbers 1 (for signals), 2 (for trigger trails) and 3 (for exits). Here is an example of custom SIGNAL connector compatible with EasyBacktester, to produce a signal when last RSI was below 30 and current RSI reads above 30:
============================================================
//@version=5
indicator("My custom RSI signal")
// when previous RSI 14 was below 30 and current RSI 14 is above 30, set "custom_signal" to 1, otherwise set "custom_signal" to 0
custom_signal = ta.rsi(close, 14) < 30 and ta.rsi(close, 14) > 30 ? 1 : 0
// Export a plot of "custom_signal", but do not display it
plot(custom_signal, title="my signal", display=display.none)
============================================================
Once this indicator has been built, the user only needs to connect it with EasyBacktester as follow:
1. Open a desired chart, and add both EasyBacktester indicator as well as the custom "My custom signal" we just created above.
2. Open EasyBacktester's settings, and in the first option, there is "Connect signals source" which by default is set to "close". In the multiple choices, find your custom signal which should be named something like "My custom RSI signal: my signal", generally speaking the name is built like this " : ".
3. Now the custom code is connected to EasyBacktester, but we need to indicate the engine we actually want to use it as custom signal.
4. Under the "SIGNALS STRATEGY" section, where we generally build signals rules, there is special rule for this specific connection named "Use external source as entry signal". Just check the checkbox to activate it and see how the chart took our custom signal into consideration.
That's it for the overview of EasyBacktester. Thank you for reading and happy trading :)
Backtest HelperAre you tired of being able to see the future while you're backtesting? Have you ever clicked to a higher timeframe in bar replay, only to realize you've just seen everything that's going to happen before you've had a chance to test it? If you've had this problem, Backtest Helper is here for YOU.
All you have to do is set a start date and time, then set your desired timeframe in minutes, then you're off to the races.
For example, if you're a scalper that uses the 15 minute as their higher timeframe, set your start time at the 14th minute of the session you're testing and set your line spacing at 15 minutes. This will mark off every 14th minute on the charts. Now you know the exact moment you can go up to the 15 minute timeframe!
On our 1 minute timeframe, this is how we'd look with the above settings. The Backtest Helper has marked off the 14th, 29th, 44th and 59th minute.
When we go up to our 15 minute, there's no issues. We're seeing the candle we want to see and not the next 15 minute candle.
You can use this for any timeframe. Just make sure you set your start time to at least 1 minute before the close of the candle and your line spacing to the higher timeframe (in minutes) you want to target.
Trade Helper [Trading Nerd]Position Size Calculator / Lot Size Calculator
Disclaimer: I do my best to avoid wrong calculations and bugs. I provide this indicator without warranties of any kind. You bear all risks associated with the use of this indicator.
Inputs:
Market: Adds a name tag to the Table to keep track of the trades.
Entry Price: The entry Price of the Position.
Entry Time: The entry Time/Candle of the Position. If Stop Loss Type is 'ATR' or 'HH/LL' the Value for this is calculated by this Candle.
Stop Loss Type: Changes the Stop Loss Type.
Direction: Define if the trade direction is 'Long' or 'Short'. Has no effect on Stop Loss Type 'Custom'. For this you can just set the Stop Loss below/above the Entry Price .
ATR Multiplier: Multiplies the ATR Value by this number. Has only an effect on Stop Loss Type 'ATR'.
HH/LL Lookback Length: Lookback length for determine Highest High/Lowest Low value. Has only an effect on Stop Loss Type 'HH/LL'.
Custom SL Price: The Stop Loss Price if the Stop Loss Type is set to 'Custom'.
Risk Reward Ratio: The Risk is multiplied by this number to determine the Take Profit Price.
Balance: Balance Amount and Currency
Contract Size: The Position Size is divided by this number. E.G. in Forex one Lot is 100.000 Contracts. Change this Value depending on your Broker and Market.
Risk in %: Percent that is risked of the Balance for one Trade.
Scalp: OTT BacktesterThis is a backtester that can also add alarms. Using the OTT.
Inputs:
----------------
Capital : Total starting capital. / Başlangıçtaki sermaye
Investment per trade (% of Capital) : How much percentage of the inital capital will be used for trades. / Her bir pozisyon açarken başlangıç sermayesinin %'de kaçını kullanacağı.
No of Max Orders : How many positions can be opened at the same time. / Aynı anda en fazla kaç tane pozisyonun açık olabileceği.
Add profit to your capital: Bu seçenek seçildi ise sistem her seferinde toplam sermayeyi yeniden hesaplayıp pozisyonları ona göre açar. Eğer seçili değilse pozisyonları hesaplarken hep sabit başlangıç sermayesini kullanır.
Comission : Comssion of the exchange. This will both apply buy and sel. / Borsanın % kaç komisyon aldığı. Buraya girilen değer hem pozisyon açarken hem de pozisyon kapatılırken uygulanır.
Target Porift Type : Choose what kind of target profit will be used. ALso check the tool tip. / Farklı kâr alma yöntemlerinden bir tanesi seçilebilir. PERC sade bir şekilde % hedef girilir. RISKRATIO: Stop loss'a göre bir çarpan ile kâr hedefi belirlenir. NONE: Kar hedefi olmadan pozisyon açık kalır.
Target Profit % : Eğer kâr alma yöntemi olark PERC seçildi ise işe yarar. Burada girilen yüzdeyi kâr hedefi olarak belirler ve grafikte de işaretler.
Risk Reward Ratio : Eğer kâr alma yöntemi olark RISKRATIO seçildi ise işe yarar. Stop Loss seviyesi ne ise buradaki çarpana göre bir kâr hedefi olarak belirler ve grafikte de işaretler.
Stop Loss Type : Zarar kes seviyesidir. Buradaki hedefe vardığında pozisyonu kapatır.
Study Backtester [MS]Backtest your study like a strategy with our Study Backtester. Visualize your script's performance directly on the chart.
Simple to use, copy-paste a few lines of code (shown below) into your script, then set your script as input to the Study Backtester.
Visualize how your script performs against buy-and-hold over time, and get a nice print out of stats.
Settings
Set your buy and sell signal inputs
Add a stop loss
Choose normal or trailing stop loss
Choose the start date and time for backtesting
Set trading commissions
Use leverage or not
Set carry cost for leveraged trades
Version 1
Only supports buy-sell-buy-sell alternating signals. Any non-alternating signals will be ignored.
Testing begins with 1 share of the asset at your first buy signal.
Things To Note
This cannot enter or exit mid-candle. With the exception of the stop loss feature, which will calculate exits at the exact stop price.
Stops are not treated as stop-orders, but as market-exists at the stop (or trailing stop) price.
This DOES NOT take into account any loss of funds due to liquidation if price goes against you in a margin position.
Short positions are not currently supported.
Only `study` scripts are supported
How To Use
1) Add the following to the bottom your study's code.
//------------------------------------------------------------------------------
// FOR BACKTESTER
plot(buy ? 1 : sell ? -1 : na, title="Signals", display=display.none, editable=false)
2) Make sure `buy` and `sell` variables are assigned appropriately according to your strategy.
3) Add both your study and this script to your chart.
4) Set the "Signals Plot" setting of this script to: : Signals
5) Adjust this script's settings (start date, commission, stoploss, etc) as necessary.
PM us with any questions about this script.
Backtest PREMIUM Suite+ (Plug & Play)Hello traders
I. 💎 SCRIPTS ACCESS AND TRIALS 💎
1. For the trial request access, they have to be done through my website .
2. My website URL is in this script signature at the very bottom (you'll have to scroll down a bit and going past the long description) and in my profile status available here : Daveatt
Due to the new scripts publishing house rules, I won't mention the URL here directly. As I value my partnership with TradingView very much, I prefer showing you the way for finding them :)
3. Many video tutorials explaining clearly how all our indicators work are available on our website > guides section.
4. You may also contact me directly for more information
II. 🔎 Backtest PREMIUM Suite+ (Plug & Play) 🔎
2.1 Forewords
This indicator is available only to our PREMIUM 12 months users. YES! I said indicator, and not strategy or backtest for an excellent reason.
We wanted to make it as generic as possible and allow anyone to connect any indicator of his/her choice in a few clicks only.
This is NOT possible (in TradingView) with a strategy/backtest, but only with an indicator - that's why we worked on recoding the whole backtest logic as an indicator.
The PRO edition does not handle any pyramiding/re-entry - as such enters only once per trend by design. This feature is reserved for our PREMIUM users.
2.2 Concept
This is an indicator that I saw on TradingView and was introduced by the @Pinecoders account on TradingView.
I inspired myself from his Backtest Engine to offer a version more adapted to my vision - The benefits of connecting yourself any indicator to our Backtest engine are amazing and huge.
The concept can't be more simple. Imagine using any indicator and connecting to a backtest system in a single click.
You may connect your Algorithm Builder also to this complete backtesting system in a single click.
What's better between paying thousands for each backtest, or connecting yourself your indicators to your backtest with a click?
That was a rhetoric question, but you can still share your answer with me if you want to :)
III. The amazing benefits of our🔌&🕹️ (Plug&Play) system
Issue #1 💲 A BACKTEST SYSTEM IS COSTLY 💲
Hiring a developer to code a custom indicator is costly. For a custom backtest it's even more expensive as those scripts are very often way more complicated.
Now imagine, that now that you see your idea live on a chart, you'll realize you'll have to finance another backtest system, as the one you have is not compatible with your new idea.
Solution #1 💲💲 YOU COULD BE SAVING SOME MONEY 💲💲
just because it won't be needed to hire someone else for each of your trading idea.
We will never guarantee your success on the market, but THIS I stand by it any day any hour.
You can connect any indicator or your choice by updating your indicator slightly and connecting it to our Backtest engine. We send the tutorial for doing it to all our customers.
Issue #2 🕔 IT'S TIME-CONSUMING 🕔
Even if someone is doing all the coding for you, it might require days/weeks depending on your overall trading strategy/idea.
Without even counting the time for you to test/validate the work done and all the back-and-forth to fix all the issues.
Solution #2 SAVING TIME MIGHT EQUATES TO SAVING MONEY : 🕔 = 💲💲💲
I wish it could be as easy as going from weeks of coding to "1 single click" :)
I did the heavy-lifting, but you'll have to make the last effort the cross the finishing line. I made it easy for you to play with it and find a configuration that makes sense to YOU and for your strategy/asset/timeframe
Issue #3 ❌ IT'S COMPLICATED ❌
Someone did a backtest code for you, but... you can't update it because you either :
- don't know anything in programming
- ... and don't have time to learn (most of us have a job/family/...life)
- The system you have is way too specific for one of your previous idea, but can't be updated easily for your next trading ideas. I see a lot of traders nodding right now thinking "that's soooooo true !!!!"
Solution #3 🎉 WE MADE IT EASY AND FUN 🎉
Our goal is to externalize the technical stuff that you don't want to take care of - so that you can finally focus on your trading and optimizing your ideas. #bold #statement
In case you're wondering, no we're not reading your mind :), but we're also traders who didn't know how to code before and had to hire external programmers to do the heavy work for us.
You can be sure that most of the frustrations (trading, technical, ...) you have/had, we had them also and that's why we created this backtest indicator.
III. 🔌&🕹️
Hope you're ready to be impressed. Because, what I'm about to introduce, is my best-seller feature - and available across many of my indicators.
In TradingView, there is a feature called "Indicator on Indicator" meaning you can use an external indicator as a data source for another indicator.
I'm using that feature to connect any external indicator to our Backtest PREMIUM Suite+ (Plug & Play) - hence the plug and play name. Please don't make it a plug and pray :) it's supposed to help you out, not to stress you even more
Let's assume you want to connect your Algorithm Builder Multiple Trends+ to your Backtest PREMIUM Suite+
I mentioned an Algorithm Builder but you may connect any oscillator (MACD, On balance volume, stochastic RSI, True Strenght index, and many more..) or non-oscillator (divergence, trendline break, higher highs/lower lows, candlesticks pattern, price action, harmonic patterns, ...) indicators.
THE SKY IS (or more likely your imagination) is the limit :)
Fear no more. The Plug&Play technology allows you to connect it and use it the backtest calculations.
This is not magic, neither is sorcery, but certainly is way beyond the most awesome thing I've ever developed on TradingView (even across all brokers I know). #bolder #statement
TradingView is the best trading platform by far and I'm very grateful to offer my indicators on their website.
To connect your external indicator to ours, we're using a native TradingView feature, which is not available for all users.
It depends on your TradingView subscription plan ( More info here )
If you intend to use our Algorithm Plug&Play indicator, and/or our Backtest Plug&Play suites, then you must upgrade your TradingView account to enjoy those features.
We value our relationship with our customers seriously, and that's why we're warning you that a compatible TradingView account type is required - at least PRO+ or PREMIUM to add more than 1 Plug&Play indicator per account.
We go in-depth on our website why the Plug&Play is an untapped opportunity for many traders out there - URL available on my profile status and signature
IV. 📊 Make it nice! 📊
Now we're getting right into the fun stuff.
Let's explore briefly each display option (symbolized by an 👁️🗨️ in the Backtest UI) :
- Color Traded Background : Color the chart background is green when in a BUY trade, in red when in a SELL trade. If the Backtest is not in a trade, then the background won't be colored.
- Show Entry/Exit Markers : Displays the entries (Enter Long/Enter Short), and exits (Exit Long/Exit Short) labels.
- Show Entry Level : Displays a blue level line to easily identify the entry price of a trade.
- Show Take Profit Level : Display a purple line to visualize where the Take Profit level is (we'll explain below how to set it up).
- Show In-Trade Stops : Display the stop-loss
V. Backtesting filters
A backtest should have some filters helping the traders testing a few hypotheses. Well.... we included a ton of them.
Once again, thank you @Pinecoders for the help and support you gave me
5.1 ↑ Trade Direction ↓
- Both: The backtest takes the BUY, and SELL trades.
- Longs only/Short only: To be used if the trader wants to take the trades in a unique direction only
5.2 ▲🔷Pyramiding🔷▼
The Backtest PRO allows 1 entry per identified trend
Pyramiding has many names such as Re-entry, secondary trend, Additional entry, ...
Basically, it refers to entering multiple times in the same trend.
Maximum Number of Pyramiding Entries: Literally the max number of re-entries in the same trend.
For instance, if set to 2, then depending on the signals, you'll get at most 2 re-entries in the same trade direction.
- Position Size Multiple of Original Entry Position: Option to add X multiples of the original position size for the re-entries.
Example: Position size multiple = 2, and First entry size is $100. Then, the re-entries position sizes will be ($100 X 2 = $200).
5.3 ▄ █ Position sizing █ ▄
- 1. % of Equity: If selected, the position size used is the input to the right of 1. % of Equity.
Example: The trader starts with a capital of 100K. After a winning trade, your total capital is $103K - for the next trade the position size will be 3% of $103K
- 2. % of Capital: If selected, the position size used is the input to the right of 2. % of Capital.
In other words, the position size will always be the same position size as calculated on the initial capital.
Example: The trader starts with a capital of 100K. After a winning trade, your total capital is $103K - for the next trade the position size will be 5% of $100K. (As 100K is the initial capital used in our dummy example)
5.4⛔ Entry Stops and In-Trade Stops ⛔
We didn't reinvent the wheel here. Any good backtest should offer an entry stop-loss and an in-trade stop-loss.
Giving only here also an example among all the use cases. For instance, the trader sets a stop-loss 2% at the time of entry on your trade, but once the trade moves in the desired direction, the trader might want a trailing stop-loss using a 4% input.
Example: A trader goes LONG on only 1 "ABC" stock evaluated $10 per share.
1) The entry-stop loss will be 2% away so set at $8
2) A candle
3) The trailing stop will activate, and move the stop-loss from the entry stop-loss level (=$8) to $8.32 (=4% move up from $8) - and so on, and so forth for each time the price moves 4% up
The entry and in-trade stop losses can absolutely be identicals. There is no universal rule, and as always you know the drill - all depends on your backtest, and trading strategy as a whole.
5.5 ❌ Hard Exits ❌
⚠️The Backtest PRO Suite offers the hard exit on MACD only.
Our Backtest PREMIUM Suite offers 2 more indicators to invalidate your trades on :
1. MACD
2. Trend Direction
3. RSI divergence (Regular, and Hidden)
The hard exit (or invalidation) is a fundamental part of my trading method.
I explained numerous times on TradingView, our website, and social media channels why I "love" this concept so much, and how it saved my trading account numerous times from getting savagely wrecked by the market.
5.6 💲💲 Take Profit 💲💲
We only included 1 level of Take Profit so far. We'll work on adding at least one more soon.
You can set your Take Profit level based on either a:
1- Fixed value
2 - Percentage value
5.7 📆 Date Range Filtering 📆
If enabled, the backtest only uses the data between the starting and the ending dates of the defined range.
5.8 ⏱️ Hourly Range Filtering ⏱️
Please note that the hours filtering is based on the broker time - not on your chart time.
In other words, if your chart is UTC+1, but you're trading an asset from a US EAST COAST broker, then the timezone used is the UTC-4 timezone.
You'll must be wary of this when filtering and probably do a quick (but simple) calculation before setting up this option.
The easiest would be to set your chart timezone on the broker local timezone (and no math is needed).
Let's add a quick note that the hourly filter is also included in our Algorithm Builders PRO/PREMIUM 12 months. #shameless #self #advertising
5.9 ❗❗ Fees and Slippage ❗❗
Too often completely ignored by many traders, the fees can eat gains out quickly/deepen one's capital faster than expected.
⚠️The fees vary between brokers, and asset traded - it could be recommended to check on your broker page what are the fees for the asset on your chart, and insert that percentage number.
Another cost ignored, even more, is the Slippage.
i.e. think about a Stop-Loss being hit, and we're so confused because we see on the chart that NEVER the price came even close to your SL level, but... it got hit anyway.
Yes! we know how frustrating it is, but that's the game we're playing, and trading should never be about blaming the game, but only blaming the players/traders/ourselves.
Blaming the game constantly is likely to not end with good performance results, but accounting for this "risk", and being able to quantify it is an incredible hedge. #bold #statement #level #10000
5.10 🔔 Alerts 🔔
By design, the alerts aren't available for strategy scripts. But this script is an... indicator so why should we not enjoy all the cards in our hands the fullest.
We enabled the alerts on the:
1. Main BUY/SELL Entry
2. Pyramiding BUY/SELL Entries
3. Exit Signals such as stop-loss, take-profit, hard-exits
You're welcome :)
VI. 📝 Where are the backtest results? 📝
Answer: in the Data Window section of your TradingView
Now the cherry on the cake if we might say so. A backtest is cool, but visualizing results is actually the end goal here.
Our PREMIUM users benefit from way more analytics than the PRO users.
More info available on our website.
The Data Window is dynamic - it means whenever you'll mouseover at a give time on your chart, the data on that panel automatically updates.
Let's assume you're backtesting your idea between Sept 1st, 2019, and Oct 1st, 2019.
If your mouse cursor is located (or hovered) at a candle on Sept 14th, 2019 (data chosen randomly for this example), then the data displayed only includes the results between Sept 1st, and Sept 14th.
More info available on our website with a nice tutorial video. Data window metrics and filters explained on our website
Here's what the data window looks like: imgur.com
If you have any doubt or question, please hit me up directly or ask in the comments section of this script.
I'll never claim I have the best trading methodology or the best indicators.
You only will judge and I'll appreciate all the questions and feedback you're sending my way.
They help me a ton to develop indicators based on all the requests I received.
Kind regards,
Dave
Backtest PRO Suite+ (Plug & Play)Hello traders
I. SCRIPTS ACCESS AND TRIALS
1. For the trial request access, they have to be done through my website .
2. My website URL is in this script signature at the very bottom (you'll have to scroll down a bit and going past the long description) and in my profile status available here : Daveatt
Due to the new scripts publishing house rules, I won't mention the URL here directly. As I value my partnership with TradingView very much, I prefer showing you the way for finding them :)
3. Many video tutorials explaining clearly how all our indicators work are available on your website > guides section.
4. You may also contact me directly for more information
II. Backtest PRO Suite+ (Plug & Play)
2.1 Forewords
This indicator is available only to our PRO 12 months users. YES! I said indicator, and not strategy or backtest for an excellent reason.
We wanted to make it as generic as possible and allow anyone to connect any indicator of his/her choice in a few clicks only.
This is NOT possible (in TradingView) with a strategy/backtest, but only with an indicator - that's why we worked on recoding the whole backtest logic as an indicator.
The PRO edition does not handle any pyramiding/re-entry - as such enters only once per trend by design. This feature is reserved for our PREMIUM users.
2.2 🔎 Concept 🔎
This is an indicator that I saw on TradingView and was introduced by the @Pinecoders account on TradingView.
I inspired myself from his Backtest Engine to offer a version more adapted to my vision - The benefits of connecting yourself any indicator to our Backtest engine are amazing and huge.
The concept can't be more simple. Imagine using any indicator and connecting to a backtest system in a single click.
You may connect your Algorithm Builder also to this complete backtesting system in a single click.
What's better between paying thousands for a backtest, or connecting yourself your indicator to your backtest with a click?
That was a rhetoric question, but you can still share your answer with me if you want to :)
III. The amazing benefits of our🔌&🕹️ (Plug&Play) system
Issue #1 💲 A BACKTEST SYSTEM IS COSTLY 💲
Hiring a developer to code a custom indicator is costly. For a custom backtest it's even more expensive as those scripts are very often way more complicated.
Now imagine, that now that you see your idea live on a chart, you'll realize you'll have to finance another backtest system, as the one you have is not compatible with your new idea.
Solution #1 💲💲 YOU COULD BE SAVING SOME MONEY 💲💲
just because it won't be needed to hire someone else for each of your trading idea.
We will never guarantee your success on the market, but THIS I stand by it any day any hour.
You can connect any indicator or your choice by updating your indicator slightly and connecting it to our Backtest engine. We send the tutorial for doing it to all our customers.
Issue #2 🕔 IT'S TIME-CONSUMING 🕔
Even if someone is doing all the coding for you, it might require days/weeks depending on your overall trading strategy/idea.
Without even counting the time for you to test/validate the work done and all the back-and-forth to fix all the issues.
Solution #2 SAVING TIME MIGHT EQUATES TO SAVING MONEY : 🕔 = 💲💲💲
I wish it could be as easy as going from weeks of coding to "1 single click" :)
I did the heavy-lifting, but you'll have to make the last effort the cross the finishing line. I made it easy for you to play with it and find a configuration that makes sense to YOU and for your strategy/asset/timeframe
Issue #3 ❌ IT'S COMPLICATED ❌
Someone did a backtest code for you, but... you can't update it because you either :
- don't know anything in programming
- ... and don't have time to learn (most of us have a job/family/...life)
- The system you have is way too specific for one of your previous idea, but can't be updated easily for your next trading ideas. I see a lot of traders nodding right now thinking "that's soooooo true !!!!"
Solution #3 🎉 WE MADE IT EASY AND FUN 🎉
Our goal is to externalize the technical stuff that you don't want to take care of - so that you can finally focus on your trading and optimizing your ideas. #bold #statement
In case you're wondering, no we're not reading your mind :), but we're also traders who didn't know how to code before and had to hire external programmers to do the heavy work for us.
You can be sure that most of the frustrations (trading, technical, ...) you have/had, we had them also and that's why we created this backtest indicator.
III. 🔌&🕹️
Hope you're ready to be impressed. Because, what I'm about to introduce, is my best-seller feature - and available across many of my indicators.
In TradingView, there is a feature called "Indicator on Indicator" meaning you can use an external indicator as a data source for another indicator.
I'm using that feature to connect any external indicator to our Backtest PRO Suite+ (Plug & Play) - hence the plug and play name. Please don't make it a plug and pray :) it's supposed to help you out, not to stress you even more
Let's assume you want to connect your Algorithm Builder Single Trend+ to your Backtest PRO Suite+
I mentioned an Algorithm Builder but you may connect any oscillator (MACD, On balance volume, stochastic RSI, True Strenght index, and many more..) or non-oscillator (divergence, trendline break, higher highs/lower lows, candlesticks pattern, price action, harmonic patterns, ...) indicators.
THE SKY IS (or more likely your imagination) is the limit :)
Fear no more. The Plug&Play technology allows you to connect it and use it the backtest calculations.
This is not magic, neither is sorcery, but certainly is way beyond the most awesome thing I've ever developed on TradingView (even across all brokers I know). #bolder #statement
TradingView is the best trading platform by far and I'm very grateful to offer my indicators on their website.
To connect your external indicator to ours, we're using a native TradingView feature, which is not available for all users.
It depends on your TradingView subscription plan ( More info here )
If you intend to use our Algorithm Plug&Play indicator, and/or our Backtest Plug&Play suites, then you must upgrade your TradingView account to enjoy those features.
We value our relationship with our customers seriously, and that's why we're warning you that a compatible TradingView account type is required - at least PRO+ or PREMIUM to add more than 1 Plug&Play indicator per account.
We go in-depth on our website why the Plug&Play is an untapped opportunity for many traders out there - URL available on my profile status and signature
IV. 📊 Make it nice! 📊
Now we're getting right into the fun stuff.
Let's explore briefly each display option (symbolized by a 👁️🗨️ in the Backtest UI) :
- Color Traded Background : Color the chart background is green when in a BUY trade, in red when in a SELL trade. If the Backtest is not in a trade, then the background won't be colored.
- Show Entry/Exit Markers : Displays the entries (Enter Long/Enter Short), and exits (Exit Long/Exit Short) labels.
- Show Entry Level :Displays a blue level line to easily identify the entry price of a trade.
- Show Take Profit Level : Display a purple line to visualize where the Take Profit level is (we'll explain below how to set it up).
- Show In-Trade Stops : Display the stop-loss
V. Backtesting filters
A backtest should have some filters helping the traders testing a few hypotheses. Well.... we included a ton of them - even for the PRO version
Once again, thank you @Pinecoders for the help and support you gave me
5.1 ▄ █ Position sizing █ ▄
- 1. % of Equity: If selected, the position size used is the input to the right of 1. % of Equity.
Example: The trader starts with a capital of 100K. After a winning trade, your total capital is $103K - for the next trade the position size will be 3% of $103K
- 2. % of Capital: If selected, the position size used is the input to the right of 2. % of Capital.
In other words, the position size will always be the same position size as calculated on the initial capital.
Example: The trader starts with a capital of 100K. After a winning trade, your total capital is $103K - for the next trade the position size will be 5% of $100K. (As 100K is the initial capital used in our dummy example)
5.2⛔ Entry Stops and In-Trade Stops ⛔
We didn't reinvent the wheel here. Any good backtest should offer an entry stop-loss and an in-trade stop-loss.
Giving only here also an example among all the use cases. For instance, the trader sets a stop-loss 2% at the time of entry on your trade, but once the trade moves in the desired direction, the trader might want a trailing stop-loss using a 4% input.
Example: A trader goes LONG on only 1 "ABC" stock evaluated $10 per share.
1) The entry-stop loss will be 2% away so set at $8
2) A candle
3) The trailing stop will activate, and move the stop-loss from the entry stop-loss level (=$8) to $8.32 (=4% move up from $8) - and so on, and so forth for each time the price moves 4% up
The entry and in-trade stop losses can absolutely be identicals. There is no universal rule, and as always you know the drill - all depends on your backtest, and indicator configurations as a whole.
Last, but not the least, selecting an Entry stop-loss is mandatory, but the in-trade stop-loss is not. Up to you to decide if the in-trade SL is needed for your Backtest strategy.
5.3 ❌ Hard Exits ❌
We included the MACD hard exit indicator in the backtest - as we did also for the Algorithm Builders.
The hard exit (or invalidation) is a fundamental part of my trading method.
I explained numerous times on TradingView, our website, and social media channels why I "love" this concept so much, and how it saved my trading account numerous times from getting savagely wrecked by the market.
5.4 💲💲 Take Profit 💲💲
We only included 1 level of Take Profit so far. We'll work on adding at least one more soon.
You can set your Take Profit level based on either a:
1- Fixed value
2 - Percentage value
5.5 📆 Date Range Filtering 📆
If enabled, the backtest only uses the data between the starting and the ending dates of the defined range.
5.6 ❗❗ Fees and Slippage ❗❗
Too often completely ignored by many traders, the fees can eat gains out quickly/deepen one's capital faster than expected.
⚠️The fees vary between brokers, and asset traded - it could be recommended to check on your broker page what are the fees for the asset on your chart, and insert that percentage number.
Another cost ignored, even more, is the Slippage.
i.e. think about a Stop-Loss being hit, and we're so confused because we see on the chart that NEVER the price came even close to your SL level, but... it got hit anyway.
Yes! we know how frustrating it is, but that's the game we're playing, and trading should never be about blaming the game, but only blaming the players/traders/ourselves.
Blaming the game constantly is likely to not end with good performance results, but accounting for this "risk", and being able to quantify it is an incredible hedge. #bold #statement #level #10000
5.7 🔔 Alerts 🔔
By design, the alerts aren't available for strategy scripts. But this script is an... indicator so why should we not enjoy all the cards in our hands the fullest.
We enabled the alerts on those Backtest Entry/Exit signals. You're welcome :)
VI. 📝 Where are the backtest results? 📝
Answer: in the Data Window section of your TradingView
Now the cherry on the cake if we might say so. A backtest is cool, but visualizing results is actually the end goal here.
The Data Window is dynamic - it means whenever you'll mouseover at a give time on your chart, the data on that panel automatically updates.
Let's assume you're backtesting your idea between Sept 1st, 2019, and Oct 1st, 2019.
If your mouse cursor is located (or hovered) at a candle on Sept 14th, 2019 (data chosen randomly for this example), then the data displayed only includes the results between Sept 1st, and Sept 14th.
More info available on our website with a nice tutorial video. Data window metrics and filters explained on our website
Here's what the data window looks like: imgur.com
If you have any doubt or question, please hit me up directly or ask in the comments section of this script.
I'll never claim I have the best trading methodology or the best indicators.
You only will judge and I'll appreciate all the questions and feedback you're sending my way.
They help me a ton to develop indicators based on all the requests I received.
Kind regards,
Dave
Profitable Moving Average CrossoverHi everyone!
Introduction
A popular use for moving averages is to develop simple trading systems based on moving average crossovers. A trading system using two moving averages would give a buy signal when the shorter (faster) moving average advances above the longer (slower) moving average. A sell signal would be given when the shorter moving average crosses below the longer moving average. The speed of the systems and the number of signals generated will depend on the length of the moving averages.
There are many types of averages that are based on different techniques. Each type has its drawbacks and merits. And if we decide to choose a certain type of average for the trading system, then how do we know that our choice is optimal?
What is this tool?
This tool will help you to choose this type to create the most profitable trading system based on crossovers for the specified periods. It backtests pairs of each type throughout the whole instrument's history and shows Net Profit curves as a result. So, the type of the most profitable crossover system will be at the top of list of labels on the chart. (Click on the price scale, point to "Labels" and switch off "No Overlapping Labels" option).
Settings
The main settings are periods for each type pair of fast and slow moving averages.
Additionally, it allows to customize some multi-parametric moving averages such as JMA, ALMA, McGinley Dynamic, Adaptive Laguerre Filter etc.
1st Period (default: 14 )
2nd Period (default: 50 )
1st ALF Median Length (default: 5 )
2nd ALF Median Length (default: 5 )
1st ALMA Offset (default: 0.85 )
1st ALMA Sigma (default: 6 )
2nd ALMA Offset (default: 0.85 )
2nd ALMA Sigma (default: 6 )
1st HF Scaling Factor (default: 3 )
2nd HF Scaling Factor (default: 3 )
1st JMA Phase (default: 50 )
2nd JMA Phase (default: 50 )
1st MD Constant (default: 0.6 )
2nd MD Constant (default: 0.6 )
1st MHLMA Range (default: 10 )
2nd MHLMA Range (default: 10 )
1st PWMA Power (default: 2 )
2nd PWMA Power (default: 2 )
1st REMA Lambda (default: 0.5 )
2nd REMA Lambda (default: 0.5 )
1st RMF Median Length (default: 5 )
2nd RMF Median Length (default: 5 )
1st T3 Alpha (default: 0.7 )
2nd T3 Alpha (default: 0.7 )
MAMA & FAMA Fast Limit (default: 0.5 )
MAMA & FAMA Slow Limit (default: 0.05 )
Supported types of averages and filters (use short titles to match averages on the chart)
AHMA , Ahrens MA (by Richard D. Ahrens)
ALMA , Arnaud Legoux MA (by Arnaud Legoux and Dimitris Kouzis-Loukas)
ALF , Adaptive Laguerre Filter (by John F. Ehlers)
ARSI , Adaptive RSI
BF2 , Butterworth Filter with 2 poles
BF3 , Butterworth Filter with 3 poles
DEMA , Double Exponential MA (by Patrick G. Mulloy)
DWMA , Double Weighted (Linear) MA
EDCF , Ehlers Distance Coefficient Filter (by John F. Ehlers)
EHMA , Exponential Hull MA
EMA , Exponential MA
EVWMA , Elastic Volume Weighted MA (by Christian P. Fries)
FRAMA , Fractal Adaptive MA (by John F. Ehlers)
GF1 , Gaussian Filter with 1 pole
GF2 , Gaussian Filter with 2 poles
GF3 , Gaussian Filter with 3 poles
GF4 , Gaussian Filter with 4 poles
HFSMA , Hampel Filter on Simple Moving Average
HFEMA , Hampel Filter on Exponential Moving Average
HMA , Hull MA (by Alan Hull)
HWMA , Henderson Weighted MA (by Robert Henderson)
IDWMA , Inverse Distance Weighted MA
IIRF , Infinite Impulse Response Filter (by John F. Ehlers)
JMA , Jurik MA (by Mark Jurik, )
LF , Laguerre Filter (by John F. Ehlers)
LMA , Leo MA (by ProRealCode' user Leo)
LSMA , Least Squares MA (Moving Linear Regression)
MAMA & FAMA , (by John F. Ehlers, special case that used as a benchmark)
MD , McGinley Dynamic (by John R. McGinley)
MHLMA , Middle-High-Low MA (by Vitali Apirine)
PWMA , Parabolic Weighted MA
REMA , Regularized Exponential MA (by Chris Satchwell)
RMA , Running MA (by J. Welles Wilder)
RMF , Recursive Median Filter (by John F. Ehlers)
RMTA , Recursive Moving Trend Average (by Dennis Meyers)
SHMMA , Sharp Modified MA (by Joe Sharp)
SMA , Simple MA
SSF2 , Super Smoother Filter with 2 poles (by John F. Ehlers)
SSF3 , Super Smoother Filter with 3 poles (by John F. Ehlers)
SWMA , Sine Weighted MA
TEMA , Triple Exponential MA (by Patrick G. Mulloy)
TMA , Triangular MA (generalized by John F. Ehlers)
T3 , (by Tim Tillson)
VIDYA , Variable Index Dynamic Average (by Tushar S. Chande)
VWMA , Volume Weighted MA (by Buff P. Dormeier)
WMA , Weighted (Linear) MA
ZLEMA , Zero Lag Exponential MA (by John F. Ehlers and Ric Way)
NOTE : The results may vary on different tickers and timeframes.
If you see the preview result it doesn't mean that these crossovers will be profitable on other instruments and timeframes. This is a normal situation because time series and their characteristics differ.
I know that because I tested this tool before publishing.
NOTE 2 : You can use this tool by yourself and experiment with it, or you can order a study and I will share the spreadsheet that contains results with you.
Good luck!
Jack MA Cross Alerts with TP, SL, TSLAlerts for:
Jack MA Cross is works based on a MA Crossover. What makes this script unique is the framework built behind it. With the ability of adding TP, SL, and TSL. It makes this script more advanced compare to other traditional MA Crossover scripts.
Will add more Moving Averages in the future, making this the Jack of all Trades .
To request a trial for this script, please PM me.
-----------------
Jack MA Cross V1.0.0
- Initial release