Very strange: a line of code does nothing despite not being commented - page 5

 

You don't seem to be understanding. Let me give you an example.

YOU:
Hi guys. I have a really weird issue. One thing prints and the other doesn't. Here's my code:

void OnStart() {
   Print("START");
   Print(GetMoneyFlow(21));
}

double GetMoneyFlow(int periods) {
   Print("WORKING");
}

Why does the second Print not display anything?

HELPERS:
If you want help, we need to see the actual code.

YOU:
That is all my code, honest.

ACTUAL CODE:

void OnStart() {
   Print("START");
   Print(GetMoneyFlow(21));
}

double GetMoneyFlow(int periods) {
   //Print("WORKING");
   double   flowSum     =  0;
   long     volumeSum   =  0;
   string   pair        = Symbol();
   int      timeframe   = Period();
   
   for (int i = 0; i <= periods; i++) {
      long     volume   =  iVolume(pair, timeframe, 0);
      double   high     =  iHigh(pair, timeframe, 0);
      double   low      =  iLow(pair, timeframe, 0);
      double   close    =  iClose(pair, timeframe, 0);
      double   open     =  iOpen(pair, timeframe, 0);
      
      volumeSum   += volume;
      
      if ((high-low) > 0) {
         flowSum  += volume * (((close - low) - (high - close)) / (high - low));
      }
   }
   
   double   moneyFlow   =  flowSum / volumeSum;
   
   return moneyFlow;
}


THEN... you come back and say you found the issue IN YOUR CODE, and STILL you insist all you did was change the names of the functions and that wouldn't make a difference.


Just log off.

 
Frederick Langemark:

You don't seem to be understanding. Let me give you an example.

YOU:
Hi guys. I have a really weird issue. One thing prints and the other doesn't. Here's my code:

Why does the second Print not display anything?

HELPERS:
If you want help, we need to see the actual code.

YOU:
That is all my code, honest.

ACTUAL CODE:


THEN... you come back and say you found the issue IN YOUR CODE, and STILL you insist all you did was change the names of the functions and that wouldn't make a difference.


Just log off.

Don't be silly. :) The problem wasn't my code.
 

Oh really?

Then use the community as intended and share the solution so we may all benefit.

 
Frederick Langemark:

Oh really?

Then use the community as intended and share the solution so we may all benefit.

Pay attention. Read message #22.
mt4ski:

while it's true that there is only one strange() function, there is also a useless duplicate of the library containing the function in another directory that I had completely forgotten about.

 
mt4ski:
Pay attention. Read message #22.

That tells us nothing. I'm done with you. Can not help the helpless.

 
Frederick Langemark:

That tells us nothing. I'm done with you. Can not help the helpless.

You are the helpless person if you need someone to spell it for you. Me I don't need help. My problem is solved. 

 
Frederick Langemark:

You don't seem to be understanding. Let me give you an example.

YOU:
Hi guys. I have a really weird issue. One thing prints and the other doesn't. Here's my code:

Why does the second Print not display anything?

HELPERS:
If you want help, we need to see the actual code.

YOU:
That is all my code, honest.

ACTUAL CODE:


THEN... you come back and say you found the issue IN YOUR CODE, and STILL you insist all you did was change the names of the functions and that wouldn't make a difference.


Just log off.

Haha.Nice one. :)

Reason: