The new MQL4 syntax - page 2

 
Ovo:

How to distinguish the new syntax?

I feel I need a different word for referencing the "upcoming" syntax and the "original" syntax. It seems that MQ do not care about official names and keep pretending they are compatible.

So it looks like we have to find appropriate names ourselves. Any suggestions? MQL4 V2, OMQL4 (i.e.Object-), MQL4.1 ...?

I don't understand what is your actual problem ?
 
My problem is we have actually 2 different script languages with the same name.
 
Ovo:

How to distinguish the new syntax?

I feel I need a different word for referencing the "upcoming" syntax and the "original" syntax. It seems that MQ do not care about official names and keep pretending they are compatible.

So it looks like we have to find appropriate names ourselves. Any suggestions? MQL4 V2, OMQL4 (i.e.Object-), MQL4.1 ...?

I would suggest mql4.5 but in reality it's probably mql4.99
 
RaptorUK:
I would suggest mql4.5 but in reality it's probably mql4.99


Lol, you are right. It is much more closer to the MQL5 than MQL4, but integration of the new with the old made it pretty messy.

I understand that by 4.5 you mean four and a half, but unfortunately it looks similar to versioning, where 4.4 should exist if 4.5 is referenced. So... 4+ ?

 
Ovo:


Lol, you are right. It is much more closer to the MQL5 than MQL4, but integration of the new with the old made it pretty messy.

I think you are being far too polite . . . Cluster Flop springs to mind . . .

Ovo:

I understand that by 4.5 you mean four and a half, but unfortunately it looks similar to versioning, where 4.4 should exist if 4.5 is referenced. So... 4+ ?

mql4+ or mql4n for new . . . it doesn't really matter, as long as most people understands what is meant. I don't have an axe to grind . . . lets start a Poll . . . oh we can't, can only do Polls on the mql5 forum . . . wonder how long it will be before MT4 is scheduled to be ditched because . . . "it's easy to port mql4+ to mql5"
 

I have been playing a bit with functions, that have both MQL4 and MQL5 implementation listed in the help file, like MarketInfo(), Account...(), iCustom()

I realized, that those originating in MQL5, were mostly not yet implemented. At least they were not supported by the editor nor the compiler. So at this time only MQL4 are fully available (though I do not say bugfree).

PS. As a newbie to the MQL5 syntax I was stunned by a design of the custom indicator call; a coder must create objects, put them into an array and pass them to the function as parameter, while the function returns .... surprisingly a handle to something. Rather unfortunate design. When using objects then I expect returning an object, or do not bother with objects at all. Luckily this command does not work yet either.

 

Anyone tried using #property icon ? The docs say to specify a path to a folder in the main MT4 directory.

The compiler keeps erroring when I specify a path to the folder i want to use, it keeps saying it is trying to open the icon in a different folder in the virtual store.

In the end I put the icon in the folder it says in the error ( the experts folder in the virtual store) and I did not specify a path, I used #property icon "myicon.ico"

it works like that but I dont want my icons all in the same folder with the experts I want to specify a folder like it says in the docs but it's not letting me do that.

I tried the images folder in the virtual store but it gives that same error it only wants to let me use the virtual store\experts folder and without a path specified.

Also in case anyone needs to create icons, I found a neat online conversion app it creates icons from image files.

 
SDC:

Anyone tried using #property icon ? The docs say to specify a path to a folder in the main MT4 directory.

Here ? terminal_data_directory\MQL4\Files

I think your files have to be within the terminal_data_directory\MQL4\ folder structure.
 

The compiler errors when I put the path to the icon in the terminal_data_directory, the error says cannot open file in a virtual store folder even though I did not specify a folder in the virtual store. I specify a folder in the terminal_data_directory.

The only way I could get it to work was to put the file in the same folder as the source code and not specify a path at all, just #property icon "MyIcon.ico"

 
SDC:

The compiler errors when I put the path to the icon in the terminal_data_directory, the error says cannot open file in a virtual store folder even though I did not specify a folder in the virtual store. I specify a folder in the terminal_data_directory.

The only way I could get it to work was to put the file in the same folder as the source code and not specify a path at all, just #property icon "MyIcon.ico"

It worked for me but I was using the /portable switch, perhaps that was the difference. I guess you are using UAC so I think you need to place your file in the virtual store not directly within the terminal_data_directory\MQL4\ folder structure.
Reason: