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

RE: [amibroker] Plotting a moving average for a fixed number of day



PureBytes Links

Trading Reference Links


 "Your Variable Name" = Iif(Ref(L,-4)>Ref(LLV(L,12),-5),Ref(MA(L,4),4),0);-Notice: You're condition is whether the Low of four days ago is greater than the Lowest Low Value of the Low array for the prior 12 days (hence the -4, and the -5).  If True your array gets stored with a simple MA of the Low array for the four future days.  You could very easily change this to an EMA or change the periods it is applied to so long as the Ref() function is extended +4 days (or periods) I haven't tested this so it may have an error, but it should provide you with the value you want.  When your conditions aren't met you'll get a zero reading.  This value can be plotted however you like, eg. as a line, in the title, etc.  Of course, if this event occurs less than 4 days ago you won't have enough data to create a value since you are "looking forward," so 
 to speak. I have a feeling this isn't exactly what you had in mind... more can be done with the If...Else function I am sure but I have yet to learn to use If...Else.--- On Mon 05/12, epintoem < epintoem@xxxxxxxxx > wrote:From: epintoem [mailto: epintoem@xxxxxxxxx]To: amibroker@xxxxxxxxxxxxxxxDate: Mon, 12 May 2003 23:14:45 -0000Subject: [amibroker] Plotting a moving average for a fixed number of dayCondition : If the low is higher than the lows of the previous 12days. I want to plot a moving average of the lows for the next 4 days....HOw can one do that?Thanks RLB for your help with coloring bars, also Anthony.TIA
Join Excite! - http://www.excite.comThe most personalized portal on the Web!







Yahoo! Groups Sponsor












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 the Yahoo! Terms of Service.