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

[amibroker] Re: Back test questions


  • Date: Mon, 21 Dec 2009 17:36:03 -0000
  • From: "peter843" <yahoogroups@xxxxxxxxxxxx>
  • Subject: [amibroker] Re: Back test questions

PureBytes Links

Trading Reference Links

Hi Howard,

I want sell to be true on every bar since I want to cover the position the next day. That works correctly on most trades but there are some in the trade list that lasted much longer - for hundreds of bars.

--- In amibroker@xxxxxxxxxxxxxxx, Howard B <howardbandy@xxx> wrote:
>
> Hi Peter --
> 
> In this code, Buy is True on every bar where the condition RSI(4) is less
> than 30.  As long as RSI(4) stays below 30, Buy stays True.
> 
> The statement Sell = Close sets the Sell to the value of the Closing price.
> Since any non-zero value is interpreted as True, and only exactly zero is
> interpreted as False, Sell is True on every bar.
> 
> Thanks,
> Howard
> 
> 
> On Mon, Dec 21, 2009 at 8:52 AM, peter843 <yahoogroups@xxx> wrote:
> 
> >
> >
> > Hi Howard,
> >
> > Here is some sample code that has the issues I discussed.
> >
> > -------
> > RSISignal = RSI(4) < 30 ;
> >
> > PositionSize = -10; // invest 10% of portfolio equity in single trade
> >
> > Buy = RSISignal ;
> > Sell = Close ;
> > -------
> >
> > --- In amibroker@xxxxxxxxxxxxxxx <amibroker%40yahoogroups.com>, Howard B
> > <howardbandy@> wrote:
> > >
> > > Hi Peter --
> > >
> > > To be sure we are all looking at the same situation, post the code you
> > have
> > > a question about.
> > >
> > > A common reason trades last longer than might be expected is that the Buy
> > > condition reoccurs during the trade.
> > >
> > > Thanks,
> > > Howard
> > >
> > >
> > > On Sat, Dec 19, 2009 at 1:31 PM, peter843 <yahoogroups@> wrote:
> > >
> > > >
> > > >
> > > > 1. My intention is to buy on the close when I get a signal and exit on
> > the
> > > > close of the next day. I'm using EOD data. In AA Trades settings I have
> > > > prices set to close and delays set to 0. In my code I have "Sell =
> > Close ;"
> > > >
> > > > When looking at the trade list the majority of trades last 2 bars as
> > > > expected. But some last much longer. How do I get them all to last 2
> > days?
> > > >
> > > > 2. When looking at the Trade column of the trades list I see
> > descriptions I
> > > > don't understand like "Long (trail)", "Long (profit"), "Long (n-bar)",
> > > > "Long(max loss)", "Long(nn)". In the Stops tab of settings everything
> > is
> > > > disabled so I don't understand where all these are coming from.
> > > >
> > > >
> > > >
> > >
> >
> >  
> >
>




------------------------------------

**** 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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/