WizeDec Zero

An overall description
This script is a very high-risk strategy and is meant to show what could be achieved if proper risk management rules are ignored in the right way. This means that all of the great results that you might see with this script can be wiped out with a single very bad trade in a flash crash market situation. Use this script with caution and keep this limitation in mind.

This script is a very simplified long-only script which is meant for constant volatile markets. This means that it is best used on cryptocurrencies and is not suitable to be used on Forex or stock markets. Forex prices do not oscillate enough for the script to find an entry and stock markets can gap between days, which makes them unpredictable. This script is meant to be used by anyone.

This script is meant to be easy to understand and use and is aimed to give you only the most important readings on the chart. The only plot that is seen on the chart with this strategy apart from the strategy entries and exits themselves is the average entry price for a trade. This is described a bit more in detail below.

Where is this meant to be used
As stated above, this script is meant for volatile markets, which see a great absolute difference between the highs and lows of the price. We have tested this to be a good strategy on lower timeframes. More specifically, the default setup shows good results on most of the crypto 5 and 15 minute charts. However, this does not necessarily mean that this cannot be used on higher timeframes. On the contrary - if the average deviation of a currency is not enough for the strategy on a lower timeframe, then you might see better results or more entries on higher timeframes. This is because the price deviates more from the average price on higher timeframes for each candle.

As you might have guessed, then this strategy is meant for short-term trades. This is also indicated by the average duration for each entry. This should preferably be kept below 50 and definitely below 150 when adjusting this strategy for your own currency and timeframe.

How does this script work
This strategy has two conditions for entries. The first one is based on possible reversals, which are calculated based on previous price action. The entries are made based on price oscillation patterns. The entry signals are generated based on direct price action, a couple of built-in indicators and a function designed specifically to detect drops in volatile markets. If a possible reversal (or in other words - pivot point ) is found, then the strategy will make an entry. Each entry is equal in terms of base currency, meaning that there is no martingaling

Additionally, this script has a built-in function, which we have termed range trading. Range trading allows the strategy to take multiple trades during ranging markets. A range trading entry is valid if the previous trade has ended with a take profit and the price has crossed back below the average price of the previous trade without a peak being detected in the time from the take profit signal to the crossing of the current price and the previous average price. The average entry price is seen as an orange line on the chart. It might be important to note that this average price is an arithmetic average of all the entry prices as opposed to a weighted average. This means that the average price deviates from the built-in ‘strategy.position_avg_price’ to make the calculations easier to manage. This difference was not significant enough in our testing to include the weighted average.

If the price does not go in the desired direction, then the script has a safety net. The safety net consists of re-entries at a lower price. They are meant to bring the average price down and thus minimizing losses and lowering the required rise in price in order to make a profit. The strategy will make a maximum of three entries, each being at least 2% further from the previous entry. We say ‘at least’, because these entries are again calculated based on the closing price of the candle. So if a candle right after the previous entry is a red 5% candle, then the next entry will be 5% lower, as it would be executed after the close of that red candle.

The two exit conditions for this script are an exit signal and a take profit signal. This script does not feature any kind of stop-loss, which inevitably makes it a very high-risk / high-reward strategy. If a trade has gone below the average price, then the only option for exit is an exit signal. This exit signal is designed to detect peaks in the price.

The first input - Sensitivity - controls how sharp a peak has to be and how much confirmation of that peak has to precede the peak in order for an exit signal to be valid. Additionally, this input controls how easily entry signals are generated. A higher value of this input will generate more entries and a lower value will generate less entries. This exit signal is based on a couple of built-in indicators, which are meant to detect peaks in the price. If the results on your selected pair and timeframe are not desirable, then try lowering the sensitivity value. The value of this input ranges from 1 to 20.

The second input - Take profit (%) - allows the user to adjust the take profit level. The take profit is calculated from the average entry price and is only executed if the candle closes above the take profit level. This means that this strategy does not place limit orders, but rather calculates the take profit at the end of every candle, based on the closing price. The value of this input represents the minimum percentage gain that has to be achieved for a take profit signal to be generated.

Properties of the script
The third input of this script is ‘Use automatic position sizing’. By default this has been turned off by default and will give you the freedom to adjust the position sizing from the properties section of the inputs. However, please be careful to check that your total position size (each entry size * 3) does not exceed your total equity. Otherwise, you will see results that are not achievable. For example, do not use 100% of equity as your position size, because the strategy tester will then simulate 3 * 100% of your equity for each trade. If using % of equity as your position sizing, then do not exceed 33% of your equity for each entry.

