OPEN-SOURCE SCRIPT

Higher High / Lower Low Strategy

This is a very simple trend following strategy for Day Trading. The premise is to follow the Moving Average for the trend direction and buy/sell the dips and blips in the trend.
1. In an uptrend, when the candle action offers a "dip", or a lower high, the strategy will then buy on the close of the candle that breaks the high of the previous candle.
2. In a downtrend, when the candle action offers a"blip", or a higher low, the strategy will then sell on the close of the candle that breaks the low of the previous candle.
3. The strategy will go Long only or Short only, not both. It must be manually reversed in the settings when a new trend is established.
4. The start month and year allow you to backtest from then until now. It's not one month at a time.
5. The strategy uses a reversal of the Stochastic %K variable as the exist. The setting for Period K controls the exit for backtesting purposes.
6. The strategy uses a moving average to determine the trend. The setting for the Period MA controls the SMA.
7. The strategy has the option of filtering the number of trades based on the direction of the MACD and/or the Signal line. This can either reduce or increase the probability, and is highly dependent on the price action of the instrument.

WARNING: I am not a licensed financial advisor. This script is intended for entertainment purposes only. I highly recommend you manually enter and exit positions per your own Trading Rules, and do not blindly follow any software or recommendation. Use of this script is elective and at your own discretion, and risk.

If you like this script, please give it a Thumb's Up, and leave a comment. If you would like any custom scripts developed, contact me to discuss it. All of my work here is open and available, free of charge. It can be copied and edited to suit your needs.
Moving AveragesRate of Change (ROC)Simple Moving Average (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