MetaTrader 4 Build 529 beta released with new compiler - page 49

 
Interesting:
And without code how to help?

The code is 200 lines, + it is uncommented at all (I translated function and its reference to OOP rails).

Thought someone has encountered similar (I suspect constructors and destructors myself, I have them both in the base class and in descendants by default (not specified at all))

I'll post the code if i need it, i'll comment it for myself anyway,

But I'll post it tomorrow, I'm going to sleep now.

 

When ShellExecuteA is called from shell32.dll, this message appears:

Could you please call "shell32.dll :: ShellExecuteA, DLL not allowed
Access violation write 0x00000000

I call it like this:

#import "shell32.dll"
int ShellExecuteA(int a0,string a1,string a2,string a3,string a4,int a5);
#import

PS. forgot to enable dll call permission, but if you enable dll call permission, the terminal crashes when you run the tester

 
VOLDEMAR:

Oppa, a voice from the past .... You wouldn't happen to have the first build, would you?

Bild 541 of course.
 
Barbarian:

When ShellExecuteA is called from shell32.dll, this message appears:

Could you please call "shell32.dll :: ShellExecuteA, DLL not allowed
Access violation write 0x00000000

I call it like this:

#import "shell32.dll"
int ShellExecuteA(int a0,string a1,string a2,string a3,string a4,int a5);
#import

PS. forgot to turn on permission to call the dll, but if you turn on permission for the dll then when you run the tester, the terminal crashes


The strings are now unicode.

You need to use the unicode version of the function

#import "shell32.dll"
int ShellExecuteW(int a0,string a1,string a2,string a3,string a4,int a5);
#import

 
ALXIMIKS:

The code is 200 lines, + it is uncommented at all (I translated function and its reference to OOP rails).

Thought someone has encountered similar (I suspect constructors and destructors myself, I have them both in the base class and in descendants by default (not specified at all))

I'll post the code if i need it, i'll comment it for myself anyway,

But I'll post it tomorrow, I'm sleeping tonight.


If there's nothing secret, post the code and steps to reproduce or to servicedesk. Thanks

 
stringo:

The strings are unicode.

You need to use the unicode version of the function

Yeah, it's not that simple, it looks like you still need to write L in front of the string literals.
 
digits:

help me understand why this code compiled on 509 works when called from an EA

in EA, the code is called and handled like this:

but if the code is compiled in ME from build 540 then EA log file writes:

And EA doesn't work correctly or doesn't work at all.


Have you tried in build 541?

Have tried to reproduce based on your sources so far without success. Can you post all sources and details (OS, symbol, broker, installation folder, permissions, etc.) on the servicedesk

 
ALXIMIKS:

Can you tell me the possible cause of the crash))

I made the main calculation function in the indicator through OOP (I've been studying it for a few days now).

All works fine (at 3000 bars calculation speed has increased 2-3 times).

But when I try to run 2 indicators it crashes and everything crashes ......


It's best to go straight to servicedesk with all the sources and a description.
 
void OnStart()
{
//---
//+------------------------------------------------------------------+
//| The script displays information about the tool |
//+------------------------------------------------------------------+
Print("Symbol=",Symbol());
Print("Point size in the quote currency=",MarketInfo(Symbol(),MODE_POINT));
Print("Minimum step of security price change in points=",MarketInfo(Symbol(),MODE_TICKSIZE));
}

LOG:

2013.11.15 12:43:11.716 ttt EURUSD,M1: removed

2013.11.15 12:43:11.716 ttt EURUSD,M1: Minimum step of security price change in points=1e-005.0

2013.11.15 12:43:11.716 ttt EURUSD,M1: Pip size in the quote currency=1e-005.0

2013.11.15 12:43:11.716 ttt EURUSD,M1: Symbol=EURUSD

2013.11.15 12:43:11.707 ttt EURUSD,M1: loaded successfully


 
HIDDEN:
void OnStart()
{
//---
//+------------------------------------------------------------------+
//| The script displays information about the tool |
//+------------------------------------------------------------------+
Print("Symbol=",Symbol());
Print("Point size in the quote currency=",MarketInfo(Symbol(),MODE_POINT));
Print("Minimum step of security price change in points=",MarketInfo(Symbol(),MODE_TICKSIZE));
}

LOG:

2013.11.15 12:43:11.716 ttt EURUSD,M1: removed

2013.11.15 12:43:11.716 ttt EURUSD,M1: Minimum step of symbol price change in points=1e-005.0

2013.11.15 12:43:11.716 ttt EURUSD,M1: Pip size in the quote currency=1e-005.0

2013.11.15 12:43:11.716 ttt EURUSD,M1: Symbol=EURUSD

2013.11.15 12:43:11.707 ttt EURUSD,M1: loaded successfully


Confused by the scientific format of the data output?

1e-005.0 = 0.00001. Five digits, after all.
To print in decimal point representation, use DoubleToStr inside Print or go to new version of Print: PrintFormat.

Reason: