Trading NR7 setup

Status
Not open for further replies.

AW10

Well-Known Member
#51
AW10,
Good to see that our small discussion about NRs & IB has taken a form of a full-fledged thread.

I am trading NR4/7/IB concept in NF since a long time, but only for intraday basis. (may carry forward them for max 2-3 days).
Recently, I have noticed that NF has a tendency of giving a false breakout after range contraction.
I had incorporated this NR4/7/IB study in my mechanical pivot excel file in this thread Post #3
The resulting effect of such range contraction days can be easily since in this excel file which has Nifty Spot & Fut data from Jan 2008.



Usually, this range contraction happens ahead of an important news event, and most of the times, I have noticed that the breakout happens in form of a big gap open. Thus, not much "juice" is left on the following breakout day.
Hence, I usually buy Option Straddles or Strangles when such possibility of NR4-2 or NR7 comes up by 3:15pm.
By 3:30pm, I take suitable straddle/strangle position, and I am already in the trade on the following breakout day.
Hi Sunil, I am delighted to see your post with real life experience on this thread.
You made my weekend.

Thanks for enhancing your sheet to reflect this as well. Maybe TJ members will find that more useful.

Yes, I agree that NR7 breakout in last 3 /4 months have not been very successful since inter-day basis.. but the understanding of them gives good edge for intraday trading.
Generally the next 1 day or next 2 days see range expansion and hence intraday players can benefit from letting their profits run.

Beauty of this setup is that it gives the entry very close to the the logical stops that are at PH/PL which are very close to the entry level due to narrow bar.

Happy trading.
 

AW10

Well-Known Member
#52
I am strongly AGAINST using Nifty Spot data for such NR concept. I think, by now, everyone knows about the reliability (or, unreliability) of Spot's High & Low (especially, on big gap open days).
For example, in case of a gap up, the recorded Low of spot would be (99% of times) very close to prev. close, and which will not correlate with Nifty Future's Low.

So, I focus ONLY on Nifty Future's High & Low for such setup. I just confirm with SPot's data to confirm the prevalence of similiar NR4-2 or NR7 or IB.



By the way, as on 19-June-09's close, we have NR4 as per Nifty SPot, but nothing as per NIfty Future.
As aforementioned, this is due to big gap down opens on 15th & 16th and flat open on 18th, which renders Spot data calculation inaccurate.
Sunil,
Due to lack of futures data, I suggested that to earlier.
But now when we have this data from start of 2008, probably bandlab2 can change the approach.
In my view, we shd use the data of instrument that we can trade. Certainly Nifty Spot
is not suitable for trading.. But as far as testing of setup is concerned, we can make reasonable assumption and continue.

Bandlab2 - it might be rework for you but plz take a call on whether u want to use NF data or not.

19-June was infact NR6 day on Nifty spot. Though the range is smallest of last 6 days but it still above 100 points.. IMO, most likely we might see a day with still narrower range then 100 points. Let us see what comes next..

Happy Trading
 

lvgandhi

Well-Known Member
#54
Without examining the output of the exploration I do have some comments in regards to the modification you made. Adding the TimeFrameSet(inDaily); statement may not give you accurate results if your intraday data includes trades which occur outside of market hours. When you set the time frame to daily from within an intraday database, the code does not know when the market opens or closes and simply uses the values available in the entire 24 hour period of each day. While this may be what you intend, I have not found anyone using data outside of regular market hours to calculate NR's of any type, nor pivots.

Does this help explain the results you are getting with this modified code?

Dry :)
Thanks for your efforts.
First I must admit I am not an expert in afl programming.
I agree it may take values beyond market hours. But I think that may be final stages of refining.
Now first even after giving last one day for exploring it gives values of as far as 2008 sep. I would like to know why this happens.
second I wanted to know is there any mistake in my using timeframeset and timeframerestore which includes everything?
 

bandlab2

Well-Known Member
#55
my bad. i took the excel posted as an examle in prev posts, i didnt realize they are spot prices. howver i took futures charts to compare the trades.

now where do i get futures data O, H, L,C? yahoo gives only SPOT. I need as a flat file. also where can i get historical intraday charts for nifty (i use investbulls free charts, but i cant get them by date, i get eveything from NOW till back date)
 

bandlab2

Well-Known Member
#56
coupl of issues with nifty futures. premium fluctuates and sometimes goes into discount , this may result in 'false' NR7. In my view we shoul also check spot and if both confirm NR7 then it gives us more confidence

how do u handle the expiry? we approach the expiry, cuent month and next month may have some variations, the premium o curent month would be neaing zero whereas prem of next month would be at highest.

