OPEN-SOURCE SCRIPT

Trend Follow Daily

Hello,

here's a simple trend following system using D timeframe.

we buy at the close when:

market is been raising for 2 days in a row, current close is higher than previous close, current low is higher than previous low, current close is higher than previous close and the current close is above 21-period simple moving average.

we sell at the close when:

current close is higher than previous day's high.

Strategy works best on stock indices due to the long-term upward drift.

Commission is set to $2.5 per side and slippage is set to 1 tick.

You can adjust commission for your instrument, as well play around with the moving average period.

Moving average is there to simply avoid periods when market is the selloff state.
CyclesSimple Moving Average (SMA)Trend Analysis

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明