OPEN-SOURCE SCRIPT

Trading the Equity Curve Position Sizing Example

By shardison
"Trading the equity curve" as a risk management method is the process of acting on trade signals depending on whether a system’s performance is indicating the strategy is in a profitable or losing phase.

The point of managing equity curve is to minimize risk in trading when the equity curve is in a downtrend. This strategy has two modes to determine the equity curve downtrend: By creating two simple moving averages of a portfolio's equity curve - a short-term and a longer-term one - and acting on their crossings. If the fast SMA is below the slow SMA, equity downtrend is detected (smafastequity < smaslowequity).
The second method is by using the crossings of equity itself with the longer-period SMA (equity < smasloweequity).

When Trading with the Equity Curve" is active, the position size will be reduced by a specified percentage if the equity is "under water" according to a selected rule. If you're a risk seeker, select "Increase size by %" - for some robust systems, it could help overcome their small drawdowns quicker.
Portfolio managementpositionsizing
shardison
Need seasonals for futures data on NQ, ES, YM, or other commodities. Check out agresticresearch.com.

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