PureBytes Links
Trading Reference Links
|
Hi - Here is code for the long side, untested...try copying and editing the
last 3 lines to make code for the short side.
BuyPrice = SellPrice = ShortPrice = CoverPrice = Open;
SetTradeDelays( 1, 1, 1, 1 );
MA30 = MA( Close, 30 );
CloseAboveMA = Close > MA30;
Buy = Sum( CloseAboveMA, 30 ) == 30;
Cover = Buy;
Steve
----- Original Message -----
From: "george_siris" <george_siris@xxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Wednesday, May 23, 2007 5:16 AM
Subject: [amibroker] Help needed with code
> Hello all, I'm a complete newbie with Amibroker and need some help.
> Could someone please help me with coding the following simple
> stop/reverse system ? :
>
> Long if Close price > 30D Moving Average during 30 consecutive days
> Short if Close price < 30D Moving Average during 30 consecutive days
>
> Buy = next open after long setup
> Short = next open after short setup
>
> 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
>
>
>
>
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/
|