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

Re: [amibroker] N-period MA not available on bar n-1



PureBytes Links

Trading Reference Links

Good question, wish I knew the answer
Needing 3 values to get an average of 3, the calculation needs the 4th bar
before it starts. basically ignoring the 1st bar
One of those things computer geeks seem to like doing just to annoy us :-)


-- 
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://www.aflwriting.com


On 23/11/06, whitneybroach <WhitneyBroach@xxxxxxxxx> wrote:
>
> I notice an n-period MA is not available on bar n-1, yet bars are
> numbered starting with zero?
>
> Related question:  why isn't an n-period MA of Open not available at
> the close on bar n-1 ?
>
> Newbie just trying to understand.  Maybe I have a setting wrong? :)
>
> (If there's a "know issues" list, could someone point me to it?  Thanks.)
>
> Sample code (Explorer, Range "all quotations":
> /////////////////////////////////////////////
> trendC = MA( C, 3 );
> trendO = MA( O, 3 );
> trendCTrue = IsTrue( trendC );
> trendOTrue = IsTrue( trendO );
>
> Filter=Status("Barinrange");
> AddColumn( C, "Close" );
> AddColumn( BarIndex(), "Bar" );
> AddColumn( trendCTrue, "trendCTrue", 1.0 );
> AddColumn( trendOTrue, "trendOTrue", 1.0 );
> AddColumn( trendC, "TrendC" );
> AddColumn( trendO, "TrendO" );
> /////////////////////////////////////////////
>
>
>
>
> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
> Yahoo! Groups Links
>
>
>
>
>

Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.13/546 - Release Date: 11/22/2006