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

[EquisMetaStock Group] Re: LLV: "...must contain only constant data"



PureBytes Links

Trading Reference Links

Maybe something like this:

---8<------------------------------------
VVP:=Mo(10)-100; { or Fml("Martin(VVP)") }

{ alert if VVP crosses -2 on prior 3 periods }
pds:=3;

Cross(VVP,-1) AND Alert(Cross(VVP,-2),pds)
---8<------------------------------------


An alternative is to use a variable-period LLV dll.

jose '-)


--- In equismetastock@xxxxxxxxxxxxxxx, "mlaporte99" <mlaporte99@xxxx> 
wrote:
> Hello,
> 
> I have built a custom formula, which always returns a number 
> between -5 and 5 for each period.
> 
> I want to test this formula so a buy signal is flagged each time the 
> value crosses -1 from under.  *BUT*, I also want to make sure that 
> before crossing -1, the result of my formula was less than -2 during 
> its "run" under.
> In other words, I do not want to buy a stock that crosses -1, but 
> that did not previously go under -2 during its run.
> 
> To accomplish this, I have written the following in my "Buy Order":
> 
> <<<---------Formula---------
> VVP:= FML("Martin(VVP)"); {ref to my formula}
> PerSinceLower:=BarsSince(VVP<-1); {Periods since result has been 
> under -1}
> LowestValue:=LLV(VVP,PerSinceLower); {Tries to determine the 
> lowest value since result has been under -1} 
> ---------Formula--------->>>
> 
> 
> My problem is that the LLV does not accept a variable for the 
> PERIODS parameter.
> 
> Does anyone have a suggestion?  Any help will be greatly 
appreciated.
> 
> Thanks!
> Martin



 
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/