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

[amibroker] how to? with script, download data from web



PureBytes Links

Trading Reference Links





Hello,
It's me again - i got this part of code :
signals definitions
Buy1=Cross<FONT 
size=1>(H,DSu); Sell1=CondS; Short1=<FONT color=#0000ff 
size=1>Cross(DSd,L); Cover1=CondL;



checks if signals happened same day
data="">DayOfYear<FONT 
size=1>();
data_buy=ValueWhen( 
Buy1, DayOfYear()); 

data_sell=<FONT color=#0000ff 
size=1>ValueWhen( Sell1, <FONT color=#0000ff 
size=1>DayOfYear()); 
data_short=<FONT color=#0000ff 
size=1>ValueWhen( Short1, <FONT color=#0000ff 
size=1>DayOfYear()); 
data_cover=<FONT color=#0000ff 
size=1>ValueWhen( Cover1, <FONT color=#0000ff 
size=1>DayOfYear());



checks in what order (globaly) signals 
occured
when_buy=ValueWhen<FONT 
size=1>(Buy1,BarIndex<FONT 
size=1>());  
when_sell=<FONT color=#0000ff 
size=1>ValueWhen(Sell1,<FONT color=#0000ff 
size=1>BarIndex());  
when_short=<FONT color=#0000ff 
size=1>ValueWhen(Short1,<FONT color=#0000ff 
size=1>BarIndex()); 
when_cover=<FONT color=#0000ff 
size=1>ValueWhen(Cover1,<FONT color=#0000ff 
size=1>BarIndex()); 



Ok, which one will be better/faster now - look 
below:
was_buy=IIf(when_buy < 
when_sell AND data_buy==data_sell AND data="" 
color=#ff00ff>1,0);
was_buy=IIf(<FONT 
color=#0000ff>BarsSince(Buy1) > <FONT 
color=#0000ff>BarsSince(Sell1) AND data_buy==data_sell AND 
data="" color=#ff00ff>1,0);
cause i think both statements work same way (i 
think ;) )
Or should I do it some other way ? (better 
from performance point of view)
 
gty
 
<FONT face=Arial 
size=2> 
<FONT face=Arial 
size=2> 
<FONT face=Arial 
size=2> 


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 Sponsor


  ADVERTISEMENT 












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 the Yahoo! Terms of Service.