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

[amibroker] Re: MA question


  • Date: Mon, 01 Mar 2010 01:03:15 -0000
  • From: "ronspieker" <tip001@xxxxxxxxxxx>
  • Subject: [amibroker] Re: MA question

PureBytes Links

Trading Reference Links


--- In amibroker@xxxxxxxxxxxxxxx, "droskill" <droskill@xxx> wrote:
>
> What is ~G2Range?
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "ronspieker" <tip001@> wrote:
> >
> > Would someone have some insight why the MA does not produce a number in this instance? In this example the avg1 is computed, but I get no result for the MA. 
> > 
> > 
> > Avg1=Foreign("~G2Range","V")/Foreign("~G2Count","V");
> > MA65=MA(Avg1,65);
> > 
> > 
> > Ticker	Date/Time	avg1	MA65	
> > SPY	2/22/2010	69.16		
> > SPY	2/23/2010	59.14		
> > SPY	2/24/2010	65.44		
> > SPY	2/25/2010	64.02		
> > SPY	2/26/2010	63.76
> >

It's just a composite figure aggregated across industry groups created in the separate query below. But when called in a new query, the first number "avg1" is computed (see above exploration), but the MA does not generate. 


Period=65;
Band= (BBandTop( C, Period, 2 ) - BBandBot( C, Period, 2)) / MA(Close, Period ) * 100;
BRange= ((Close - BBandBot( Close, Period, 2 )) / (BBandTop( Close, Period, 2 ) - BBandBot(Close, Period, 2 ))) * 100;
WKROC=ROC(C,5);

AddToComposite(BRange,"~G2Range","V");
AddToComposite(1,"~G2Count","V");
Buy=0;

*****Separate query******

Avg=Foreign("~G2Range","V")/Foreign("~G2Count","V");
MA65=MA(Avg,Period);

Plot(Avg,"G2Avg",6,1);
Plot(MA65, "GRMA65",4,1);




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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