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

Re: [EquisMetaStock Group] counting



PureBytes Links

Trading Reference Links

Hi Robert

As I suggested earlier, Cum() is the function that's probably central to
much of what you want to do. Try setting up your code as an indicator
before you move it across to the Explorer. It's much easier to
troubleshoot something that you can see.

This code counts all valid MA bars to define variable "A", then divides
the sum of all differences between C and MA by A;

A:=Cum(IsDefined(Mov(C,200,S)));
Cum(C-Mov(C,200,S))/A;

Once again I'm unclear about how/why you want to vary the moving
averages, and whether you can achieve what you want is anybodies
guess. If you wish to use some calculated value to set the "periods"
parameter of an MA then you may need to convert a variable to a
constant with LastValue(). This might not fit with your plans to "vary
my moving averages", but hopefully it will give you another option.


Kind regards

Roy
www.metastocktips.co.nz






----- Original Message ----- 
From: "robcpettit" <robcpettit@xxxxxxxxxxx>
To: <equismetastock@xxxxxxxxxxxxxxx>
Sent: Wednesday, April 27, 2005 9:41 AM
Subject: Re: [EquisMetaStock Group] counting


> 
> 
> Thanks for your reply. Ok clarity. Im calculating the difference
> between the average and the dailly price. so if say i have 300 prices
> and use the 200 dma I would be able to calculate 100 differences. When
> I have these 100 values I want to add them all together. Fairly
> straight forward when I know excactly how many values I need to add.
> But on a dailly basis I will be adding new data so realistically I
> cant do this manually. Therefore I need a formula to say 'you have 100
> values' which Ill then use in a variable to do the rest. Also I want
> to very my moving averages so again impossible to do manually. I hope
> this is explained better.
> Regards Robert
> 
> 
> 
> 
> 
> 
> 
> 
> --------------------------------------------------------------------------------
> Yahoo! Groups Links
> 
>  a.. To visit your group on the web, go to:
>  http://groups.yahoo.com/group/equismetastock/
>    
>  b.. To unsubscribe from this group, send an email to:
>  equismetastock-unsubscribe@xxxxxxxxxxxxxxx
>    
>  c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
> 
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

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

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

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