Gamestudio Links
Zorro Links
Newest Posts
nba2king Latest Roster Update Breakdown
by joenxxx. 10/14/25 06:06
Help!
by VoroneTZ. 10/14/25 05:04
Zorro 2.70
by jcl. 10/13/25 09:01
ZorroGPT
by TipmyPip. 10/12/25 13:58
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 10/11/25 18:45
Reality Check results on my strategy
by dBc. 10/11/25 06:15
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 9,184 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
joenxxx, Jota, krishna, DrissB, James168
19170 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
If / Then on Current CCI(20) #482767
03/26/21 17:17
03/26/21 17:17
Joined: Mar 2021
Posts: 4
Metzenovich Offline OP
Guest
Metzenovich  Offline OP
Guest

Joined: Mar 2021
Posts: 4
Hi,

I'm trying to take different actions based on the current CCI(20).

Code
vars CCIs = series(CCI(20));
if(CCIs[0] >= 0.0){
plot("CCI", 150, SQUARE, GREEN);
}else{
plot("CCI", 150, SQUARE, RED);
}


But all of the squares are red, regardless of the CCI.

I tried this as well, with the same result:
Code
if(CCI(20) >= 0.0){


I'm expecting some of the squares to be red and some to be green, based on the CCI(20) at the time.

If I print out the value it looks like I expect, some above 0, some below:
Code
printf("\nCCI: %.4f", CCI(20));


I'm sure I'm just missing something simple...

Thanks!

Re: If / Then on Current CCI(20) [Re: Metzenovich] #482768
03/26/21 18:15
03/26/21 18:15
Joined: Jul 2000
Posts: 28,028
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,028
Frankfurt
Yes. Name the plots "CCIRED" and "CCIGREEN". Otherwise the red will be angry at the green when it has the same name.

Re: If / Then on Current CCI(20) [Re: jcl] #482769
03/26/21 20:23
03/26/21 20:23
Joined: Mar 2021
Posts: 4
Metzenovich Offline OP
Guest
Metzenovich  Offline OP
Guest

Joined: Mar 2021
Posts: 4
Thanks! I knew the type (SQUARE, DOT, etc) couldn't be changed within a given plot name, but didn't realize that applied to the color as well.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1