Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Is there a Function like ValueWhen for MultiCharts in EasyLanguage?
Have to translate a code from AmiBroker AFL to easylanguage. need a function which works like the ValueWhen function of AFL. Searched in the reserved words book by MC, tried using IFF function but still not able to achieve it.
the code is:
avn=ValueWhen(avd!=0,avd,1);
somebody please help.
Can you help answer these questions from other members on NexusFi?
you can likely accomplish the same with the IFF function. What code did you try for it?
Otherwise you can either code your own function using "if... else.." statements or use them directly in the indicator
code.
you would have to post compileable code at least, that demonstrates the problem. With the code you posted one could only guess.
A description of what your code does and what you want it to do might be helpful, too (with a screenshot for example).
From the way you wrote the code I would guess that you misunderstand how the "ValueWhen" reserved word works and I would suggest to re-read the documentation. Think about what "ValueWhen" will return if avd = 0.
Please find the attached images. one is the right signals in Amibroker the other is wrong-ish Indicator in Multicharts where i am not able to get signals.