The Narrow Range Day NR7 Trading Strategy (Amibroker And Tradestation Code)
This article was originally published on Substack.
The strategy in plain English:
- Calculate the High minus Low each day. This is the daily range.
- If today has the lowest daily range of the last seven days, then go long at the close.
- Exit at the close when the close is higher than yesterday’s close.
Amibroker code:
setOption(“holdminbars”,1);
range1=(H-L);
buy= range1<Ref(LLV(range1,6),-1) AND C<Ref(H,-1) ;
BuyPrice=Close;
Sell=Close>Ref(High,-1) ;
SellPrice=Close;
Tradestation code:
If range<lowest(range,6)[1]
then buy this bar at close;
If c>h[1] then Sell this bar at close;
Disclaimer: We are not financial advisors. Please do your own due diligence and investment research or consult a financial professional. All articles are our opinions – they are not suggestions to buy or sell any securities.
