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

Re: [amibroker] Buy and Sell price



PureBytes Links

Trading Reference Links

Hi Steve,

Yes, with a little fix to the following the line:
Short=Cross(ShortPrice,L) and ( ( Hope and Cry)==0);

(opposite order of arguments in Cross() function)

Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com

----- Original Message -----
From: "Steve Wiser" <slwiserr@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, May 20, 2001 8:31 PM
Subject: Re: [amibroker] Buy and Sell price


> Tomasz:
>
> As an example for both long and short postions.
>
>
> Buyprice=Fractalup+0.065;
> Sellprice=AlligatorGreen;
>
> shortprice = FractalDown-0.065;
> coverprice = AlligatorGreen;
>
> Buy=Cross(H,Buyprice) and ( (Hope and Cry)==0 );
> Sell=Cross(SellPrice,L);
> Short=Cross(L,ShortPrice) and ( ( Hope and Cry)==0);
> Cover=Cross(H,Coverprice);
>
> Buy=ExRem(Buy,Sell);
> Sell=ExRem(Sell,Buy);
> Short=ExRem(Short,Cover);
> Cover=ExRem(Cover,Short);
>
> I think this works as well.
>
> Steve
>
> At 05:56 PM 5/20/01 +0200, you wrote:
> >Hi,
> >
> >Wow, you are really great, basically your formula is OK.
> >
> >I will explain new AFL features in the newsletter but now just a couple of
> >main things:
> >
> >So you can write the following to simulate real stop-orders:
> >
> >Buyprice=Fractalup+0.065;
> >Sellprice=AlligatorGreen;
> >
> >// if anytime during the day prices rise above buyprice level (high>buyprice)
> >// the buy order takes place (at buyprice)
> >Buy=Cross(High,Buyprice);
> >
> >// if anytime during the day prices fall below sellprice level ( low <
> >sellprice )
> >// the sell order takes place (at sellprice)
> >Sell=Cross(SellPrice,Low);
> >
> >You can also control trade price:
> >buyprice = IIF( dayofweek() == 1, HIGH, CLOSE ); // on monday buy at
> >high, otherwise buy on close
> >
> >====================
> >Short trade support.
> > From version 3.59 you need to assign short and cover variables to
> > back-test short trades.
> >If you use stop-and-reverse system (always on the market) simply assign
> >sell to short and buy to cover
> >
> >short = sell;
> >cover = buy;
> >
> >This was how pre-3.59 versions worked.
> >But now you can have separate trading rules for going long and for going
> >short:
> >
> >// long trades entry and exit rules:
> >buy = cross( cci(), 100 );
> >sell = cross( 100, cci() );
> >
> >// short trades entry and exit rules:
> >short = cross( -100, cci() );
> >cover = cross( cci(), -100 );
> >
> >Note that in this example if CCI is between -100 and 100 you are out of
> >the market.
> >
> >Best regards,
> >Tomasz Janeczko
> >===============
> >AmiBroker - the comprehensive share manager.
> ><http://www.amibroker.com>http://www.amibroker.com
> >
> >----- Original Message -----
> >From: "Steve Wiser" <slwiserr@xxxx>
> >To: <amibroker@xxxxxxxxxxxxxxx>
> >Sent: Sunday, May 20, 2001 4:53 PM
> >Subject: [amibroker] Buy and Sell price
> >
> >
> > > Tomasz:
> > >
> > > I think I have these figured out. This is what I did. Is this correct?
> > >
> > > Buyprice=Fractalup+0.065;
> > > Sellprice=AlligatorGreen;
> > >
> > > Buy=Cross(C,Buyprice);
> > > Sell=Cross(SellPrice,C);
> > >
> > > Does the Buy or Sell take place at the price or at the C? I am
> > thinking it
> > > is at the price.
> > >
> > > Thanks again.
> > >
> > > Steve
> > >
> > >
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> > <http://docs.yahoo.com/info/terms/>http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
> >
> >
> >
> >Yahoo! Groups
>
>Sponsor<http://rd.yahoo.com/M=201621.1431180.3015684.2/D=egroupmail/S=1700007389:N/A=616083/R=2/*http://store.yahoo.com/cgi-bin/cli
nk?ydomains+merchant-ad:dmad/M=201621.1431180.3015684.2/D=egroupmail/S=1700007389:N/A=616083/R=3/990373869+http://domains.yahoo.com/
>
> >
> >www.
> >
> >Your use of Yahoo! Groups is subject to the
> ><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>