Martingale Template

A template example on how to apply the famous Martingale gambling strategy. When your strategy gets an exit signal for your long position that leaves you without profit, you re-enter on the next entry long condition with double the capital of the previous amount entered with. You keep doubling the amount of capital entered with until you finally exit with a profit. If the strategy isn't sound enough then it could take several attempts and it can take only as much as a dozen tries to eat away at all your capital as the capital required to double on the next entry increases greatly over time by consecutive products of 2.

The strategy used is just a simple moving average crossover, above the moving average is going long, below the moving average is going short. It can be replaced with whatever strategy that you want. The colored vertical bars show long and short positions and exits. The default option on the tick box under the settings show the number of attempts at entering before finally exiting with a profit, the other option shows the amount of capital it took starting from 1.
Skrip open-source

Sejalan dengan semangat TradingView, penulis skrip ini telah mempublikasikannya secara open-source, sehingga para trader dapat memahami dan memverifikasinya. Salut untuk sang penulis! Anda dapat menggunakannya secara gratis, tetapi penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk dapat menggunakannya didalam sebuah chart.

Inggin menggunakan skrip ini pada chart?