Rank: Newbie
Groups: Registered, Registered Users Joined: 7/4/2012(UTC) Posts: 3
|
Hello everybody!
I am a newbie to metastock so I need help on its programming language. The formula is as follows,
LC:= llvbars(C,21); {Lowest period of the close since 21 days} Low1:= ref(MACD(),(-1*LC));
The above formula doesnt seem to work. Error message is "This variable or expression must contain only constant data." I think it refers to variable LC, which returns only one number...
What I want to do is get the value of the MACD during the lowest close of the last 21 days.
Can anybody explain this or tell me whats wrong in this formula? Can anybody show me a better way?
Thank you in advance.
Zaldy
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 5/22/2012(UTC) Posts: 19
|
HI Zaldy;
you can use the function
ExtFml( "Forum20.LLVBARS", Data Array, Variable Period).
but after that you do to download forum20.dll from the site and to make it in
C:\Program Files (x86)\Equis\MetaStock\External Function DLLs and it will work.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 7/4/2012(UTC) Posts: 3
|
Hello ClaudeBrunet,
Thank you for your reply. It was very fruitful. Now I understand why my formula doesnt work, metastock does not allow variables to be declared as constants..
I have already downloaded the dll file, together with its documentation. And currenty reading it... Since Im a newbie, my head is spinning right now... hahaha
Again, thank you very much.
Best regards, Zaldy
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 7/4/2012(UTC) Posts: 3
|
Hello there again,
Can the ExtFml("blah blah blah".... can be used in the expert advisor?
Best regards, Zaldy
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 5/22/2012(UTC) Posts: 19
|
Hi Zaldy,
typically you can.
but i didn't try it.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
zaldy wrote:What I want to do is get the value of the MACD during the lowest close of the last 21 days. Code:ValueWhen(1,C=LLV(C,21),MACD());
zaldy wrote:Can the ExtFml("blah blah blah".... can be used in the expert advisor?
Yes.
|
|
|
|
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.