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

[EquisMetaStock Group] Re: This variable or expression must contain only constant data



PureBytes Links

Trading Reference Links

Jose,

Can you elaborate on the issues with Ref() function?

Thanks,

Brad 

--- In equismetastock@xxxxxxxxxxxxxxx, "Jose Silva" 
<josesilva22@xxxx> wrote:
> Steve, beware of variable Ref() functions - the variable lookback 
> often interferes with previous lookback plots, and can give strange 
or 
> unexpected results.
> 
> Anyway, here's your code using Patrick's Forum Dll:
> 
> ---8<--------------------------------
> { Forum DLL available for free at:
>   http://forum.equis.com }
> 
> {Get the highest close in most recent x bars}
> x:=5;
> 
> {LLV in the preceding x bars}
> y:=3;
> 
> index:=BarsSince(C=HHV(C,x));
> tmpLLV:=
>  LLV(ExtFml("ForumDLL.VarREF",L,-index),y);
> 
> tmpLLV
> ---8<--------------------------------
> 
> 
> jose '-)
> http://www.metastocktools.com
> 
> 
> 
> --- In equismetastock@xxxxxxxxxxxxxxx, pumrysh <no_reply@xxxx> 
wrote:
> > Steve,
> > 
> > This is exactly the reason why variable DLL's have been created. 
Try 
> > the Equis forum DLL. 
> > ExtFml( "ForumDLL.VarREF", Data Array, Variable Period)
> > 
> > It should allow you to use a variable period.
> > 
> > Preston
> > 
> >  
> > 
> > --- In equismetastock@xxxxxxxxxxxxxxx, Stephen Dawson 
<dawsonsg@xxxx
> > 
> > wrote:
> > > 
> > > Hi Guys,
> > > 
> > > What I am trying to do is;
> > > 1. Get the highest close in the preceding x bars (including the 
> > current bar). 
> > > 2. Once I have that, I want to get the lowest low value of the 
> > preceding y bars before that. 
> > > 
> > > I have written the following four lines of code which I though 
> > would have achieved that (or pretty close to it).
> > > 
> > > {Get the highest close in most recent x bars}
> > > x:=5; 
> > > 
> > > {LLV in the preceding x bars}
> > > y:=3;  
> > > 
> > > index:=BarsSince(C=HHV(C,x))*(-1);
> > > tmpLLV:=LLV(Ref(L,index),y);
> > > tmpLLV
> > > 
> > > 
> > > There is probably an error in the last line that I may be a bar 
or 
> > two out. The issue I having is that the Ref(L,index)in the last 
> line. 
> > I am ghetting the error "This variable or expression must contain 
> > only constant data."
> > > 
> > > If I place a number where the index variable is the code saves. 
As 
> > it is above though I am getting the constant data error message.
> > > 
> > > If someone could offer apointer or two on how to get around 
this 
> > I'd appreciate it.
> > > 
> > > Regards
> > > Steve




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Help tsunami villages rebuild at GlobalGiving. The real work starts now.
http://us.click.yahoo.com/njNroD/KbOLAA/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/