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

[EquisMetaStock Group] Cup and Handle Exploration modification help



PureBytes Links

Trading Reference Links



Some very kind forumer has recommended ( in amibroker language)
http://www.amibroker.com/library/detail.php?id=306

I tried to convert it to metastock language but hit some command error

Problem:
Hit syntax error:" LLV and LLVBars expecting constant instead of
variable in metastock"
anyone has workaround if we can't solve the problem with that
MetaStock ommand ?

Thank you and appreciate very very much.
best wishes
//dmyy2k@xxxxxxxxx
====
MinPrice:=0.20; { 2}
MinVolume:=200000; {100K}

LH:=HHV(Close,25);
BLH:=HHVBars(Close,25);


BH:=LLV(Close,BLH);
BBH:=LLVBars(Close,BLH);

NBLH:=BLH-BBH;

BC:=LLV(Close,BLH+25); {e.g. !!!! hit error here }
BBC:=LLVBars(Close,BLH+25);


LC:=Ref(HHV(Close,120),BBC*-1);
BLC:=Ref(HHVBars(Close,120),BBC*-1);


KC:=Ref(HHV(Close,30),BLC*-1);
BKC:=Ref(HHVBars(Close,120),BLC*-1);

Delta:= LC/KC;

URPV=DRPV=0;
i=barssince(BLH);
j=barssince(BBC);
countback:=j-i
UPRV:= sum(
if(Ref(C,i*-1) >Ref(i+1)*-1),
Ref(V,i*-1) * ( Ref(C,(i*-1)) - Ref(C,(i+1)*-1) ),
UPRV) , countback) ;
DRPV:= sum(
if(Ref(C,i*-1) Ref(V,i*-1) * ( Ref(C,(i+1)*-1) - Ref(C,(i*-1)) ),
DRPV) , countback);


Alpha := URPV/DRPV; { // Should be>1}


DRPV:=0;
i:=barssince(BBH);
j:=barssince(BLH);
countback2=j-i
DRPV:= sum(
if(Ref(C,i*-1) Ref(V,i*-1) * ( Ref(C,(i+1)*-1) - Ref(C,(i*-1)) ),
DRPV) , countback);


Beta := URPV/DRPV;
Gamma := log(Alpha) + log(Beta) + delta;

{NBHL ?}
NBLH >2 AND C>BH AND BC (0.8*LH + 0.2*BC)) AND
KC < LC AND C>MinPrice AND MOV(V,30)>MinVolume

{
AddColumn(LH,"Left Handle");
AddColumn(BH,"Bottom Handle");
AddColumn(BC,"Bottom Cup");
AddColumn(LC,"Left Cup");
AddColumn(ALPHA,"Alpha");
AddColumn(DELTA,"Delta");
AddColumn(BETA,"BETA");
AddColumn(GAMMA,"Gamma");

}
{ // Filter Criteria as follows: }
{ // 1. Right side of handle must be at least 2 bars. NBHL>2 }
{ // 2. Bottom of the cup must be lower than the left top of the
cup. }
{ // 3. Left handle must be lower than or equal to the lect cup
formation. }
{ // 4. Bottom of the cup must be less than the left handle. }
{ // 5. Bottom of the handle must be > 80% of the left handle + 20%
of the bottom cup. }
{ // 6. Start of cup/handle formation must be greater than precedding
chart value. LC>LC }
{ // 7. Minimum price and volume you can set any way you like. }
{Filter= NBLH>2 AND Close>BH AND BC.8*LH+.2*BC
AND KCMinPrice AND MA(Volume,30)>MinVolume;}









------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/