This forum is now read-only. You can discuss you questions on Forums of MQL4.community and MQL5.community
Why does MessageBox work in script but fail in indicator?Back to topics list |
|
user48aec42716e7b
2005.07.24 16:06
I just added a simple line
MessageBox("Nice Day!","Hello"); seperately in a blank script and a blank indicator. After running the script and indicator, I found a message box popped out in script but nothing happened in indicator. Could anybody tell me the reason? Many thanks!! |
4464 |
Slawa
2005.07.25 12:52
expose please whole source
|
|
user48aec42716e7b
2005.07.25 13:01
script file:
//+------------------------------------------------------------------+
//| tempscript.mq4 |
//| Copyright ?2005, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2005, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
int start()
{
MessageBox("Nice Day!","Hello");
return(0);
}
//+------------------------------------------------------------------+
//| tempindicator.mq4 |
//| Copyright ?2005, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2005, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
#property indicator_chart_window
int init()
{
return(0);
}
int deinit()
{
return(0);
}
int start()
{
int counted_bars=IndicatorCounted();
MessageBox("Nice Day!","Hello");
return(0);
}
|
4464 |
Slawa
2005.07.25 14:03
MessageBox in the custom indicator stops interface thread therefore this function is not allowed in the custom indicator. see GetLastError()
|
|
user48aec42716e7b
2005.07.25 15:22
thanks a lot!
|
