Improperly formatted code removed by moderator. Please EDIT your post and use the CODE button (Alt-S) when inserting code.
Hover your mouse over your post and select "edit" ...
- Why are you trying to change it in OnCalculate? MA_Period is constant. That belongs in OnInit.
- If you don't break from a case, it steps down into the next one.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi
Im working on an ema ribbon indicator, wich would simply change the color of each ema, according to what the user types in as input. For example if the ema period is 5, it would change to dark violet, when its 20, it would change to blue, etc. It would be true to every ema
I tried this with switch operator but its acting strange :(
Can anyone help me out? Btw its my very first code so im not really an expert yet.
I post here my code, i simplified it to 1 ema. I deleted the default row from the switch operator because that would make me no matter what i set, the color would be the same as defined in the default row...
Thanks in advance!