Hi, I am trying to add three custom breadth code outcomes using the switch function - first variable being = 1 and second = 0. I am not able to create any output for the following script - Custom Code XLEBT - I am trying to add the 3 codes for each sector.
//ADP (I used the Adv Dec Percent breadth function) C1 = XLEADP:Market Breadth; MA1 = MA(C1, BARS=10, STYLE=Exponential, CALC=Close); V1 = CLOSE(MA1) > 30; V2 = CLOSE(MA1) < -30; V3 = SWITCH(V1,V2); //HLP (I used the Adv Dec Percent breadth function) C2 = XLEHLP:Market Breadth V4 = CLOSE(C2) > 10; V5 = CLOSE(C2) < -10; V6 = SWITCH(V4,V5); //%200 ( I used the Percent breadth function) C3 = XLE200:Market Breadth; V7 = CLOSE(C3) > 60; V8 = CLOSE(C3) < 40; V9 = SWITCH(V7,V8); V3 + V6 + V9
I have tried adding 'change to 1" to the switch functions and
I also used “Getdata” function for the “C” variables. I do get values for these individual scripts in watchlists.
Thanks, Jamie