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

[amibroker] Re: MA value one bar ago



PureBytes Links

Trading Reference Links

Andrian,
The value of any array Z one bar ago is Ref(Z,-1).
So, the value of M30=MA(C,30) one bar ago is Ref(M30,-1) and your 
condition is
Buy=MA(C,30)>Ref(MA(C,30),-1);
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Adrian Zaremba" <headcutter@xxxx> 
wrote:
> I want to buy when the value of my MA is higher then the value of 
> the MA one bar ago. I think I am using the wrong code. How should I 
> write this? Thanks
> 
> Buy =  LastValue(MA(Close, X)) < MA(Close, X);


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/