PureBytes Links
Trading Reference Links
|
Thanx CS....here is the basic code I have tried to implement. I
doesn't work, can you please proof it and see where i might make some
improvements?
Thank you
Dennis
// ---------------------------------------
z=cci(14);
// Filters
Filter = (zlrlong OR zlrshort OR famirlong OR famirshort OR Vtlong OR
Hfelong OR Vtshort OR gb100long OR gb100short OR Hfeshort) OR (A OR
bars) AND 1 AND MA(V,50) > 100000;
Buy = (zlrlong OR famirlong OR Vtlong OR gb100long);
Sell= (z<Ref(z,-1) AND Ref(z,-1)<Ref(z,-2) AND C<O);
Short = (zlrshort OR famirshort OR Vtshort OR gb100short);
Cover = (z>Ref(z,-1) AND Ref(z,-1)>Ref(z,-2) AND C>O);
// AutoTrader
// Buy
if(LastValue(Buy))
{
ibc= GetTradingInterface("IB");
// check if we are connected OK
if(ibc.IsConnected())
{
//check if we do not already have open position on this future/stock
if(ibc.GetPositionSize(Name())==0)
{
//transmit order
parentid=ibc.PlaceOrder(Name(),"Buy",1,"MKTCLS",0,0,"Day",True);
if(LastValue(Sell))
{
ibc.placeorder(Name(),"SELL",1,"MKTCLS",0,0,"Day",True,parentid);
}
}
}
}
// Short
if(LastValue(Short))
{
ibc= GetTradingInterface("IB");
// check if we are connected OK
if(ibc.IsConnected())
{
//check if we do not already have open position on this future/stock
if(ibc.GetPositionSize(Name())==0)
{
//transmit order
parentid=ibc.PlaceOrder(Name(),"Sshort",1,"MKTCLS",0,0,"Day",True);
if(LastValue(Cover))
{
ibc.placeorder(Name(),"Buy",1,"MKTCLS",0,0,"Day",True,parentid);
}
}
}
}
--- In amibroker@xxxxxxxxxxxxxxx, "cstrader" <cstrader232@xxxx> wrote:
>
> Dennis. Stay tuned to this group as well as the amibroker-at
group. Many
> of us are autotrading. It takes some effort, but it is well worth
it.
> Amibroker can do almost everything, including (of course) covering.
>
>
> ----- Original Message -----
> From: "Dennis And Lisa" <dennisandlisa@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Saturday, January 07, 2006 3:31 PM
> Subject: [amibroker] Amibroker's Auto Trader
>
>
> > I'm looking to autotrade with Amibroker's Auto Trader. I think
> > Amibroker is by far the best charting software available, and this
> > option makes it that much better. I'm still trying to figure out
some
> > basics. I know there is a Buy finction, a sell function, and a
Short
> > function. But no Cover function. Is anyone using the auto trader
> > option, and if so, how is it working for you?
> >
> > Dennis
> >
> >
> >
> >
> >
> >
> > 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 other support material please check also:
> > http://www.amibroker.com/support.html
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~->
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 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/
<*> 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/
|