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

[amibroker] Re: AdvIssues + DecIssues not working?



PureBytes Links

Trading Reference Links

Hello Ed,

I get the same as you (no report for Out_Stix in an AddColumn.

There is something I don't understand about this - I think it is to 
do with the way the Add/Decs are calculated "behind the scenes" (as a 
composite).

Using variations of the following code I can get the Ads, Decs and 
Ad/Decs to fill a column, or to plot but then it breaks down at the 
final EMA line.

I can plot Ads,Decs or Ad/Decs and drag an EMA onto the Ad/Decs line 
in the  indicator window (see code at SECTION_BEGIN) but as soon as I 
plot EMA(AD,Periods) the EMA plot goes missing.

Filter =1;

Period = 21;

Out_STIX = EMA(100 * AdvIssues()/( AdvIssues() + DecIssues() ), 
Period);

A = AdvIssues();
D= DecIssues();
AD = AdvIssues()/( AdvIssues() + DecIssues() );
EAD = EMA(AD,21);

//Plot(A,"Ad",1,1);
//Plot(D,"Dec",1,1);
Plot(AD,"AddDec",1,1);
//Plot(EAD,"EMAAddDec",1,1);
//Plot(Out_Stix,"OutStix",1,1);


AddColumn(A, "Add",1.2,1);
AddColumn(D, "Dec",1.2,1);
AddColumn(AD, "AD",1.2,1);
AddColumn(EAD, "EMAAD",1.2,1);

AddColumn(Out_STIX, "STIX",1.2,1);

_SECTION_BEGIN("EMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 200, 1, 10 );
Plot( EMA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", 
colorCycle ), ParamStyle("Style") ); 
_SECTION_END();

brian_z






--- In amibroker@xxxxxxxxxxxxxxx, "Ed Cottrell" <emc@xxx> wrote:
>
> Sorry, I meant there is no output in that column - I have the Filter
> statement, and there is output in every other column of my 
exploration. This
> is just a snippet of a larger AFL script.
> 
>  
> 
> Thanks,
> 
> Ed
> 
>  
> 
>  
> 
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] 
On Behalf
> Of Ara Kaloustian
> Sent: Sunday, December 09, 2007 12:06 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: Re: [amibroker] AdvIssues + DecIssues not working?
> 
>  
> 
> Youneed this statement BEFORE AddColumn:
> 
>  
> 
> Filter = 1;
> 
> ----- Original Message ----- 
> 
> From: Ed Cottrell <mailto:emc@...>  
> 
> To: amibroker@xxxxxxxxxxxxxxx 
> 
> Sent: Sunday, December 09, 2007 9:47 AM
> 
> Subject: [amibroker] AdvIssues + DecIssues not working?
> 
>  
> 
> Hello all,
> 
>  
> 
> I am trying to calculate the STIX indicator in an exploration using 
the
> following code:
> 
>  
> 
> Period = 21;
> 
> Out_STIX = EMA(100 * AdvIssues()/( AdvIssues() + DecIssues() ), 
Period);
> 
> AddColumn(Out_STIX, "STIX");
> 
>  
> 
> AmiBroker says this is okay, but this isn't generating any output, 
at all,
> regardless of which or how many stock symbols I run the exploration 
over.
> Can anyone tell me what is wrong?
> 
>  
> 
> Thanks,
> 
> Ed
>




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

<*> 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:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto: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/