Function CASE...WHEN

Questions about MultiCharts and user contributed studies.
tradingest
Posts: 283
Joined: 05 Dec 2014
Location: Italy
Has thanked: 53 times
Been thanked: 3 times

Function CASE...WHEN

Postby tradingest » 28 Dec 2016

Hi all,

in easylanguage code as I can make the function CASE...WHEN if I have more cases?

thanks

User avatar
siscop
Posts: 197
Joined: 09 Jan 2011
Has thanked: 34 times
Been thanked: 29 times

Re: Function CASE...WHEN

Postby siscop » 28 Dec 2016

https://www.TS.com/~/media/Fi ... s_Ref.ashx

Page 1089

Example
Switch(Value1)
Begin
Case 1 to 5:
Value2 = Value2 + 1;
Case 10, 20, 30:
Value3 = Highest(High,10);
Case is > 40:
Value3 = Value3 + 1;
Default:
Value5 = Value5 + 1;
End;
HTH

Edit:
I just realized that the link does not work. So here is link to MC site
https://www.multicharts.com/trading-sof ... php/Switch


Return to “MultiCharts”