Martingale TemplateA 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.
Betting
Decent Martingale Strategy [Pinescript v3]In my experimentation to add some sort of hedging to trades, I stumbled on the Martingale roulette betting strategy.
If it works in the casino, why not here?
The principle is simple:
If you lose a trade, immediately go the opposite direction and double your bet.
In this case, we're just applying a multiplier.
The strategy is a simple EMA crossover - defaulted to my favorite periods 8 and 62.
Enjoy :) I'll make a new one that's contained in a function, so you can simply implement it in your own strategy and have it monitor winning/losing trades automatically.
Cheers,
DasanC