PureBytes Links
Trading Reference Links
|
Hi Brian
I thank you for helping.
Based on your advice, here is the code I entered...
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g,
Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC(
C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle |
ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
Buy = 1;
Sell = 0;
I clicked "apply indicator" in the formula window and completed a back
test but received some strange results. My trade list in the AA window
shows 5 trades total. Under the trade column, the first trade says
"OUT". 2nd trade says "Long", 3rd trade says "Out", 4th trade says
"Long" and the 5th trade says "Out".
I clicked "show actual trades" and it shows a red arrow on bar 1 and a
green and red arrow on bar 11,560 and a green and red arrow on bar
11,561.
There are 11,561 bars total (daily data from 1962 to 2007)
Hope you can help please
Thanks Brian
Walter
--- In amibroker@xxxxxxxxxxxxxxx, "brian_z111" <brian_z111@xxx> wrote:
>
> Walter,
>
> There' more than one way - here's a simple one.
>
> buy = 1;
> sell = 0;
>
> There's an extended example in the files section of this message
> board.
>
> Files > CompareIndexToPortfolio
>
> brian_z
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Walter Lepore"
> <electricwally77@> wrote:
> >
> > Hi Members
> >
> > Please bear with me. I am trying to write a simply Buy and Hold
> system
> > using only one stock (HPQ-Hewlitt Packard). I'm using End of Day
> data
> > and programming using the AFL Wizard . I've been at it for about two
> > hours but can't generate the results of a simple buy & Hold.
> >
> > Obviously I'm doing something wrong. There are a total of 11,561
> > Daily bars in the data I downloaded from Yahoo.
> >
> > I've built several different formulas and none of them result in a
> > simple Buy and Hold when I backtest and run a report.
> >
> > Can someone please tell me what the code is for a simple buy and
> hold
> > please?
> >
> > I assume there will only be an "Enter Long" but NO "Exit Long" since
> > I'm still holding. Correct?
> >
> > Thank you very much
> > Walter
> >
>
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
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:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto: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/
|