INVITE-ONLY SCRIPT

Spot Martingale KuCoin - The Quant Science

INTRODUCTION
Backtesting software of the Spot Martingale algorithm offered by the KuCoin exchange.
https://www.tradingview.com/x/JaJA6qwq/

  • This script replicates the logic used by the KuCoin bot and is useful for analyzing strategy on any cryptocurrency historical series.
  • It's not intended as an automatic trading algorithm and does not offer the possibility of automatic order execution.
  • The trader will use this software exclusively to research the best parameters with which to work on KuCoin.


LOGIC OF EXECUTION
The execution of orders is composed as follows:

1) Start Martingale: initial order
2) Martingale-Number: orders following Start Martingale

(A) The software is designed and developed to replicate trading without taking into account technical indicators or particular market conditions. The Initial Order (Start Martingale) will be executed immediately the close of the previous Martingale when the balance of market orders is zero. It will use the capital set in the Properties section for the initial order.

https://www.tradingview.com/x/NV6leC9P/

(B) After the first order, the software will open new orders as the price decreases. For orders following Start Martingale, the initial capital, multiplier, and number of orders in the exponential growth context are considered. The multiplier is the factor that determines the proportional increase in capital with each new order. The number of orders, indicates how many times the multiplier is applied to increase the investment.

https://www.tradingview.com/x/hYBI8FgW/

Example
To find out the capital used in Martingale order number 5, with a Multiple For Position Increase equal to 2 and a starting capital of $100, the formula will be as follows:

Martingale Order = ($100 * (2 * 2 * 2 * 2 * 2)) = $100 * 32 = $3.200

(C) A multiplier is used for each new order that will increase the quantity purchased.
https://www.tradingview.com/x/QQ4n1Ivz/

(D) All previously open orders are closed once the take profit is reached.
https://www.tradingview.com/x/n1eWt71o/

USER MANUAL
The user interface consists of two main sections:

1. Settings

Percentage Drop for Position Increase (0.1-15%): percentage distance between Martingale orders. For example, if you set 5% each new order will be opened after a 5% price decrease from the previous one.

Max Position Increases (1-15): number of Martingale orders to be executed after Start Martingale. For example, if you set 10, up to10 orders will be opened after Start Martingale.

Multiple For Position Increase (1-2x): capital multiplier. For example, if you set 2 each for each new order, the capital involved will be doubled, order by order.

Take Profit Percentage (0.5-1000%): percentage take profit, calculated on the average entry price.

2. Date Range Backtesting[/I]

The Date Range Backtesting section adjusts the analysis period. The user can easily adjust the UI parameters, and automatically the software will update the data.

LIMITATIONS OF THE MODEL
Although the Martingale model is widely used in position management, even this model has limitations and is subject to real risks during particular market conditions. Knowing these conditions will help you understand which asset is best to use the strategy on.

The main risks in adopting this automatic strategy are 2:

1) The price falls below our last order.
It happens during periods of strong bear-market in which the price collapses abruptly without experiencing any pullback. In this case the algorithm will enter a drawdown phase and the strategy will become a loser. The trader will then have to consider whether to wait for a price recovery or to incur a loss by manually closing the algorithm.

2) The price increases quickly.
It happens during periods of strong bull-market in which the price rises abruptly without experiencing any pullback. In this case the algorithm will not optimize order execution, working only with Start Martingale in the vast majority of trades. Given the exponential nature of the investment, the algorithm will in this case generate a profit that is always less than that of the reference market.

The best market conditions to use this strategy are characterized by high volatility such as correction phases during a bull run and/or markets that exhibit sideways price trends (such as areas of accumulation or congestion where price will generate many false signals).

FEATURES
This script was developed by including features to optimize the user experience.

  • Includes a dashboard at launch that allows the user to intuitively enter backtesting parameters.
  • Includes graphical indicator that helps the user analyze the behavior of the strategy.
  • Includes a date period backtesting feature that allows the user to adjust and choose custom historical periods.


DISCLAIMER
This script was released using parameters researched solely for the BTC/USDT pair, 4H timeframe, traded on the KuCoin Exchange (2017-present). Do not consider this combination of parameters as universal and usable on all assets and timeframes.
algorithmautomatedtradingbacktestingcryptomarketkucoinmartingalestatistics

仅限邀请脚本

仅限作者授权的用户访问此脚本,并且通常需要付费。您可以将其添加到收藏中,但是只有在向作者请求并获得许可之后,才能使用它。 请联系thequantscience了解更多信息,或按照以下作者的说明操作。

TradingView不建议付费使用脚本,除非您100%信任作者并了解脚本的工作原理。在许多情况下,您可以在我们的社区脚本免费找到不错的开源替代方案。

作者的说明

This script is not open source. For more details, see the information on our website.

想在图表上使用此脚本?

警告:请在申请访问权限之前阅读

更多:

免责声明