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

[amibroker] Attention Mr. Michael Roman



PureBytes Links

Trading Reference Links

Anyone familiar with AIQ's EDS language? After trying to convert 
some simple code from AIQ to Amibroker, I am getting different 
signals from each. I'm sure there is something simple I am missing, 
but I can't see it. 

Can anyone see a difference in these two?

***********************AIQ CODE:*************************************

!Russell 2000 Growth vs. Value study
!Last Edit 3/4/04


RV is TickerUDF("$R2K-V", [close]).
RG is TickerUDF("$r2K-G", [close]).

TwentyDROC is ([close]-val([close],20))/val([close],20)*100.

RSG5 is (RG-Valresult(RG,5))/(Valresult(RG,5))*100.
RSG15 is (RG-Valresult(RG,15))/(Valresult(RG,15))*100.
RSG25 is (RG-Valresult(RG,25))/(Valresult(RG,25))*100.
RSG35 is (RG-Valresult(RG,35))/(Valresult(RG,35))*100.

RSG is (RSG5 + RSG15 + RSG25 + RSG35)/4.

RSV5 is (RV-Valresult(RV,5))/(Valresult(RV,5))*100.
RSV15 is (RV-Valresult(RV,15))/(Valresult(RV,15))*100.
RSV25 is (RV-Valresult(RV,25))/(Valresult(RV,25))*100.
RSV35 is (RV-Valresult(RV,35))/(Valresult(RV,35))*100.

RSV is (RSV5 + RSV15 + RSV25 + RSV35)/4.


Buy if RSG > RSV.
Sell if RSG < RSV.

BuySig is RSG-RSV.

List if 1.



******************AFL:*******************************************
//First Attempt at Russell Growth/Value strategy

Growth = Foreign("$r2k-g","Close", fixup = 1);
Value = Foreign("$r2k-v","Close", fixup = 1);

G1 = ROC(Growth, 5); 
G2 = ROC(Growth, 15);
G3 = ROC(Growth, 25);
G4 = ROC(Growth, 35);

GI = (G1 + G2 + G3 + G4)/4;

V1 = ROC(Value, 5); 
v2 = ROC(Value, 15);
v3 = ROC(Value, 25);
v4 = ROC(Value, 35);

VI = (v1 + v2 + v3 + G4)/4;

Buy=GI > VI;
Sell=VI > GI;
Short=VI > GI;
Cover=GI > VI;

Filter=Buy OR Sell; //OR Short OR Cover;
//Buy=ExRem(Buy,Sell); Sell=ExRem(Sell,Buy);Short=ExRem
(Short,Cover); Cover=ExRem(Cover,Short);



//Filter = GroupID() == 1;
//PositionSize = -100;
//SetOption("MaxOpenPositions", 1 ); 
//SetTradeDelays(1,1,1,1);



//Explore Code:

AddColumn( GI, "GI", 1.2 ,colorDefault, IIf( GI > VI, colorGreen, 
colorDefault ) );
AddColumn( VI, "VI", 1.2 ,colorDefault, IIf( VI > GI, colorRed, 
colorDefault ) );
AddColumn( GI, "GI", 1.2);
AddColumn( VI, "VI", 1.2);
AddColumn( Growth, "Russell Growth", 1.2 );
AddColumn( Value, "Russell Value", 1.2 );\


Thanks for any assistance.

-Eric.



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
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/