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

[amibroker] Re: Delaying new trade entry to day after last exit



PureBytes Links

Trading Reference Links

Paul - Thanks for replying, but sorry, I've got no idea what you're 
talking about, I shall have to look up those things in the user 
guide and see if it makes any sense.

Graham - Thanks for the advice, I have been given some code that 
uses a custom backtest to do what I wanted since posting this 
question, but thought there may be an easier way.

Larry - the method you mentioned works if you use the ApplyStops 
function, but in this system I don't use them for normal system 
exits, I have different exit criteria that I have coded myself.

Brenton

--- In amibroker@xxxxxxxxxxxxxxx, "onelkm" <LKMCD1@xxx> wrote:
>
> Graham
> I am no expert at this, but doesn't "activate stops immediately" 
> handle this situation for the case where stops are used for the 
sell 
> condition? ...... from the help files:
> a) (if you want to have stops executed AFTER regular signals, so 
cash 
> from stopped out positions is NOT available to enter trades the 
same 
> day) 
> ActivateStopsImmediately turned ON 
> 
> Larry
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@> wrote:
> >
> > AFL runs through each symbol and compiles the trade signals
> > Backtest then uses these trade signals to put together a 
portfolio 
> backtest.
> > If you need to control what one symbol does based on the trades 
> that occured
> > in a different symbol you need to use the advanced backtest 
code. 
> This adv
> > code is an additional pass through the backtest to make the 
> necessary
> > changes to the basic backtest results
> > 
> > Single symbol
> >  - to control the trades for a single symbol you use the AFL code
> > Portfolio
> >  - to control the number of current open positions use setoption
> > maxopenpostions
> >  - to control symbol trades on a portfolio level (eg no entries 
on 
> same day
> > of exit of another symbol) you need to use the advanced backtest 
> code
> > 
> > 
> > 
> > 
> > -- 
> > Cheers
> > Graham
> > AB-Write >< Professional AFL Writing Service
> > Yes, I write AFL code to your requirements
> > http://www.aflwriting.com
> > 
> > On 15/12/06, Paul Ho <paultsho@> wrote:
> > >
> > >  either positionsize or a static variable e.g staticvarset
> > >
> > >  ------------------------------
> > > *From:* amibroker@xxxxxxxxxxxxxxx 
> [mailto:amibroker@xxxxxxxxxxxxxxx] *On
> > > Behalf Of *brentonfx
> > > *Sent:* Wednesday, 13 December 2006 11:58 AM
> > > *To:* amibroker@xxxxxxxxxxxxxxx
> > > *Subject:* [amibroker] Delaying new trade entry to day after 
last 
> exit
> > >
> > >
> > > I am testing a system that enters at the market open, but uses
> > > intraday exits, with a limit on the maximum number of open 
> positions
> > > to 5.
> > >
> > > The problem I have is that Amibroker is allowing a new entry 
to 
> occur
> > > on a new stock the same day as the last exit on a different 
> stock, but
> > > in real life I cannot do this.
> > >
> > > eg if I'm in five trades already coming into today, and one of 
the
> > > trades exits today sometime during the day when my exit 
criteria 
> is
> > > met, I can't take a new trade until tomorrow, but AB is 
allowing
> > > another new trade to be entered today at the open. How can I 
stop 
> this
> > > from happening?
> > >
> > > Regards
> > > Brenton
> > >
> > > 
> > >
> >
>



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.26/598 - Release Date: 12/22/2006 3:22 PM