Discussions
»
Product and Service Development
»
Formula Assistance
»
lowest low value bars ago and referencing period as variable problem
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 9/28/2005(UTC) Posts: 1
|
I am writing an indicator that uses llvbars(data array, periods) and it starts with this series of code(constants are used later in complete code)
Aup:=40; Adown:=60; uRSI:=70; dRSI:=30; up:=BarsSince(RSI(9)>70); dn:=BarsSince(RSI(9)<30); LLVbars(RSI(9),up);
rest of code follows last item, which is the problem function.
I need to calculate the lowest low value of RSI(9) since "up" number of days. Metastock will not accept up or fml("up") for periods in the basic formula llvbars(data array, periods) because the error message reads: This variable or expression must contain only constant data.
Can I get around this problem of having a variable number of up or dn days and then calculatting llvbars? Or, am I writing formula wrong?
thanks for any help.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
You can use the Forum.dll (free from the files section) to use variable time periods in the llvbars() function.
Hope this helps.
wabbit [:D]
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Discussions
»
Product and Service Development
»
Formula Assistance
»
lowest low value bars ago and referencing period as variable problem
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.