PureBytes Links
Trading Reference Links
|
Thanks for your response. Basically I have two set of profit/stop
loss factors which are all constants. I want to use one set
profit/stop loss factors for BUY signals and another set for SHORTS.
This is because my optimal stop loss can be safely set much tighter
on my short positions. However, as it is not and I only backtest
Long and Short individuals since I presently have to manually change
the factors before each backtest.
--- In amibroker@xxxxxxxxxxxxxxx, "gp_sydney" <gp.investment@xxx>
wrote:
>
> What exactly are you trying to achieve? Are Value1 and Value2
> constants or arrays? Is ProfitFactor supposed to be constant during
> the backtest based on some particular bar's buy/short values, or
> should it also be an array that potentially changes every bar?
>
> From what you're asking in your first paragraph, you'd have
something
> like:
>
> action1 = Buy && !Short;
> action2 = !Buy && Short;
>
> Here action1 and action2 are both arrays. What are you then
wanting to
> do with those results?
>
> Regards,
> GP
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "cnh4_2000" <cnh4_2000@> wrote:
> >
> > I'm backtesting a system which requires me to take action #1 if
BUY
> > was true(and SHORT was false) and take action #2 if SHORT was
true
> > (and BUY was false). Obviously, this evaluation is done after
after
> > the BUY and SHORT signals are checked.
> >
> > Here are the different things I've tried which all dont seem to
be
> > producing the right result. In other words, when backtesting
long
> > trades only, my profit is different when I manually
> > section "ProfitFactor" compared to when I attempt to dynamically
set
> > it based on whether or not BUY is true.
> >
> > Attempt 1
> >
> > ProfitFactor=IIf(Lastvalue(Buy),Value1,Value2);
> >
> > Attempt 2
> >
> > ProfitFactor=IIf(Lastvalue(Buy,False),Value1,Value2);
> >
> > Attempt 3
> >
> > ProfitFactor=IIf(Buy,Value1,Value2);
> >
> > Attempt 4
> >
> > ProfitFactor=IIf(selectedvalue(Buy,False),Value1,Value2);
> >
> >
> >
> >
> > None of these seem to produce the right result during my
backtest. :
> > ( Any advise would be appreciated. Thanks.
> >
>
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/
|