New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.
Need help in scanning this query , Toby Crabel – 2-Bar Narrow Range (NR) pattern is defined as the narrowest range from high to low of any two day period relative to any two day period within the previous 20 market days (Look_Back).
0
Comments
https://chartschool.stockcharts.com/table-of-contents/trading-strategies-and-models/trading-strategies/narrow-range-day-nr7
NR7 in Uptrend After Pullback
This scan reveals stocks that have just had an NR7 day during an uptrend (as indicated by the Aroon indicator values) and whose CCI values indicate an oversold condition.
[type = stock]
and [country = us]
and [daily sma(20,daily volume) > 100000]
and [daily sma(60,daily close) > 20]
and [Range < 1 day ago Min (6, Range)]
and [today's high < yesterday's high]
and [today's low > yesterday's low]
and [Min (5, CCI(10)) < -100]
and [Aroon Up (63) > Aroon Down(63)]
[group is sp500]
and [[min(2,high) - max(2, low)] < min(20, min(2,high) - max(2, low) ) ]
You could try writing it out long hand. Each time you add a new day, your get fewer results.
and [max(2,high) - min(2, low) < 20 days ago max(2,high) - 20 days ago min(2, low) ]
and [max(2,high) - min(2, low) < 19 days ago max(2,high) - 19 days ago min(2, low) ]
and [max(2,high) - min(2, low) < 18 days ago max(2,high) - 18 days ago min(2, low) ]
and ... etc.
Or, this isn't perfect, but it's shorter and it may be a reasonable approximation.
[group is sp500]
//and [ATR(2) < ATR(20)*.7]
For any solution, you might want to add a few conditions as suggested above in the previous post to minimize false hits.
and [Range(2) < 1 day ago Min (20, Range(2))]
I put ATR2 on the chart and a 20 Price Channel overlay on that to "test". Hey, maybe that's another way to scan perhaps
ATR2 < than 1 days ago Lower Price Chan 20, ATR2
and [[min(2,high) - max(2, low)] < min(20, min(2,high) - max(2, low) ) ], Kindly check this
@ Imkwin : ATR2 < than 1 days ago Lower Price Chan 20, ATR2 Kindly elaborate do you mean, ATR2 < 1 day ago(min(20, ATR(2)
This is the one that I think is logically correct but doesn't get hits for the many dates I sampled. That seems improbable, so I'm not sure what's wrong. It subtracts the two day low from the two day high, which seems to be the right thing to do. However, I'm not sure whether you can really do reliable calculations inside the max and min functions, even though it passes syntax and the first version gets results. The documentation doesn't show that you can, but it doesn't say you can't, either. That might be a question for Support.
and [max(2,high) - min(2, low) < min(20, max(2,high) - min(2, low) ) ]