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)
so I have 10 conditions (bool) ranging from c1 - c10.
if any of those conditions are true, then they give me the appropriate int.
ex. if c1 is true, then m2 = 3.
This is all under BarUpdate()
int m2 = c1 ? 3 : 0;
int m3 = c2 ? 4 : 0;
int m4 = c3 ? 5 : 0;
int m5 = c4 ? 6 : 0;
int m6 = c5 ? 7 : 0;
int m7 = c6 ? 8 : 0;
int m8 = c7 ? 9 : 0;
int m9 = c8 ? 10 : 0;
int m10 = c9 ? 11 : 0;
int m11 = c10 ? 12 : 0;
int max1 = Max(m2, m3);
int max2 = Max(max1, m4);
int max3 = Max(max2, m5);
int max4 = Max(max3, m6);
int max5 = Max(max4, m7);
int max6 = Max(max5, m8);
int max7 = Max(max6, m9);
int max8 = Max(max7, m10);
int max9 = Max(max8, m11);
int maxcondition = max9;
Now, what I want to do is have maxcondition extract the highest value between m1 - m11, by using the max function (max1 - max9).
However, I get the following error:
the name 'max' does not exist in the current context.
The errors are on ints max1- max9
Thanks in advance.
Can you help answer these questions from other members on NexusFi?
I shouted glory too soon. Is all my coding correct?
It doesn't produce any more errors, but it also doesn't draw a trendline.
The trendline when placed in a fresh new indicator under BarUpdate, works fine alone.
However, when I introduce the bools, and ints, and max ints, it does not.