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

Re: [Metastockusers] formula question



PureBytes Links

Trading Reference Links

Tom

What is it doing in English?

Roy

----- Original Message ----- 
From: "tlsprunger" <tlsprunger@xxxxxxxxxxx>
To: <Metastockusers@xxxxxxxxxxxxxxx>
Sent: Tuesday, July 20, 2004 3:57 AM
Subject: [Metastockusers] formula question


> I wonder if any wizards can help me with following.
> 
> I have a formula written in Java Script similar to the following:
> n=20;
> for(i = n; i > 0; i--)
> sum += (i - (n + 1) / 3) * close(i - n);
> 
> Now how would I convert that to Metastock language?
> 
> note that when the current bar is the "0" bar, the value of i is 20.
> When the current bar is the "-1" bar, the value of i is 19, etc.
> 
> For example if the part "i-" were not in the equation, then I could 
> do the following:
> n=20;
> x1=n+1)/3)*C;
> x=sum(x1,n);
> and it will sum up the values of x1 over the last 20 bars.
> 
> Now how do I get it to add the "i-" part?
> 
> Perhaps Metastock can not do this?
> 
> 
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/zMEolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

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

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

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