If you would like to see maximum compound interest growth, then turn on the automatic position sizing input. This will automatically allocate 33% of your equity for each trade, meaning that all of your equity will be allocated after all three entries have been made. This does not reflect accurate results if you are not looking to invest with all of your equity into a single trade.

The pyramiding value of this script should be kept at what it is, since there is no reason to change this. It is kept at 20 to counter any possible accidental lowering of this value below 3. If this value is set at a value lower than 3, then the strategy will not be able to make all of the entries and the results will not be what were intended.

The commission value is set at 0.1%, which is the default commission value when trading on Binance trading, for example. Also, the default slippage value is set at 5 to account for any entry and exit deviations from real-world trading. This applies especially for lower-volume coins, meaning that the expected slippage for lower-volume coins is significantly higher than that of very high-volume coins (eg. BTC or ETH). This script does not need to account for price verification for limit orders, as it does not use limit orders in any of its calculations. The possible deviation from real-world trading is account for solely with the slippage value.

We would like to restate that this strategy brings along a very high risk. This is because this strategy does not feature any kind of stop-loss, which means that if you decide to trade based on this strategy, you can lose significant amounts of money in a single trade.

We do not recommend trading based on this strategy if you are not prepared to risk a big portion of your money.

We have made sure that this script does not repaint. This script does not use any function - built-in or custom - which could cause repainting. This has been confirmed by using both the replay function and by using this strategy to take live trades.

If this description didn’t answer some questions of yours, then feel free to leave your comments below or send us a message and we will do our best to answer your questions. This is assuming that the questions do not expect us to disclose the exact logic behind this script.
Release Notes: We have removed the controls for the sensitivity and take profit levels and replaced all settings with 15 built-in templates. These templates can be applied to a wide variety of markets on the 5min and 15min timeframes. These templates include settings for the main inputs of this strategy.

The strategy makes a maximum of 5 entries per trade, each being at least 3.5% lower than the previous entry. Take profit signal will be given if the price is at least 2% over the average trade price.
Release Notes: Added an info panel that displays the top 5 performing templates. For each template, net profit, percent profitable and number of total trades is displayed. This means that it is now even easier to find suitable setups when looking through your watchlist.

The net profit that is displayed in the info panel is an approximate value, as there are slight differences between internal calculations and the calculations made by TradingView that are displayed in the Strategy Tester. All net profit values are calculated using compound interest growth.

For the percent profitable calculations in the info panel, every entry is not counted separately, but rather entries that belong to one trade are counted as one. This means that if a trade has multiple entries, then it is still considered to be one trade, as they all belong to the same one and are exited on the same condition. If the first entries of a trade are higher than the exit price, but the average price of the same trade is still below the exit price, then that trade is counted to be profitable.

The amount of total trades is also calculated the same way. Not all entries are counted separately, but rather the amount of trades is counted. A trade can have multiple entries and still be considered as one trade.
Release Notes: Added an option to generate more signals in sideways and uptrend markets. This input is called “Higher sensitivity in uptrends”.

Bug fixes.
Release Notes: Added three additional templates. There are now 18 templates for you to choose the best one for you!

Improved the functioning of the uptrend filter and with it, increased the amount of profitable trades even more.

Updated the looks and functioning of info panel. The info panel can now also show net profit percentages without compound interest. This can be seen when "Simulate compound interest growth" is turned off. The amount of trades is no longer displayed in the info panel.
Release Notes: v2.5

- Updated "Higher sensitivity in uptrends" functionality.
Release Notes: - Considering the ever-changing market conditions, some templates got reworked. These revised templates were 2, 3, 5, 7, 8, 11, 16.
Release Notes: Added another set of templates, called “Risk-based templates”. Previously used templates can now be found under “Legacy templates”. Templates 16, 17, 18 have been removed from “Legacy templates”

“Risk based” templates are ordered in such a way that the higher the template number is, the higher the risk that comes with that particular template. A lower risk template will result in less trades, but will make those trades that are found and taken, safer.

Protected script
This script is published closed-source and you may use it freely. You can favorite it to use it on a chart. You cannot view or modify its source code.

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.

Want to use this script on a chart?