INVITE-ONLY SCRIPT

MACD Optimizer Pro [Kioseff Trading]

Updated
Massive update! This script now includes 12 different moving averages and 30+ built-in technical indicators to enhance your trading strategy optimization! (:

This script (MACD Optimizer Pro) allows the user to optimize and test hundreds of MACD strategies, simultaneously, in under 40 seconds. Of course, theoretically, an unlimited number of trading strategies can be tested with the MACD Optimizer Pro. After the optimization period - the MACD Optimizer Pro will show the most profitable MACD strategy or, should you choose, the highest win-rate MACD strategy or the most-efficient MACD strategy!

Optimization results can be backtested and verified using the native TradingView backtester - which is included in the MACD Optimizer Pro - and made easy to use! This feature makes settings alerts a simple practice!

Features


  • Test hundreds of MACD strategies, simultaneously, in under 40 seconds.
  • Optimize long MACD strategies and short MACD strategies.
  • 12 different built-in moving averages included to improve your MACD strategy.
  • 30+ built-in technical indicators to improve your MACD strategy.
  • Runs as a strategy script - profit factor, PnL , win-rate, number of trades, max drawdown, equity curve and other pertinent statistics shown.
  • Alerts
  • Optimize any MACD setting
  • Profit targets, trailing stops, fixed stop losses, and a binary MACD strategy can all be tested.
  • Strategies can be optimized for highest win rate, highest net profit, most efficient profit.
  • Limit orders can be simulated.
  • External indicators can be used for optimization i.e. your own, custom-built indicator, an indicator from your favorite author, or almost any publicly available
    TradingView indicator.
  • Date range for optimization and backtesting are configurable.


Explanation

snapshot

The image above shows a list of configurations for the optimizer. You can

You can test hundreds of different MACD settings in under 40 seconds on any timeframe, asset, etc.

snapshot

The image above shows additional settings to filter the outcome of your optimization testing. Additionally, you can test an unlimited number of profit targets and stop losses!

You can add one of several built-in TradingView indicators to filter trade entries.

snapshot

The image above shows all built-in moving averages and TradingView indicators that can be incorporated into your MACD strategy.

Additionally, you can add your own, custom indicator to the optimization test, your favorite indicator by your favorite author or almost any publicly available indicator on TradingView.

snapshot

The image above shows the settings section in which you can implement this feature.

snapshot

The image above shows an example of the custom indicator feature! In this instance, I am using the public indicator titled "Self-Optimizing" RSI and requiring it to measure below a level prior to entry! Almost any custom indicator, your favorite indicator, etc. is compatible with this feature!

The MACD Optimizer has improved user friendliness over previous versions. The optimizer can be as simple or complex as you'd like - capable of handling both "easy" and "difficult" tasks at your discretion.


Additionally, you can configure the optimizer to prioritize MACD strategies that earn profit most efficiently!

snapshot

The image above shows this feature in action.

You can also configure the optimizer to prioritize MACD strategies that achieve the highest win rate!

snapshot

The image above shows this feature in action.

Instructions

The instructions below show a rudimentary approach to using the optimizer.

1. Build your strategy in the settings.

You should also disable the "Run a Backtest" feature to improve load times during optimization.

snapshot

The image above shows my custom strategy settings.

Now that you've got some data on your chart - you should try "Freezing" the "Smoothing" setting for MACD . When doing this, the optimizer will test hundreds of MACD settings with a fixed "Smoothing" setting. Try using the best "Smoothing" setting you were able to find for your initial testing.

2. Take the best "Smoothing" setting and test various MACD and Signal Lengths.

snapshot

The image above shows me configuring the MACD Optimizer to test different MACD line lengths and Signal line lengths with a fixed "smoothing" setting.

From the results, we can see that there are better MACD settings than what was shown in our initial test!

With this information we can execute a TradingView backtest.

3. Execute a TradingView Backtest.
You must enable the "Run a Backtest" feature to perform a TradingView backtest. Additionally, it's advised to enable the "STOP OPTIMIZATION" feature when performing a TradingView backtest. Enabling this feature will improve load times for the backtest to only a few seconds (since the optimizer won't look for the best setting when this feature is enabled).

snapshot

The image above shows completion of the process!

From here, you can perform further testing, set alerts, etc.

Backtest Settings Shown

Initial Capital: The initial capital used for the shown backtests is $3,500 USD. Set the initial capital to replicate your true starting capital (: PnL for the MACD strategies (listed in table) is calculated using a starting capital of $10,000 USD.

Slippage: The slippage settings for the displayed backtest was set to 2 ticks.

Commission: Commission was adjusted to 0.1%.

Verify Price for Limit Orders was set to 2 ticks.

Optimization

Trading system optimization is immensely advantageous when executed with prudence.
Technical-oriented, mechanical trading systems work when a valid correlation is methodical to the extent that an objective, precisely-defined ruleset can consistently exploit it. If no such correlation exists, or a technical-oriented system is erroneously designed to exploit an illusory correlation (absent predictive utility), the trading system will fail.

Evaluate results practically and test parameters rigorously after discovery. Simply mining the best-performing parameters and immediately trading them is unlikely a winning strategy. Put as much effort into testing strong-performing parameters and building an accompanying system as you would any other trading strategy. Automated optimization involves curve fitting - it's the responsibility of the trader to validate a replicable sequence or correlation and the trading system that exploits it.


Thanks for checking this out!








Release Notes
Added table color and table text color options!
Release Notes
New Restriction Compliant
Bands and ChannelsMoving Average Convergence / Divergence (MACD)macdcrossmacdcrossovermacddivergencemacdivergencemacdoptimizermacdsignalmacdstrategymultitimeframe

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 KioseffTrading 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.

Author's instructions

Want to use this script on a chart?

Warning: please read before requesting access.

•Access to Next-Gen Optimization Tools: kiosefftrading.com

•Discord Server: discord.gg/3cKVU28Z9Z
Also on:

Disclaimer