PureBytes Links
Trading Reference Links
|
I've been experimenting with this and found that if I change the code
below:
Buy = Cross( s1,AVRSI-DBuy);
Sell = Cross( AVRSI+Dsell,s1);
Short = Sell;
Cover = Buy;
to:
Buy = Cross( s1,AVRSI-DBuy);
Sell = Cross( AVRSI+Dsell,s1);
Short = Cross( AVRSI+Dsell,s1);
Cover = Cross( s1,AVRSI-DBuy);
The problem I described goes away but my overall results have
changed....
Questions:
Is there anything wrong with the changes?
Are they a better way of handling longs and shorts?
Is there a better way?
Thanks for any help!
dingo
--- In amibroker@xxxx, "wingnut_1944" <dingo@xxxx> wrote:
> Thanks for the reply Tomasz!
>
> Yes, I did notice the hollow green arrow but there is also a solid
> green arrow there also. Doesn't this mean that a long position is
> indicated? If so why isn't this long in the grid?
>
> I'm just not understanding this at the moment..
>
> dale
>
>
> --- In amibroker@xxxx, "Tomasz Janeczko" <tj@xxxx> wrote:
> > Hello,
> >
> > Yes you should use "Show arrows for actual trades" option.
> > By using this you don't need ExRem at all.
> >
> > Please also note that green hollow (empty) arrow
> > marks COVERing short postion. This is what you are probably
> > referring to as to ApplyStop-generated buy stopping your short
> trade
> >
> > This is so because
> > "Show arrows for actual trades" shows all entry/exit points
> > not only explicity generated by your formula but also those
> > generate by stops.
> >
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > ----- Original Message -----
> > From: "wingnut_1944" <dingo@xxxx>
> > To: <amibroker@xxxx>
> > Sent: Wednesday, July 17, 2002 5:42 PM
> > Subject: [amibroker] Loosing hair over this formula!
> >
> >
> > > I'm down to just a few hairs over a problem I'm having with the
> > > forumla below:
> > >
> > > //---------------------------------------------------
> > >
> > > X1=Optimize("X1",20,10,20,1);
> > > Dbuy=Optimize("Dbuy",9,0,20,1);
> > > Dsell=Optimize("Dsell",1,0,20,1);
> > > osl = 3;
> > > oAvrsi = 50;
> > >
> > > ApplyStop(2,1,Optimize("Trl Stop %",10,5,10,1),0);
> > >
> > > s1=MA(RSI(X1),osl);
> > > AVRSI=MA(s1,OAvrsi);
> > > Buy = Cross( s1,AVRSI-DBuy);
> > > Sell = Cross( AVRSI+Dsell,s1);
> > >
> > > Short = Sell;
> > > Cover = Buy;
> > >
> > > //Buy = ExRem( Buy, Sell );
> > > //Sell = ExRem( Sell, Buy );
> > > //Short = ExRem( Short, Cover );
> > > //Cover = ExRem( Cover, Short );
> > >
> > > //---------------------------------------------------
> > >
> > > The problem is that when I back test it against the NDX-X From
> TC2000
> > > with the following settings:
> > >
> > > >From 1/1/1997 to 7/15/2002
> > > Initial equity: 10000
> > > Posisitions: Long and Short
> > > Peiodicity: Daily
> > > Commissions: percent = 0
> > > Buy Price: Close with delay of 1
> > > Sell Price: Close with delay of 1
> > > Short Price: Close with delay of 1
> > > Cover Price: Close with delay of 1
> > > Max loss Stop: disabled
> > > Profit target: disabled
> > > Trailing stop: disabled
> > > Reporting: overall summary, settings, incl out-of-market are
> checked
> > > with "Trade list with prices and pos" selected.
> > >
> > > and double click on the resultant grid I get a bunch of arrows.
> When
> > > I check against the trades in the grid versus the arrows for
the
> year
> > > 2000 I see a lot of extra arrows. In reading the forum
> > > messages I learned that you can right click on the grid and
> > > select "Show arrows for actual trades" which I've done and the
> > > green/red arrows change. The trades on the grid now seem to
match
> the
> > > arrows except that it shows a buy arrow for 7/5/2002 which is
not
> > > listed in the grid as a trade. Coincidentally on that same date
> the
> > > short from 5/30/2002 is stopped out via the applystop. Is this
> > > preventing the buy? If so how can I Fix this?
> > >
> > > I read in a post (see link below) that in Version 4.0 and later
> that
> > > you're not supposed to use the ExRem function anymore.
> > >
> > > http://groups.yahoo.com/group/amibroker/message/17676?threaded=1
> > >
> > > Is that correct or should I use the ExRems? (I want to do some
> tests
> > > on a year by year basis)
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
|