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

Re: [EquisMetaStock Group] counting



PureBytes Links

Trading Reference Links

Thankyou for your reply, If Im understanding this correctly this solve
a niggling problem. Ive been using Cum buy not in the way youve
pointed out. The count kept starting from from day one of data and not
of m/a, therefore I had to combine with the lastvalue method to get
around this. From what youve given here I can Count from day one of
m/a providing I have 200 prices, or what ever the moving Average is.
Thankyuo
Regards Robert




--- In equismetastock@xxxxxxxxxxxxxxx, "MG Ferreira" <quant@xxxx> wrote:
> Hi Robert,
> 
> I think a lot of your questions can be answered by the 'Cum(1)'
> function, which simply counts from 1 onwards.  So if your formula
> should only kick in if you have 300 data points, something like
> 
> Cum(1) >= 300
> 
> will only return true if that condition is met.  You can parameterise
> it easily, say
> 
> Cum(1) >= par1
> 
> To count the number of bars a given formula is available, say a moving
> average, you can use something like
> 
> Cum(Mov(C,200,S)>0)
> 
> which will count the number of days this formula was above 0.  So if
> you work with things that can also take on negative values, you have
> to adjust accordingly, but the idea is the same.  This only starts
> counting once the formula 'works', ie after the first 200 days are
> available.
> 
> Hope this helps.  If all else fails, use exponential averages, which
> theoretically start working from day 1 (although I have a feeling MS
> may treat it differently).
> 
> Regards
> MG Ferreira
> TsaTsa EOD Programmer and trading model builder
> http://www.ferra4models.com
> http://fun.ferra4models.com 
> 
> 
> 
> --- In equismetastock@xxxxxxxxxxxxxxx, "robcpettit" <robcpettit@xxxx>
> wrote:
> > 
> > 
> > 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 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/