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

Re: [amibroker] portfolio trading - poor man's scoring



PureBytes Links

Trading Reference Links

Hello,

Actually for testing your EXISTING code that has buy/sell rules
you should REMOVE PositionScore variable completely.

PositionScore is for ranking/scoring based systems
and it must NOT be used for regular systems that have buy/sell/short/cover rules.

So correct use of your EXISTING formula with new backtester
is just to add *SINGLE* line that defines PositionSize

PositionSize = -10; // 10% of portfolio equity into single trade

So your entire code should look like this:

 /*CB-PB*/

 Hhb=HHVBars(H,19)<=12;
 Lowp=L<=LLV(L,7);
 Buy=Hhb AND Lowp;
 Sell= HHV(H,12)<=H ;

 PositionSize=-2; // ONLY THIS has to be added

/* NO MORE LINES NEEDED */ 

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "gerryjoz" <gerryj@xxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, October 01, 2003 2:58 AM
Subject: [amibroker] portfolio trading - poor man's scoring


> Tomasz helped me out (thanks again) with reading the manual (4.42 
> beta readme).
> I had wanted to use existing code with minimal change to take 
> advantage of the new portfolio scoring feature, and thereby see how 
> position size and the other parameters affected drawdown.
> 
> The code below now works for long only trades (doesn't go short).
> The trick for me was that a score of zero disqualifies scoring and 
> results in exit from a long position. The buy/sell criteria below are 
> not recommended!
> 
> /*CB-PB*/
> PositionSize=-2;
> Hhb=HHVBars(H,19)<=12;
> Lowp=L<=LLV(L,7);
> Buy=Hhb AND Lowp;
> Sell= HHV(H,12)<=H ;
> 
> /*poor man's scoring*/
> Somebuy=Flip(Buy,Sell);
> PositionScore=IIf(somebuy,somebuy,0);
> 
> regards 
> Gerry
> 
> 
> 
> 
> 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/ 
> 
> 
>

------------------------ 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 

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