logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
abcde123  
#1 Posted : Thursday, April 5, 2007 10:02:28 AM(UTC)
abcde123

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/13/2005(UTC)
Posts: 20

How to find Reference of a formula value at Peaks Or trough

I use;

Bars1:=Peakbars(1,High,5);

fmval:= Ref( fml("myindicator") , Bars1 * -1);

If i use above then I get the error that only constant values can be used in Ref() Function.

How to solve it??

Any help will be appreciated.

*PP  
#2 Posted : Thursday, April 5, 2007 1:28:07 PM(UTC)
*PP

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/1/2006(UTC)
Posts: 135
Location: Romania

First i must warn u that peak and trough functions are using zig-zag and in consequence they are dynamic.

ref(fml("yourindicator"),-lastvalue(peakbars(2,h,3)))

or

valuewhen(1,peakbars(1,h,3)=0,fml("yourindicator"))

or

valuewhen(2,peakbars(1,h,3)=0,fml("yourindicator"))

first two codes are dynamic and uselles and the last one i think that it could be used for something if u really want to

:)

abcde123  
#3 Posted : Saturday, April 7, 2007 8:07:48 AM(UTC)
abcde123

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/13/2005(UTC)
Posts: 20

Thank You for your help.
Users browsing this topic
Guest (Hidden)
Similar Topics
Formula help: Ref() function (Formula Assistance)
by hatem 2/17/2009 4:19:35 AM(UTC)
CalendarDay-based Ref() function (Advanced Coding Techniques)
by Jose 12/24/2005 4:17:50 PM(UTC)
WriteRef() function of ASI.dll (MetaStock Developer's Kit (MDK) Assistance)
by bradulrich 8/18/2005 3:53:14 AM(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.