Alerts not showing anywhere

 

Hello

I downloaded few different EAs and ran 'em. All of them use Alerts  @ different points. But not a single message shows up anywhere. I cannot find anything to

change in setting which will fix this. Documentation shows a popup dialogbox. In my terminal, it is not even showing up @ Alert Tab of terminal.

How do I fix this.

 Also, what is the best way to debug an MQL4 code. 

 
  1. Alerts are a pop up. Perhaps the pop up has been moved off screen. Shut the terminal down and delete terminal/config/terminal.ini (you'll loose placement of charts and taskbars, nothing else)
  2. Don't install in /program files* on vista/win7
  3. In the tester, there is no popup, alerts go to the Journal tab with prints
  4. Print statements and if (condition) PauseTest() from my code
 

Hello WhRoeder

Thank you very much!!!

Now I understand why Alerts were not showing up earlier. On my first attempt, I was using some EA in tester and therefore Alert Window was not popping up. 

I did check the Journal Tab on Terminal and I am preety certain that none of the Alerts had shown up there. Will check again.

Did you mean, I should use Print function instead of Alert?

Another thing that I discovered is that Alerts from Indicator also end up in a in .\Log\<yyyymmdd>.log file

I've discovered that once Alert gets recorded, you can neither delete it nor clear it from the terminal or is there some magic function I can call from Init() to clear all past alerts?

For now, I have to keep closing the terminal and reopening it in case I want my alert window cleaned and changes in Indicator source to permeate through.  

In my first indicator, I am attempting something very simple but it is not working correctly. I want to draw a Buy Arrow (UP Arrow ) on Chart below Candle whenever MACD's Signal Crosses above MACD. 

I've attempted all functions that I could find and all of them show zero in Macd Buffer and Signal Buffer.

   for(int i=0; i<limit; i++)

     MacdBuffer[i]=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i)-iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i);

OR

   for(int i=0; i<limit; i++)

MacdBuffer[i] =iMACD(NULL,0,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,1);

 

Also Attempted computing MACD by steps. iMA(...Fast ...) - iMA(Slow) and then iMAOnArray(...Signal)

 

To determine a Cross, I wrote this function

int Cross(int i, double firstArray[], double secondArray[])

{

if ((firstArray[i-1] <= secondArray[i-1]) && (firstArray[i] > secondArray[i]))

 return (Low[i]);

       return (EMPTY_VALUE);

}

Should I use i-1 or i+1. Tried both. Neither works.

 
cdjindia:

Did you mean, I should use Print function instead of Alert?

Another thing that I discovered is that Alerts from Indicator also end up in a in .\Log\<yyyymmdd>.log file 

in the tester both print and alert are identical.

If they were in the log file, then most were in the journal tab (generate them too fast and journal sometimes misses some)

Don't double post