OHL Trading Strategy (Amibroker Code)
The original strategy can be found here.
The logic in plain English:
- When the close of the 15 min intraday bar is higher than the open, we go long at the open of the next bar.
- Today’s opening price is higher that yesterday’s closing price.
- We sell at the close of the day.
Amibroker code:
Buy = TimeNum()>=094500 AND TimeNum()<100000 AND Ref(C,-1)>Ref(O,-1) AND TimeFrameGetPrice("O",inDaily,0)>TimeFrameGetPrice("C",inDaily,-1);
BuyPrice=Open;
Sell = TimeNum()>=154500 ;
SellPrice=Close;
