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

Re: [amibroker] Translation



PureBytes Links

Trading Reference Links


Hi,
 
I belive most of this code could be written in AFL 
without script at all.
As for scripts: it is just a matter of your 
personal taste.
I prefer JScript because its syntax is similar to 
C++ which I use everyday.
But... VBScript is a little bit faster simply 
because it handles arrays
in more efficient manner (VBScript arraysare API 
SAFEARRAYS while
JScript arrays are objects and every element of 
the array is accessed
buy get/set method)
 
Best regards,Tomasz Janeczko===============AmiBroker - the 
comprehensive share manager.<A 
href="">http://www.amibroker.com
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
Bernard 
Bourée 
To: <A title=amibroker@xxxxxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 
Sent: Sunday, July 22, 2001 7:46 
PM
Subject: [amibroker] Translation

Hello
 
I would like to translate a TD from 
Wealth-Lab.
I would like to know if I need to use VBScript or 
Jscript for that.
Here is the WL code:
 

PlotSeries( BBandLower( #Close, 10, 1.5 ), 0, 022, 0 ); 
PlotSeries( BBandUpper( #Close, 10, 1.5 ), 0, 022, 0 ); 
LowerBand := BBandLower( #low, 10, 1.5 ); 
UpperBand := BBandUpper( #High, 10, 1.5 ); 

PlotSeries( LowerBand, 0, 863, 0 ); 
PlotSeries( UpperBand, 0, 863, 0 ); 

InstallProfitTarget(5);

for Bar := 15 to BarCount()- 1 do begin
applyAutoStops( bar );
limitPrice := ( BBandLower( Bar, #low, 10, 1.5 ) * 0.95 );
if adx(bar,14) >= 22 then 
BuyAtLimit( Bar + 1, 5000, limitPrice );
for P := 0 to PositionCount - 1 do begin
if PositionActive( P ) then begin
if bar + 1 - positionBuyBar( p ) >= 2 then begin
SellAtMarket( Bar + 1, P, 'DaysExpired' );
end;
end;
end;
end; 
Thanks
Bernard Bourée<A 
href="">bernard@xxxxYour 
use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.