| PureBytes Links Trading Reference Links | The code below could be userfull for looking at daily data from RT 
data stream.
It defines yesterdays values. You can extend the lookback period to 
the 7 days you need...
Ara
QP2_Sym = "!SOX"; eSig_Sym = "$SOX";
Issue = WriteIf(EOD OR Weekly OR Monthly,QP2_Sym,Esig_Sym);
//Issue = WriteIf(EOD OR Weekly OR Monthly,QP2_Sym,Esig_Sym);
Index_C = Foreign(Issue,"Close");
Index_O = Foreign(Issue,"Open");
Index_H = Foreign(Issue,"High");
Index_L = Foreign(Issue,"Low");
//Compute yesterday's from RT data
Daychange = Day() != Ref( Day(), 1 ); 
YIndex_RT = ValueWhen(Daychange, Index_C,1 );
//Compute yesterday's data from EOD data
YIndex_EOD = Ref(Index_C,-1);
Y_Index = LastValue(IIf(EOD OR Weekly,YIndex_EOD,YIndex_RT));
Change = Index_C - Y_Index;
--- In amibroker@xxxx, "wdbaker8" <wdbaker8@xxxx> wrote:
> Hi All,
> Somebody from ET asked if I would code this system, and it looks 
> simple but not sure how to handle the multiple time frame issue
(daily 
> & intraday). Has someone already coded a similar system that I can 
> look at for ideas or any thoughts on this. Here is the system as 
> described to me.
> 
> "Toby Crabel's NR7 system
> Look for the narrowest range bar out of the last 7 on the daily 
> chart. If there are seven bars...the seventh bar must be the 
> narrowest of the previous six. This means volatility has 
constricted. 
> Wait for the next day. 
> 
> Now..wait for the thirty minute range to form. Place a sell order 
one 
> tick below the low of the thirty minute range and a buy order one 
> tick above the high of the thirty minute range. Exit on the close 
of 
> the day." 
> 
> Thanks
> wdbaker
 |