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

[amibroker] Re: Annoying programming problem: ideas please?



PureBytes Links

Trading Reference Links

Jayson,
We have agreed that [almost] everything can be done...
First find the dates.
For an example start 1/1/2002 you have
START=1020101;
X=Cum(DateNum()>START)%25==0 AND DateNum()>START;
Filter=X;
AddColumn(DateNum(),"",1.0);

Then you may write
COND1=DATENUM()>=1020206 AND DATENUM()<=1020314;
COND2=DATENUM()>=1020314 AND DATENUM()<=1020419;
COND3=DATENUM()>=1020419 AND DATENUM()<=1020524;
etc
Then
K=optimize("k",1,1,10,1);
kk=IIF(K==1,COND1,IIF(K==2,COND2,IIF(K==3,COND3 etc
and, finally
Buy=...
Sell=...
Buy=kk*Buy;Sell=kk*Sell;
The optimization now will rank the various 25-day ranges. Correct ?
DT
PS The various 1020314 may be also automated but, may be tomorrow.
My eyes are full of IntradaySupports and NextBarSupports now...
--- In amibroker@xxxxxxxxxxxxxxx, "Jayson" <jcasavant@xxxx> wrote:
> Owen,
> Am I over simplifying by suggesting you simply use the
> From-To range settings in AA?
> 
> Example choose 12/1/2002-12/25/2002 to optimize then simply move 
the window
> forward 25 days to test the results.......
> 
> Regards,
> Jayson
> -----Original Message-----
> From: Owen Davies [mailto:owen5819@x...]
> Sent: Tuesday, June 17, 2003 2:04 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Annoying programming problem: ideas please?
> 
> 
> Active Trader has taken to doing something I've always considered 
BS.  Some
> articles--at least one a month of late--optimize an intraday 
trading system,
> usually some variation on a volatility breakout, over a month or so 
of data
> and then do an out-of-sample test for the next month or so 
to "prove" how
> well it works.  Over time, this has come to irritate me enough that 
I'd like
> to do a long-term study, either to prove that it's nonsense or to 
learn
> something new and highly unlikely.  So:
> 
> Can anyone think of a way to optimize a technique on, say, 25 bars 
of data,
> test it on the next 25 bars, and then step the window forward and 
do it
> again?  I'd settle for re-optimizing daily on the previous 25 (or 
whatever)
> bars.  Whatever is easiest.
> 
> For the sake of simplicity, something that runs on EOD data will 
do.  I mean
> to test breakouts in the direction of an existing trend and close 
at the end
> of the day, so there should be no problem with days that break out 
in one
> direction, reverse, and break out in the other; a day that reverses 
and ends
> badly will just count as a loss.  Also, I can do the conversion to 
intraday
> data myself, rather than ask others to hand me the complete 
package.  All I
> need is some way to optimize on a window.
> 
> Offhand, I can't see any way to do it within AFL, and I don't have 
the skill
> to handle it with external programming.
> 
> Many thanks.
> 
> Owen Davies
> 
> 
>       Yahoo! Groups Sponsor
>             ADVERTISEMENT
> 
> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> 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
> 
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/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 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/