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.

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?

คำเตือน: กรุณาอ่าน ก่อนร้องขอการเข้าถึง

และใน:

คำจำกัดสิทธิ์ความรับผิดชอบ