OPEN-SOURCE SCRIPT

Buy & Hold aka. HODL Strategy

Telah dikemas kini
This is a simply HODL or Buy & Hold strategy, which is super useful to see the risk and reward of such a strategy.
The benefit of using this strategy is that you also get to see the Max Drawdown (Risk).
This way you can compare it to the Net Profit (Reward) and decide if it's worth it for you.

This strategy buys on the Start Date and sells either on the End Date or on the last candle if the End Date is in the future.
Remember that the strategy must close the trade (sell) otherwise you don't see any results in the Strategy Tester (this is how it works).
Nota Keluaran
Edited the title of the script to include "Buy & Hold" so people can find it when searching for it.
Nota Keluaran
Fixed a bug where the strategy did not buy at the date given IF slippage is above 0. So I set the slippage to 0.
Anyhow this strategy is for testing an educational purposes only.
educational

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