Scale In : Scale Out strategy is an adaptation and extension of dollar-cost-averaging.
As the name implies it not only scales in - allocates a given percentage of available capital to buy at each bar - it also scales out - sells a given percentage of holdings at each bar when a target profit level is reached.
The strategy can potentially mitigate risks...
This strategy will focus on up trend trading and down trend trading based on several indicators such as;
for up trend
1. SAR indicator
2. Super trend indicator
3. Simple moving average for the period of 100
1. RSI Indicator
2. Money flow index
3. Relative volatility index
4. Balance of powder
This strategy has been published for a Pyramiding tutorial on the Backtest Rookies website.
For a full overview of the code and an introduction to Pyramiding check out our site.
The code example will create a simple script that allows us to average down whenever our portfolio is down x%. The idea will be to bring our average cost down so that we can...