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

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



PureBytes Links

Trading Reference Links

I am trying to plot a moving average which I read in a book by Tom
Demark. From the looks of it, it keeps you in trends while keeping you
out of consolidations....now if only I can get it to do what he
recommends....we might have something



--- In amibroker@xxxxxxxxxxxxxxx, "richard" <rlb21079@xxxx> wrote:
>  I assume you mean Null and not zero, which would occur only when
four future bars are not available.  In this case try,
Iif(IsNull("Your variable name"),"Data Unavailable",WriteVal("Your
variable name")); If you mean the zero values, the best I can offer is
to replace the zero in the Iif() statement to something static or
dynamic which you'll easily recognize when reading the data. P.s.  I
am glad to have found someone who is nearly as new to this as myself.
 Many of the posts by others have a boggling effect on my mind.  When
you get acclimated watch for my posts so I don't waste the time of the
experts.--- On Mon 05/12, epintoem &lt; epintoem@xxxx &gt; wrote:From:
epintoem [mailto: epintoem@xxxx]To: amibroker@xxxx: Tue, 13 May 2003
00:20:10 -0000Subject: [amibroker] Re: Plotting a moving average for a
fixed number of dayThanks for your help...However it also plots the
null values which Idont want appearing in my chart...any ideas on
that?--- In ami
>  broker@xxxxxxxxxxxxxxx, "richard" wrote:&gt;  "Your Variable Name"
=Iif(Ref(L,-4)&amp;gt;Ref(LLV(L,12),-5),Ref(MA(L,4),4),0);-Notice:
You'recondition is whether the Low of four days ago is greater than
theLowest 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
theLow array for the four future days.  You could very easily change
thisto 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 itmay 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. 
Thisvalue 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'thave enough data to create a value since you are "looking
forward," soto 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 &gt;  yet to learn to use
If...Else.--- On Mon 05/12, epintoem &amp;lt;epintoem@xxxx &amp;gt;
wrote:From: epintoem [mailto: epintoem@xxxx]To:amibroker@xxxx: Mon, 12
May 2003 23:14:45 -0000Subject: [amibroker]Plotting a moving average
for a fixed number of dayCondition : If thelow is higher than the lows
of the previous 12days. I want to plot amoving average of the lows for
the next 4 days....HOw can one dothat?Thanks RLB for your help with
coloring bars, also Anthony.TIA
> 
> _______________________________________________
> Join Excite! - http://www.excite.com
> The most personalized portal on the Web!


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/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/