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

[amibroker] Re: Help for newbie



PureBytes Links

Trading Reference Links

The way you have the right side of the equations written it is 
essentially a 9 bar ma i.e. 10-1 as opposed to yesterdays 10 bar 
which could be written

MA10 = MA(C, 10);

Buy = MA10 > Ref(MA10, -1);
Sell = MA10 < Ref(MA10, -1);

Have a look at the Ref function in the doc.

--- In amibroker@xxxxxxxxxxxxxxx, "ianjw2" <ianjw2@xxxx> wrote:
> I'm a fairly new user of AB and this is my first attempt at 
programing 
> in AFL. Another program I'm using has a much simpler programing 
> protocol, but in essence, would be expressed like this. Although 
this 
> runs, the results are not what I expected.
> 
> What I want to do is buy on a rising MA and sell on a falling MA.
> 
> I.E. Todays MA is higher than yesterdays MA.
> 
> /*Rising 10ma*/
> 
> Buy = MA ( Close, 10 ) > MA (Close,10-1);    
> Sell = MA ( Close, 10 ) < MA (Close,10-1);
> 
> 
> Are there any kind souls out there who can point me in the right 
> direction?
> 
> Ian




------------------------ 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/