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

[amibroker] Re: Channel Trading



PureBytes Links

Trading Reference Links

Ray,

can you explain in words how the filters are supposed to work?

T.O.

--- In amibroker@xxxxxxxxxxxxxxx, "me_rayme" <rayme9@xxx> wrote:
>
> Has anybody converted this to AB and would love to share including 
> the plot info. Interesting article.
> 
> Ray
> 
> June 2007  activetradermag.
> TradeStation code for "Short-term, channel trading ," p. 29
> 
> The base strategy
> inputs:length(10);
> vars:lrgh(0),lrgl(0);
> lrgh=linearregvalue(h,length,0);
> lrgl=linearregvalue(l,length,0);
> buy next bar at lrgh stop;
> sell short next bar at lrgl stop;
> 
> The first filter
> if (lrgh > lrgh[1] ) then buy next bar at lrgh stop;
> if (lrgl < lrgl[1] ) then sell short next bar at lrgl stop;
> 
> The second filter
> if (lrgh < lrgh[1] and c<lrgh ) then buy next bar at lrgh stop;
> if (lrgl > lrgl[1] and c>lrgl ) then sell short next bar at lrgl 
stop;
> 
> Behle-Conway modified exit strategy
> 
> Inputs: stopbars(3), exitfactor(0.25),
> length(14), profitbars (3), profitfactor (0.9);
> Vars: sellstop(0),Coverstop(0),ATR(0), selltarget1(0),covertarget1
> (0),selltarget2(0),covertarget2(0);
> ATR=Avgtruerange(length);
> Sellstop=lowest(low,stopbars)-(exitfactor*ATR);
> Coverstop=highest(high,stopbars)=(exitfactor*ATR);
> Selltarget1 =h+(profitfactor*atr);
> Covertarget1=low - (profitfactor*atr):
> Selltarget2=highest(h,profitbars)+(2*profitfactor*atr);
> Covertarget2=lowest(l,profitbars)-(2*profitfactor*atr);
> If marketposition<>0 then begin
> Sell next bar at sellstop on stop;
> Buy to cover next bar at coverstopon stop;
> End;
> If Marketposition<>0 then begin
> 
> Sell currentcontracts/2 contracts next bar at selltarget1 on stop;
> Buy to cover currentcontracts/2 contracts next bar at covertarget1 
on 
> stop;
> Sell next bar at selltarget2 on stop;
> Buy to cover next bar at covertarget2 on stop;
>




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/