| 
 PureBytes Links 
Trading Reference Links 
 | 
This may work
A = Cross( H, Ref( HHV(H,20), -1 ) ) ;
B = Cross( Ref( LLV(L,5), -1 ), L ) ;
 
for( i=1; i<barcount; i++ )
{
 If(A[i])
 {  D2[i] = 1; }
 else
 { 
  If(B[i])
 {  D2[i] = 0; }
 else
 {  D2[i] = D2[i-1]; }
}
Plot(c, "close", colorblack, stylebar );
Plotshapes( shapestar*A, colorred, 0, H, 0 );
Plotshapes( shapestar*B, colorblue, 0, L, 0 );
Plotshapes( shapestar*D2, colorgreen, 0, H, -10 );
Cheers,
Graham
http://e-wire.net.au/~eb_kavan/
-----Original Message-----
From: mark [mailto:msimo40@xxxxxxxxxxx] 
Sent: Sunday, October 03, 2004 9:58 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] system conversion
hello guys,
           i hav this trade sym system but was trying to see if i 
can get it coded for amibroker..i am hopeless at coding something 
like this...can it be done?
Cross(H,Ref(HHV(H,20),-1))   {Enter as  "A" in The indicator builder}
Cross(Ref(LLV(L,5),-1),L)     {Enter as  " B "  in The indicator 
builder}
If(Fml("A"),1,If(Fml("B"),0,PREV))   {Enter as   "D(2)"  in The 
indicator builder}
OPEN LONG   Fml("D(2)")=1 AND HHVBars(C,50)=0;
CLOSE LONG   Fml("D(2)")=0
Delay 1 sell and buy on open
EXPLORATION Set to WEEKLY
 Fml("D(2)")=1 AND HHVBars(C,50)=0;
Place in Filter
TRADESIM
EntryTrigger:=Fml("D(2)")=1 AND HHVBars(L,50)=0 AND Fml("Liquidity")
>1000000;
EntryPrice:=OPEN;
ExitTrigger:=Fml("D(2)")=0;
ExitPrice:=OPEN;
InitialStop:=If(Ref(C,-1)>0.95*EntryPrice,0.95*EntryPrice,Ref(C,-1));
ExtFml( "Tradesim.Initialize") ;
ExtFml( "Tradesim.EnableDelayOfEntryByOneBar") ;
ExtFml("Tradesim.EnableDelayOfAllExitsByOneBar");
ExtFml( "Tradesim.EnableProtectiveStop",1) ;
ExtFml("Tradesim.SetStartRecordDate",11,7,1997);
ExtFml("Tradesim.SetStopRecordDate",19,7,2002);
ExtFml("Tradesim.GetSymbolLength")<=3;
ExtFml( "TradeSim.RecordTrades", 
        "FUPGD 00 BT Margin Liquid 5 Yr.95 ",
         LONG,
         EntryTrigger,
         EntryPrice,         
         InitialStop,        
         ExitTrigger,
         ExitPrice,
         START);
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links
 
------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links
<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 
 |