[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

triangle finding formula



PureBytes Links

Trading Reference Links


Hi All the follow formual is one used in metastocks 
to locate triangle patterns
but i cant seem to get it to work with Amibroker 

can anyone spot wher i have gone wrong 
?
/* triangle formulapart of the triangle 
formula15.04.2001*//* colA  :  
LLV(LOW,9)+((HHV(HIGH,9)-LLV(LOW,9))/2)    col B :  
LLV(LOW,9)    col C :  LLV(LOW,5)    
col D :  HHV(HIGH,9)    col E :  
HHV(HIGH,5)    col F :  Mov(VOLUME,5,S)
 
Filter :  (colB<colC)AND (colD>colE) AND 
(colD>colA) AND (colC<colA)AND colF > 
1000ANDFml("uptrend")=TrueANDHHVBars(HIGH,9)>HHVBars(HIGH,5)ANDLLVBars(LOW,9)>LLVBars(LOW,5)*/
 
 
 
buy=LLV(LOW,9)<LLV(LOW,5) AND  
HHV(HIGH,9)>  HHV(HIGH,5) 
ANDHHV(HIGH,9)>LLV(LOW,9)+((HHV(HIGH,9)-LLV(LOW,9))/2) 
AND LLV(LOW,5)< LLV(LOW,9)+((HHV(HIGH,9)-LLV(LOW,9))/2) 
AND ma(VOLUME,5)>100000 AND
 
Ref(ema(close,10) ,0) > 
Ref(,ema(close,10),-1)ANDRef(ema(close,20) ,0) > 
Ref(ema(close,20),-1) ANDHHVBars(HIGH,9)>HHVBars(HIGH,5) 
ANDLLVBars(LOW,9)>LLVBars(LOW,5);
 
trendfilter=Ref(ema(close,10) ,0) > 
Ref(,ema(close,10),-1)ANDRef(ema(close,20) ,0) > 
Ref(ema(close,20),-1);
 
Thanks Davidsell = 0;