Thanks. I'm not sure how I can apply this to my code though?
Here is my code. As I said before, all I would like to do is have the tbh
not have to be exactly a two bar high but within npips (5 for example)
cheers
AH
tbh = H == Ref(High,-1);
tbl = L == Ref(Low,-1);
PositionSize = -33;
tbhyesterday = Ref( tbh, -1 ); // new array - tbh shifted forward 1 bar
tblyesterday = Ref( tbl, -1 ); // new array - tbl shifted forward 1 bar
HigherHigh = High > Ref( High, -1 );
LowerLow = Low < Ref( Low, -1 );
Buy = tbhyesterday AND HigherHigh;
BuyPrice = Ref ( High, -1 );
Sell = L < Ref(LLV(L,2),-1);
SellPrice = Ref(LLV(L,2),-1);
Short = tblyesterday AND LowerLow;
ShortPrice = Ref ( Low, -1 );
Cover = H > Ref( High, -2 );
On Sun, Apr 27, 2008 at 10:07 AM, Thomas Z. <
tzg@xxxxxxxxxxxxxxxxxxx> wrote:
Hello,
one quick idea:
AbsHighDiff = abs(H - Ref(H, -1));
Dev = AbsHighDiff / (0.01 * H);
ASH = Dev < 1; // Almost same high
// Absolut difference between current
// and past High is less then 1%
// compared to current High
Filter = ASH;
AddColumn(ASH, "ASH");
AddColumn(Dev, "Dev");
Plot(Dev, "Dev", 4, 1);
Thomas
www.PatternExplorer.com