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

RE: [amibroker] Optimizing on Time



PureBytes Links

Trading Reference Links


<FONT color=#000080 
size=2>Tomasz,
<FONT color=#000080 
size=2> 
One situation 
with the code below is that it increments 900 to 915, 930, 945, 960, 975 
etc.  Of course 960 and 975 are not valid times.
<FONT color=#000080 
size=2> 
One slight 
correction:  timeok = HourMin >= tm;  (one equal sign after timeok, 
not two).
<FONT color=#000080 
size=2> 
Is there a way to 
optimize with valid times returned?
<FONT color=#000080 
size=2> 
<FONT color=#000080 
size=2>Thanks,
 
<FONT face="Vladimir Script" color=#000080 
size=5>Rick

<FONT face=Tahoma 
size=2>-----Original Message-----From: Tomasz Janeczko 
[mailto:amibroker@xxxx]Sent: Friday, October 04, 2002 12:06 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker] 
Optimizing on Time
Hello,
 
Just combine hour and minute:
 
HourMin = 100* Hour() + Minute();
 
tm = Optimize("Time", 900, 900, 1600, 15 );
 
timeok == HourMin >= tm;
 
Best regards,Tomasz Janeczkoamibroker.com
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
<A title=RickParsons@xxxx 
href="">Rick Parsons 
To: <A title=amibroker@xxxxxxxxxxxx 
href="">Amibroker Yahoo Groups 
Sent: Friday, October 04, 2002 5:09 
PM
Subject: [amibroker] Optimizing on 
Time

<FONT color=#000080 
size=2>All,
<FONT color=#000080 
size=2> 
I am using RT 
data and want to condition my trades to execute at certain times of the 
day.  Currently I am using this code:
<FONT color=#000080 
size=2> 
 
Time = <FONT color=#000080 
size=2>Optimize( "Time", 9, 9 , 
16, 1);
TimeOk = <FONT 
color=#000080>IIf(Hour() >= Time, 1, 0<FONT 
color=#000080 size=2>);
 
<FONT color=#000080 
size=2>This works fine, however I would like to optimize on  every 
15 minutes instead of every hour.  Anyone have a way to code 
this?
<FONT color=#000080 
size=2> 
<FONT color=#000080 
size=2>Thanks,
 
<FONT face="Vladimir Script" color=#000080 
size=5>Rick
 Post AmiQuote-related messages ONLY to: 
amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 
Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.