Re: SH's Intraday Strategy - ELH5 Backtest AFL
Hi Guys,
Based on what I have learned form these posts, I have created an AFL which basically backtests this strategy for intraday data. If you open the AFL as an indicator the Blue bars are those where you are long starting from the first blue bar and red bars are those where you are short from the first red bar. The black bars are those where you donot have any open position. The rules I have defined in this AFL are as under:
1. When 2 successive bars close above the High EMA, it is a buy trigger. The buy trade will be entered on price touching the Low EMA. Vice Versa for Sell Trade
2. Stop Loss and Target will be 20 points.
3. If after entering buy trade, we get 2 successive candles with close below Low EMA then we will exit our buy trade at the close of the second candle which has close below the Low EMA.
4. For simplicity, I am assuming the Buy rate and Sell Rate shall be the EMA Value of Low / High of the previous bar. In real time it may vary marginally.
5. If a Buy / Sell trade has hit stop loss or target, then we will not re-enter in the same direction unless we get an opposite signal.
6. All open positions are closed at 3:25 PM before market close.
7. From the market start, the AFL waits for at least first 2 bars to generate a signal. Previous days open signals are ignored.
I hop I have included all the trading rules as mentioned by tradewithhunter sir. If any modifications are necessary, then kindly let me know and I will change the AFL accordingly and repost it here. I am posting the AFL here, and I request tradewithhunter sir to check the trades and please respond as to whether they are correct.
Regards
Akash
Hi Guys,
Based on what I have learned form these posts, I have created an AFL which basically backtests this strategy for intraday data. If you open the AFL as an indicator the Blue bars are those where you are long starting from the first blue bar and red bars are those where you are short from the first red bar. The black bars are those where you donot have any open position. The rules I have defined in this AFL are as under:
1. When 2 successive bars close above the High EMA, it is a buy trigger. The buy trade will be entered on price touching the Low EMA. Vice Versa for Sell Trade
2. Stop Loss and Target will be 20 points.
3. If after entering buy trade, we get 2 successive candles with close below Low EMA then we will exit our buy trade at the close of the second candle which has close below the Low EMA.
4. For simplicity, I am assuming the Buy rate and Sell Rate shall be the EMA Value of Low / High of the previous bar. In real time it may vary marginally.
5. If a Buy / Sell trade has hit stop loss or target, then we will not re-enter in the same direction unless we get an opposite signal.
6. All open positions are closed at 3:25 PM before market close.
7. From the market start, the AFL waits for at least first 2 bars to generate a signal. Previous days open signals are ignored.
I hop I have included all the trading rules as mentioned by tradewithhunter sir. If any modifications are necessary, then kindly let me know and I will change the AFL accordingly and repost it here. I am posting the AFL here, and I request tradewithhunter sir to check the trades and please respond as to whether they are correct.
Regards
Akash