OPEN-SOURCE SCRIPT

4 MA Strategy + Position Management

Updated
// This is a simple crossover Moving Average strategy, good for long term crypto trades.
// It buys when the MA "X" crosses up the MA "Y", viceversa for shorts.
// Both MAs are selectable from the Inputs section in the front panel.
// There is also a Position Management option thats
// sizes positions to have the same USD risk (using leverage) on each trade,
// based on the percentage distance to the stop loss level.
// If you turn this option on you will see how the profit
// grows exponentially while the drawdown percentage almost remains the same.
Release Notes
Changed Initial Capital amount
Release Notes
Tweaked levels
Exponential Moving Average (EMA)Simple Moving Average (SMA)Weighted Moving Average (WMA)

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer