Tomasz,

While I have no idea what exactly does happen when I set sig.Price to -1 and 
why this works, I can happily report that it *does* work - so thanks for the 
help!

--- In [email protected], Tomasz Janeczko <gro...@...> wrote:
>
>   Hello,
> 
> It is simple. By default AmiBroker opens positions in RANKED order (more 
> preferred trades first).
> If at some point of going through the ranking it finds the trade that it can 
> not open (for example
> due to insufficient funds) it will NOT open LOWER ranked trades because it is 
> undesirable to have
> better candidates replaced by worse candidates when you run out of funds.
> When requested position size is non-zero and position size shrinking is ON 
> AmiBroker will attempt
> to adjust pos size to lower value within user-defined constraints 
> ("MinShares", Round lot size).
> It will go down as far as constraints allow, but if it reaches the barrier or 
> zero it will reject the trade
> and all lower-ranked signals.
> Setting signal's pos size to zero in the beginning effectively means the same 
> condition.
> 
> You should NOT set position size to zero if you want to reject single trade 
> BUT continue to handle lower-ranked signals.
> 
> If you want to SKIP one signal, without affecting others, you should set 
> Price property of that signal to -1 (minus one).
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
> 
> On 2010-07-20 12:42, rise_t575 wrote:
> >
> > Thanks a lot - I will try your solution.
> > Do you have an idea *why* this is happening?
> >
> > --- In [email protected], Tavan Taban<tavantaban@>  wrote:
> >> I remember experiencing the same problem earlier. As far as I remember, it
> >> is something like, if it cancels one, cancels also the rest which are not
> >> coded to be rejected. I can dig more if it helps.
> >>
> >> Anyway, one solution alternative may be the following.
> >>
> >> for( sig = bo.GetFirstSignal( bar ); sig; sig = bo.GetNextSignal( bar ) )
> >>          {
> >>              if (IDontLikeThisSignal) sig.Type = 7;
> >>          } // end if exit
> >>
> >>
> >> 2010/7/17 rise_t575<rise_t@>
> >>
> >>>
> >>> Hello,
> >>>
> >>> I've noticed using mid-level CBT that when I set the position size to zero
> >>> for the signal in question (the reason for setting it to zero is slightly
> >>> complicated&  not that important here - some data needed for a subsequent
> >>> calculation is {empty}), the trade is marked as "rejected" in AA's results
> >>> list (which is perfectly ok).
> >>> What is not "perfectly ok" is the fact that the backtester rejects the
> >>> following signals at the same bar as well (there's enough cash available 
> >>> and
> >>> position size is>  0).
> >>>
> >>> How can I prevent this?
> >>>
> >>>
> >>>
> >
> >
> >
> > ------------------------------------
> >
> > **** IMPORTANT PLEASE READ ****
> > This group is for the discussion between users only.
> > This is *NOT* technical support channel.
> >
> > TO GET TECHNICAL SUPPORT send an e-mail directly to
> > SUPPORT {at} amibroker.com
> >
> > TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> > http://www.amibroker.com/feedback/
> > (submissions sent via other channels won't be considered)
> >
> > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> > http://www.amibroker.com/devlog/
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
>


Reply via email to