This strategy uses a setup consisting of two Bollinger Bands based on the 20 period 20-SMA +/- (a) upper/lower bands of two standard deviations apart, and (b) upper/lower bands of one standard deviation apart.
We consider price at +/- one standard deviation apart from 20-SMA as the "Neutral Zone".
If price closes above Neutral Zone after a period of consolidation, then it's an opportunity for entry. Strategy will long, anticipating for breakout.
The illustration below shows price closing above the Neutral Zone after a period of consolidation.
Position is exited when prices closes at Neutral Zone (being lower than prior bars)
Nota Keluaran
Updates: - new method for checking price consolidation (i.e. volatility of close price is low whenever coefficient of variation (cv) is below sma(cv,50)) - avoids buying on down trends by not entering if sma(close,20) is below previous bar's value
Nota Keluaran
New features: - strategy will enter into both long and short positions - trailing stop loss gets tightened when price moves sharply in favorable direction (can be toggled on/off for comparison) - added alerts
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.
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.