i think this may work well for some strong nifty scipts like SBI, RIL since cash price will not have above issues. but problem is we cant carry cash positions to next day(s) unless you take delivey

i like suunil's idea of opeing long/short stradle/strangle on the formation day
 
#57
Thanks for your efforts.
First I must admit I am not an expert in afl programming.
I agree it may take values beyond market hours. But I think that may be final stages of refining.
Now first even after giving last one day for exploring it gives values of as far as 2008 sep. I would like to know why this happens.
second I wanted to know is there any mistake in my using timeframeset and timeframerestore which includes everything?
Ok, I copied the code into Amibroker and ran a scan on my intra-day database. The output of the exploration does show a variety of dates which I believe was your concern? The reason for varying dates in my result, I know are due because not all of the securities are backfilled to the current date. If the last data in a given security is 2 weeks old then this scan is going to give you a date that is 2 weeks old even if you are selecting n=1 for your date range.
Does this answer your question?
Otherwise it does seem to be affective. Although the NR4's and NR7's are thrown off a bit by trading activity that takes place outside of market hours.

Now for comments about specific portions of the code:
The statement for the NR1 seems a bit odd. It does not match my understanding of a true narrow range day. Which should simply be a daily range which is smaller from High to Low then the previous day. I would code it this way:
NR1 = (H-L) < (Ref(H,-1) - Ref(L,-1));
The NR4 and NR7 also seem a bit different. Here is how I code them:
NR7 = (LLV(H-L,7) >= (H-L));
NR4 = (LLV(H-L,4) >= (H-L));

I modified the code and re-ran the exploration. I got different results. But it still does not match the results calculated by an excel spread sheet using the OHLC of only market hours.

I am sorry to say the solution to this is far more complicated then a simple TimeFrameSet(inDaily) statement. For example, I have spent the entire weekend working out a formula which calculates from within a daily End of Day database, the Weekly NR1's, NR4's, NR7's and other price patterns listed in Toby Crabel's book. Having already accomplished this for Daily price patterns within an intra-day database I did not expect it to take so much time to complete. After two days of coding I'm just now wrapping things up.

Two of the core techniques I use to accomplish this are the TimeFrameCompress and TimeFrameExpand functions. The other key function is TimeNum() as this is how to define the market trading hours.

My present trading strategy has no need for an exploration of the type you posted. I simply work with one or two securities, wait for the market open and use the calculated values to place my bracket orders. Perhaps when I get some available time I will incorporate an exploration used to scan for stocks meeting specific price patterns. I will surely post it if/when I get around to it.

Hope this helps.

Dry :)
 

Sunil

Well-Known Member
#58
coupl of issues with nifty futures. premium fluctuates and sometimes goes into discount , this may result in 'false' NR7. In my view we shoul also check spot and if both confirm NR7 then it gives us more confidence

how do u handle the expiry? we approach the expiry, cuent month and next month may have some variations, the premium o curent month would be neaing zero whereas prem of next month would be at highest.
No Bala,
Fut's premium/discount is irrelevant for this topic.
BTW, this is the same subject which we were discussing on YM last weekend with Dhiraj for 2652.
Only addition is this:

The way to deal the following in EOD charts is the same:
NR4-2 (consecutive NR4 days)
NR7
Inside Bar

Buy above bar's high; sell below bar's low.

If any 2 out of the above 3 combine, then I prepare myself for a one-way ride on the following day.
 

Satyen

Well-Known Member
#59
Looks like sunil has documented all NR& days on his excel sheet got what i wanted ............

Satya
 
Last edited:

Satyen

Well-Known Member
#60
AW10,
Good to see that our small discussion about NRs & IB has taken a form of a full-fledged thread.

I am trading NR4/7/IB concept in NF since a long time, but only for intraday basis. (may carry forward them for max 2-3 days).
Recently, I have noticed that NF has a tendency of giving a false breakout after range contraction.
I had incorporated this NR4/7/IB study in my mechanical pivot excel file in this thread Post #3
The resulting effect of such range contraction days can be easily since in this excel file which has Nifty Spot & Fut data from Jan 2008.



Usually, this range contraction happens ahead of an important news event, and most of the times, I have noticed that the breakout happens in form of a big gap open. Thus, not much "juice" is left on the following breakout day.
Hence, I usually buy Option Straddles or Strangles when such possibility of NR4-2 or NR7 comes up by 3:15pm.
By 3:30pm, I take suitable straddle/strangle position, and I am already in the trade on the following breakout day.



hi sunil if this Gap comes as a breakway gap then it will be nice to trade ......

Regards
Satya
 
Status
Not open for further replies.

Similar threads