OPEN-SOURCE SCRIPT
Updated

Relative Returns Strategy

3 061
Looks like an ultimate strategy for buy and hold investors.

This is designed based on the indicator :
Stock-Index-Relative-Returns


Converting that into strategy with little optimization yield this. One change here is, instead of using the return percentage directly, we are using moving averages on both of them.

Buy condition : Moving Average on stock return crosses over that of index return.
Sell condition : Moving Average on stock return crosses under that of index return.
Release Notes
Remove calc_on_order_fills

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.