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

[amibroker] Re: Losing Trades in Custom Backtester



PureBytes Links

Trading Reference Links

Oops. I forgot the Position Score is stored for the regular buy 
signals. But I still do not seem to seeing getting things right.
So MaxOpenPos = 10, so I should see all second entry signals and 20 
original buy signals but I am only seeing 8 buy signals, I expect 14 
of these.

Cey

--- In amibroker@xxxxxxxxxxxxxxx, "C Alvarez" <yahoo@xxx> wrote:
>
> Tomasz,
> 
> I am doing regular mode. I coded this up like in the example in 
the 
> KB you pointed to. How is "TOP ENTRY" signals dtermined if 
> PositionScore is not used as stated in the KB article.
> 
> Thanks,
> Cey
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <groups@> 
> wrote:
> >
> > Hello,
> > 
> > In rotational mode it holds 2 * WorstRankHeld TOP ENTRY signals, 
> in regular mode it holds
> > 2 * MaxOpenPos TOP ENTRY signals. By changing settings you can 
> change how many ENTRY signals are kept.
> > There is no point in holding more since they would never 
> > be used so why waste memory. All scale and exit signals are kept 
> (because you never know at the scanning
> > time which exit signals will be needed because at that time you 
> don't know which trades are taken).
> > 
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > ----- Original Message ----- 
> > From: "C Alvarez" <yahoo@>
> > To: <amibroker@xxxxxxxxxxxxxxx>
> > Sent: Thursday, August 10, 2006 11:33 PM
> > Subject: [amibroker] Re: Losing Trades in Custom Backtester
> > 
> > 
> > > Tomasz,
> > > 
> > > It looks like the signal list is not holding all the signals 
> that 
> > > expect to be in it. Is there some maximum number of signals 
that 
> may 
> > > be put in the list? How is this determined?
> > > 
> > > I am expecting 18 and only getting 8. I have max positions set 
> to 
> > > 10. And at this particular time I have only 2 positions open.
> > > 
> > > Thank you,
> > > Cey
> > > 
> > > --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <groups@> 
> > > wrote:
> > >>
> > >> Hello,
> > >> 
> > >> Answer is here: http://www.amibroker.com/kb/2006/04/24/using-
> > > redundant-signals-for-entries/
> > >> 
> > >> 
> > >> Best regards,
> > >> Tomasz Janeczko
> > >> amibroker.com
> > >>   ----- Original Message ----- 
> > >>   From: C Alvarez 
> > >>   To: amibroker@xxxxxxxxxxxxxxx 
> > >>   Sent: Monday, August 07, 2006 10:04 PM
> > >>   Subject: [amibroker] Losing Trades in Custom Backtester
> > >> 
> > >> 
> > >>   I am using the Custom Backtester to iterate through the 
> Signal 
> > > list. Depending on some additional conditions that I only can 
> know 
> > > at this time, I might decide to skip a trade and set the 
PosSize 
> = 
> > > 0. This prevents the trade from happening, as I want.
> > >> 
> > >>   The problem is that if I remove a trade from the Signal 
list 
> and 
> > > then the Buy array has a buy for the next day, it is not 
showing 
> up 
> > > the Signal list. And at this time I might want to take the 
> trade. 
> > > Any suggestions on how I can do this?
> > >> 
> > >>   Here is the simplified code.
> > >> 
> > >>   Thanks,
> > >>   Cey
> > >> 
> > >> 
> > >>   SetCustomBacktestProc("");
> > >> 
> > >>   if( Status("action") == actionPortfolio )
> > >>   {
> > >>           bo = GetBacktesterObject();
> > >>           bo.PreProcess(); // Initialize backtester
> > >> 
> > >>           for(bar=0; bar<BarCount; bar++)
> > >>           {
> > >> 
> > >>                   for( sig = bo.GetFirstSignal(bar); sig; sig 
= 
> > > bo.GetNextSignal(bar) )
> > >>                   {
> > >>                           if( sig.IsEntry())
> > >>                           {
> > >>                                   if (some_condition) // 
don't 
> > > take trade
> > >>                                   {
> > >>                                           sig.PosSize = 0;
> > >>                                   }
> > >>                           }
> > >>                   }
> > >> 
> > >>           bo.ProcessTradeSignals(bar); // Process current 
bar's 
> > > signals
> > >> 
> > >>           }
> > >> 
> > >>           bo.PostProcess();
> > >>   }
> > >>
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > Please note that this group is for discussion between users 
only.
> > > 
> > > To get support from AmiBroker please send an e-mail directly 
to 
> > > SUPPORT {at} amibroker.com
> > > 
> > > For other support material please check also:
> > > http://www.amibroker.com/support.html
> > > 
> > > 
> > > Yahoo! Groups Links
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > >
> >
>