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

Re: [amibroker] AmiBroker 4.43.1 BETA released



PureBytes Links

Trading Reference Links




Steve,
 
Please read the documentation about REGULAR mode.
Delays in REGULAR mode WORK already OK.
============================
 
Example from the read me shows JUST ONE DAY DELAY from 
signal:
 

Regular (signal-driven) mode
This mode is default one. Works with ordinary buy/sell/short/cover signals. 
Test is performed on PORTFOLIO LEVEL, it means that there is 
single portfolio equity and position sizing refers to portfolio equity. 
Portfolio equity is equal to available cash plus sum of all simultaneously open 
positions at given time. 
IMPORTANT: to enable more than one symbol to be traded you 
have to add PositionSize variable to your formula, so less than 100% of funds 
are invested in single security:
PositionSize = -25; // invest 25% of portfolio equity in single security
or
PositionSize = 5000; // invest $5000 into single security
Regular mode now allows also to use PositionScore variable to decide 
which trades should be entered if there are more entry signals on different 
securities than maximum allowable number of open positions or available 
funds. In such case AmiBroker will use the absolute value of 
PositionScore variable to decide which trades are preferred. See the code below. 
It implements simple MA crossover system, but with additional flavour of 
preferring entering trades on symbols that have low RSI value. If more buy 
signals occur than available cash/max. positions then the stock with lower RSI 
will be preferred. You can watch selection process if you backtest with 
"Detailed log" report mode turned on.
The code below includes also the example how to find optimum number of 
simultaneously open positions using new Optimization in Porfolio mode.
/******* REGULAR PORTFOLIO mode ** This sample 
optimization** finds what is optimum number of positions open 
simultaneously** ****/
SetOption("InitialEquity", 20000 
);SetTradeDelays(1,1,1,1);RoundLotSize = 1; 
posqty = Optimize("PosQty", 4, 1, 20, 1 
);SetOption("MaxOpenPositions", posqty);
// desired position size is 100% portfolio equity// divided by 
PosQty positionsPositionSize = -100/posqty; 
// The system is very simple...// MA parameters could 
be optimized too...p1 = 10;p2 = 22;// simple MA 
crossoverShort=Cross( MA(C,p1) , MA(C,p2) );Buy=Cross( MA(C,p2) , 
MA(C,p1) );// always in the market Sell=Short; Cover=Buy;
// now additional score // that is used to rank equities // 
when there are more ENTRY signals that available// 
positions/cashPositionScore = 100-RSI(); // prefer stocks that have low 
RSI;
 
 
 
Best regards,Tomasz Janeczkoamibroker.com
----- Original Message ----- 
From: "Steve Wiser" <<A 
href=""><FONT 
size=2>slwiser@xxxxxxxxxxx>
To: <<A 
href=""><FONT 
size=2>amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, October 05, 2003 7:10 PM
Subject: Re: [amibroker] AmiBroker 4.43.1 BETA 
released
> Tomasz> > I 
think that the Portfolio Tester is great but I have a question about how 
> to control when I enter and exit?> > In the normal tester 
I have an option to enter on open, close or average > with any delay I 
need. It appears to me that with the new tester has yet to > implement 
this type of entry options?  Is this correct?  I think I am > 
seeing my entry at the low of the next day following a buy signal and and 
> my exit on the next day after the sell signal at the high.  I 
would rather > have the entry on the average of the low and high of the 
next day instead > of the low for entry and high for exit,  if I am 
seeing this correctly.> > I normally use average with one day 
delay for my portfolio work.> > Thanks for another great addition 
to Amibroker.  Take a rest before you get > sick and can't keep up 
with your goals instead of ours.> > Steve> > 
> > ------------------------ 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.> <A 
href=""><FONT 
size=2>http://www.c1tracking.com/l.asp?cid=5511> 
<FONT 
size=2>http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM<FONT 
size=2>> 
---------------------------------------------------------------------~->> 
> Send BUG REPORTS to <FONT 
size=2>bugs@xxxxxxxxxxxxx> Send SUGGESTIONS to 
<FONT 
size=2>suggest@xxxxxxxxxxxxx> 
-----------------------------------------> Post AmiQuote-related messages 
ONLY to: <FONT 
size=2>amiquote@xxxxxxxxxxxxxxx > (Web page: 
<FONT 
size=2>http://groups.yahoo.com/group/amiquote/messages/<FONT 
size=2>)> --------------------------------------------> Check 
group FAQ at: <A 
href=""><FONT 
size=2>http://groups.yahoo.com/group/amibroker/files/groupfaq.html<FONT 
size=2> > > Your use of Yahoo! Groups is subject to <A 
href=""><FONT 
size=2>http://docs.yahoo.com/info/terms/ > 
> > 






Yahoo! Groups Sponsor


  ADVERTISEMENT









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