Actually, yes it does support switch/case statements.
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.
The following user says Thank You to Big Mike for this post:
Perhaps I spoke too soon on supporting Switch statements. I will go back and try some more when I get a chance. In my particular case, I was using the following:
In TS, it compiles and works fine. In MC, when I try to compile the indicator, I get the cryptic error:
------ Compiled with error(s): ------
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
causal study: (Function)
When I change the case statement to If..Then, it compiles and works fine.
Also in the MC help file, there is no Switch statement listed - see picture.
So, does MC not like Switch statements using boolean variables? And why do you think it is not listed in the help file (Case is not there either)?