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

Skrip sumber terbuka

Dalam semangat sebenar TradingView, penulis telah menerbitkan kod Pine ini sebagai sumber terbuka supaya pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda boleh menggunakan perpustakaan ini secara percuma, tetapi penggunaan semula kod dalam penerbitan ini adalah dikawal oleh Peraturan dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Ingin menggunakan skrip ini pada carta?

Penafian