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

[amibroker] Re: cannot buy on open



PureBytes Links

Trading Reference Links

<<I understand that some people are used to BUY LIMIT/STOP/STOP LIMIT
/ ETC orders and I will provide this alternative way of specifying
your rules some day,>>

TJ... I appreciate the fact that Amibroker is a 'work in progress',
and  I know that as time passes it will only get better and better.

Since I trade everyday using BUY LIMIT/STOP/STOP LIMIT / ETC orders, I
have a strong need to backtest with these standard order entry methods
without having to go into AFL coding contortions to try to see if a
stradegy works.

I know now that you are aware of the need to implement these features. 

Nuff said.

Phsst

--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx>
wrote:
> Hello,
> 
> Sorry but there is NOTHING "esoteric" about this.
> In AFL you define *WHEN* (buy/sell/short/cover) and *AT WHAT PRICE* 
> (buyprice/sellprice/shortprice/coverprice) you enter/exit the trade.
> 
> It is as easy as it can only be.
> 
> I understand that some people are used to BUY LIMIT/STOP/STOP LIMIT
/ ETC
> orders and I will provide this alternative way of specifying your
rules some day,
> however I can not agree that current method is complicated (actually
it is easier
> than having at 4-10 types of orders per each buy/sell/short/cover
rule (16-40 functions to define your rules))
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message ----- 
> From: <phsst@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Sunday, February 23, 2003 5:59 AM
> Subject: [amibroker] Re: cannot buy on open
> 
> 
> > Yuki,
> > 
> > I've read the previous posts on this subject and feel the need to
> > contribute to your side of the issue:
> > 
> > AB is almost bulletproof on the technical indicators and triggers
> > needed to initiate backtest trades...
> > 
> > HOWEVER, I find that the ENTRY / EXIT stradegies of AB are not
> > intuitive, and that a good bit of 'tweaking' and 'testing' is
> > necessary to even attempt to come close to real-world orders for
> > entry/exit positions of securities.
> > 
> > For example, for years I have traded certain strategies as follows:
> > 
> > After hours Buy or Short Limit order @ todays (EOD) close or "BETTER @
> > OPEN".
> > 
> > No StopLoss entered on day of order entry execution.
> > 
> > After Mkt closes on day of order execution (and each day
> > thereafter)... place trailing stop loss order .10cents above or below
> > todays high or low (only if new stop moves in direction of position).
> > 
> > The above has been a successful strategy with my own backtesting
> > software and actual trading discipline.
> > 
> > I cannot figure out how to accomplish the above in AB.
> > 
> > And if folks are tolerant, I think I can come up with some other
> > situations that have eluded me in past AB backtests that I can
> > accomplish with my own software.
> > 
> > And for those who wonder why I fool around with AB... TJ has done an
> > unbelievable job on the many technical indicators that are needed to
> > setup entry and exit signals that my own software is not capable of.
> > 
> > I tend to still rely upon my own backtesting (called 'SIM') for
> > verification of real trading stradegies, but only because I haven't
> > figured out the more esoteric issues of AB Order/Entry issues.
> > 
> > Regards,
> > 
> > Phsst
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, Yuki Taga <yukitaga@xxxx> wrote:
> > > Hi William,
> > > 
> > > Sunday, February 23, 2003, 3:23:32 PM, you wrote:
> > > 
> > > WP> There is an Option in Backtester Settings named "Allow same bar
> > > WP> exit (Single bar trade", ensure that is checked.
> > > 
> > > WP> This works for me with a backtest but not a scan.
> > > WP> Post again if you still have problems.
> > > 
> > > I see.  Okay, now some simple code works correctly, but not all. For
> > > example, here is another stupid variation, but a variation that I
> > > cannot get to work properly, although I think it should:
> > > 
> > > //an outside day with a down close, buying on the next open if the
> > > //open is lower than the previous day's close
> > > 
> > > //Buystop = Open < Ref(C,-1);
> > > 
> > > Buy = Ref(H,-1) > Ref(H,-2) AND Ref(L,-1) < Ref(L,-2) AND Ref(C,-1)
> > < Ref(L,-1) AND Open < Ref(C,-1); 
> > > 
> > > Sell= 1;
> > > 
> > > SetTradeDelays(0,0,0,0);
> > > 
> > > BuyPrice = Open;
> > > 
> > > SellPrice = Close;
> > > 
> > > I also tried using the commented-out 'buystop' variable.  In both
> > > cases, no buy ever takes place.  And it's not because the condition
> > > is never present.  ^^_^^
> > > 
> > > Best,
> > > 
> > > Yuki
> > > 
> > > mailto:yukitaga@x...
> > 
> > 
> > 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/ 
> > 
> > 
> >


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/