Hacker News new | ask | show | jobs
by apstuff 6396 days ago
boolean TraderAnxiety(boolean mktStatus) {

  if (mktStatus == FALLING) {
    Sell();
    return true;
  }

  if (mktStatus == SURGING) {
    Buy();
    return true;
  }

  if (mktStatus == FEAR) {
    Loathing();
    return true;
  }

  if (mktStatus == OVERMYHEAD) {
    UseProfanity();
    return true;
  }


  return true;
1 comments

Your `boolean` has 4 values?

Most languages I am familiar with require booleans to be either TRUE or FALSE, although I have met a few where undefined or NULL are possible values.

Yes, there are four boolean values, at least electrically: zero, low, grey, high.
It returns true in all 4 cases.
mktStatus is always true and he defined 4 values for it?

:P

That is the wall street boolean, what do you expect?