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

Notification

Icon
Error

Options
Go to last post Go to first unread
jim_c_hill  
#1 Posted : Friday, November 7, 2008 2:44:19 PM(UTC)
jim_c_hill

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.

wabbit  
#2 Posted : Wednesday, November 12, 2008 4:16:23 PM(UTC)
wabbit

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