OPEN-SOURCE SCRIPT

Simple 17 BF πŸš€

A Simple Moving Average of period 17 based on ohlc4 values. We go long when price closes above it. We go short when price closes below it. No stop loss. No take profit.

This strategy is really to showcase how effective a basic system can be, and that with discipline and patience, trading does not need to be complex to yield good results over time.

You can change the Moving Average type, source and period in the settings as well as the backtesting range. I found 17 period SMA with ohlc4 to be a good fit for XBT/USD on Daily timeframe but for other pairs, the type, source and period will likely differ.

INSTRUCTIONS
Red turns to Green = Long Entry/Short Exit
Green turns to Red = Short Entry/Long Exit

The entries are based on when price crosses the MA and this is what the backtest is based on. We exit the current trade when we get an opposing signal and enter the new trade.
Simple Moving Average (SMA)sma

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