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

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



PureBytes Links

Trading Reference Links

Martin

Try this. No guarantees but the use of LastValue() and PREV in this manner does work sometimes.
Unfortunately sometimes it does not.

VVP:= FML("Martin(VVP)"); {ref to my formula}
PerSinceLower:=BarsSince(VVP<-1); {Periods since result has been  under -1}
LowestValue:=LLV(VVP,LastValue(PerSinceLower+PREV-PREV));
{Tries to determine the lowest value since result has been under -1}

If this doesnt work you could try making the LLV variable the result plot for the indicator and then
use an Fml() call to apply the value to the rest of your code.

VVP:= FML("Martin(VVP)"); {ref to my formula}
PerSinceLower:=BarsSince(VVP<-1); {Periods since result has been  under -1}
LLV(VVP,LastValue(PerSinceLower+PREV-PREV));

Roy


> 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
>
>
>
>
>
>
>




 
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/