Errors, bugs, questions - page 1778

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Good afternoon!
This is standard behaviour. The countdown starts from the current bar which is under construction. Accordingly, with the appearance of a new bar, in the absence of autoscrolling, its number is incremented by one.
Error during execution as a result of compilation
void OnStart()
{
Print( MACRO( "1\0" )); //равносильно Print( "\"1\\0\"" );
}
Result : 1
Expected: "1\0".
2 errors: Quote marks missing " and misinterpreted \ character
and then
{
Print( MACRO( 1\0 )); //Error: '\' - illegal escape sequence
}
Yes, but you can't explain that to customers, can you?
Imagine that the expert is working, it works, you go to sleep, you go to sleep, you wake up and the expert is not working, why?
It helps to restart with a short delay, something like this:
int count=5;
{while((err!=0)&&(count>0))
{
ResetLastError();
EventSetMillisecondTimer(MSTimerSet); //Установка таймера XXX миллисекунд
err=GetLastError();
Print("EventSetMillisecondTimer n=",count," err >>",err);
{if(err!=0){Sleep(50);}}
}}//while((err!=0)&&(count>0))
It helps to restart with a slight delay, of sorts:
int count=5;
{while((err!=0)&&(count>0))
{
ResetLastError();
EventSetMillisecondTimer(MSTimerSet); //Установка таймера XXX миллисекунд
err=GetLastError();
Print("EventSetMillisecondTimer n=",count," err >>",err);
{if(err!=0){Sleep(50);}}
}}//while((err!=0)&&(count>0))
Execution error
class A { public:
fn a;
};
class B : public A { public:
void a() { Print( __FUNCSIG__ ); }
};
void OnStart()
{
B b;
b.a();
}
Result: invalid function pointer call; execution of B::a() was expected
and here -> compile error
class A { public:
fn a;
};
class B : public A { public:
void a() { Print( __FUNCSIG__ ); }
};
void OnStart()
{
B b;
b.a(); //Error: 'a' - wrong parameters count
}
MT4 is skipping user events in packs. Is this a bug or a bug?
just checked on the dashboard - all is ok, all events are working fine
just checked on the dashboard - all is OK, all events are working as normal
Nothing heavy is running, one chart is open.
What is going on with MT4? Win 10 64, MT4 build 1031
doing so:
{
Print(MarketInfo (Symbol (), MODE_MARGININIT));
Print(MarketInfo (Symbol (), MODE_MARGINMAINTENANCE));
Print(MarketInfo (Symbol (), MODE_MARGINHEDGED));
Print(MarketInfo (Symbol (), MODE_MARGINREQUIRED));
Print(SymbolInfoDouble (Symbol (),SYMBOL_MARGIN_INITIAL));
}
Here are the values obtained from 2 brokers:
2017.01.31 22:15:59.312 Script MarginReq AUDCHF,M15: removed
2017.01.31 22:15:59.310 MarginReq AUDCHF,M15: uninit reason 0
2017.01.31 22:15:59310 MarginReq AUDCHF,M15: 0.0
2017.01.31 22:15:59.310 MarginReq AUDCHF,M15: 1000.0
2017.01.31 22:15:59.310 MarginReq AUDCHF,M15: 100000.0
2017.01.31 22:15:59.310 MarginReq AUDCHF,M15: 0.0
2017.01.31 22:15:59.310 MarginReq AUDCHF,M15: 0.0
2017.01.31 22:15:59.309 MarginReq AUDCHF,M15: initialized
2017.01.31 22:15:59.300 MarginReq AUDCHF,M15 inputs: Input1=0;
2017.01.31 22:15:57.899 Script MarginReq AUDCHF,M15: loaded successfully
2017.01.01.31 22:13:38.077 Script MarginReq AUDCHF,M15: removed
2017.01.31 22:13:38.075 MarginReq AUDCHF,M15: uninit reason 0
2017.01.31 22:13:38.075 MarginReq AUDCHF,M15: 100000.0
2017.01.31 22:13:38.075 MarginReq AUDCHF,M15: 1000.0
2017.01.31 22:13:38.075 MarginReq AUDCHF,M15: 100000.0
2017.01.31 22:13:38.075 MarginReq AUDCHF,M15: 0.0
2017.01.31 22:13:38.075 MarginReq AUDCHF,M15: 100000.0
2017.01.31 22:13:38.075 MarginReq AUDCHF,M15: initialized
2017.01.01.31 22:13:38.066 MarginReq AUDCHF,M15 inputs: Input1=0;
2017.01.31 22:13:36.806 Script MarginReq AUDCHF,M15: loaded successfully
I cannot get an adequate value of margin requirement to open a position. I get the same value for all symbols, different brokers have different values, one shows 0.0 for all symbols, another shows 100000.0.
What is going on with MT4? Win 10 64, MT4 build 1031
doing so:
{
Print(MarketInfo (Symbol (), MODE_MARGININIT));
Print(MarketInfo (Symbol (), MODE_MARGINMAINTENANCE));
Print(MarketInfo (Symbol (), MODE_MARGINHEDGED));
Print(MarketInfo (Symbol (), MODE_MARGINREQUIRED));
Print(SymbolInfoDouble (Symbol (),SYMBOL_MARGIN_INITIAL));
}
Here are the values obtained from 2 brokers:
2017.01.31 22:15:59.312 Script MarginReq AUDCHF,M15: removed
2017.01.31 22:15:59.310 MarginReq AUDCHF,M15: uninit reason 0
2017.01.31 22:15:59310 MarginReq AUDCHF,M15: 0.0
2017.01.31 22:15:59.310 MarginReq AUDCHF,M15: 1000.0
2017.01.31 22:15:59.310 MarginReq AUDCHF,M15: 100000.0
2017.01.31 22:15:59.310 MarginReq AUDCHF,M15: 0.0
2017.01.31 22:15:59.310 MarginReq AUDCHF,M15: 0.0
2017.01.31 22:15:59.309 MarginReq AUDCHF,M15: initialized
2017.01.31 22:15:59.300 MarginReq AUDCHF,M15 inputs: Input1=0;
2017.01.31 22:15:57.899 Script MarginReq AUDCHF,M15: loaded successfully
2017.01.01.31 22:13:38.077 Script MarginReq AUDCHF,M15: removed
2017.01.31 22:13:38.075 MarginReq AUDCHF,M15: uninit reason 0
2017.01.31 22:13:38.075 MarginReq AUDCHF,M15: 100000.0
2017.01.31 22:13:38.075 MarginReq AUDCHF,M15: 1000.0
2017.01.31 22:13:38.075 MarginReq AUDCHF,M15: 100000.0
2017.01.31 22:13:38.075 MarginReq AUDCHF,M15: 0.0
2017.01.31 22:13:38.075 MarginReq AUDCHF,M15: 100000.0
2017.01.31 22:13:38.075 MarginReq AUDCHF,M15: initialized
2017.01.01.31 22:13:38.066 MarginReq AUDCHF,M15 inputs: Input1=0;
2017.01.31 22:13:36.806 Script MarginReq AUDCHF,M15: loaded successfully
try
AccountFreeMarginCheck