[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

it plots a continuous line across all the data when on any given day
either of the following options can be taken
a. a 5 day moving average of the highs
b. a 5 day moving average of the lows
c. Nothing...which would accounts for the breaks...

-- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> wrote:
> In what way does it not plot what you want. Might be able to tweak
it if it
> is close to what you are wanting.
> If it is just adding the MA of Highs, and the low one works then
just change
> the formula to Highs and LLV(H,13).
> 
> Cheers,
> Graham
> http://groups.msn.com/ASXShareTrading
> http://groups.msn.com/FMSAustralia
> 
> -----Original Message-----
> From: epintoem [mailto:epintoem@x...] 
> Sent: Tuesday, 13 May 2003 8:59 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Plotting a moving average for a fixed
number of day
> 
> Thanks for the help...
> 
> It kinda works but not in the way I want it to..
> 
> There is another component to this which is to plot the 5 day moving
> average of the highs for the next 4 days when the High is less than
> the highs of the previous 12 days.
> 
> there would be breaks in the line where nothing was drawn like a kinda
> SAR plot? 
> 
> any suggestions?
> 
> Thanks
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> wrote:
> > "Condition : If the low is higher than the lows of the previous 12
> days. I
> > want to plot a moving average of the lows for the next 4 days"
> > 
> > Does this work?
> > 
> > Start =valuewhen( L== HHV(L,13), barcount );
> > Plot( iif( barcount<Start OR barcount>Start+5, Null, MA(L,4) ), "MA
> > Lows",colorblue,styleline);
> > 
> > Cheers,
> > Graham
> > http://groups.msn.com/ASXShareTrading
> > http://groups.msn.com/FMSAustralia
> > 
> > -----Original Message-----
> > From: epintoem [mailto:epintoem@x...] 
> > Sent: Tuesday, 13 May 2003 8:20 AM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Re: Plotting a moving average for a fixed
> number of day
> > 
> > Thanks for your help...However it also plots the null values which I
> > dont want appearing in my chart...any ideas on that?
> > 
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "richard" <rlb21079@xxxx> wrote:
> > >  "Your Variable Name" =
> > Iif(Ref(L,-4)&gt;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 &lt;
> > epintoem@xxxx &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 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.com
> > > The most personalized portal on the Web!
> > 
> > 
> > 
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > 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/
> 
> 
> 
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> 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/


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