OpenTrading / OTMql4Lib

Open Trading Metatrader 4 Library
GNU Lesser General Public License v3.0
20 stars 16 forks source link

Documentation #2

Closed MilosMosovsky closed 8 years ago

MilosMosovsky commented 8 years ago

Hello, i am impressed from your library, but i have silly question, it is possible to document all supported ZMQ/or any MQ commands that i can post to library? Currently i spent 4 hours of debugging code and i only managed how to modify order , i dont understand bOTModifyOrder, why prefixes as "j", "b", "gOT", and etc. Can you give little explananation why prefixes and messages? Also mabye it should be better to remap names to something more logical? Metatrader function is OrderModify, why not generalize it like

exec|EURUSD....|0|12345678|bridge|OrderModify|actual args send to original MT4 function. So users dont have to debug whole code how each message works? Thanks a lot for your response.

Or maybe make some include file where are mappings string -> constants, for example

define CMD_ORDER_MODIFY = 'bOTModifyOrder';

OpenTrading commented 8 years ago

Sorry for the delay in replying but I'm tied up on another project.

When I have time, I'll do a wiki for the project, but for the moment, look at the bottom of https://github.com/OpenTrading/OTMql4Py/ which itself is another bug: the formatting is broken. It will give you a little explananation of the prefixes and conventions.

The idea in the Lib code is to wrap the bare Mql4 calls in code that makes them more reliable: looks for error conditions, retries on network errors etc. The prefix of a letter distinguishes the wrapped funtion from the Mql4, and at the same time, indicates the type of the return value. Putting OT in the names is basically a consquence of Mql having one gloabl namespace.

The OTMql4Lib is just a common library from the other projects like OTMql4Py...

OpenTrading commented 8 years ago

Also on the readme page is the same formatting issue: https://github.com/OpenTrading/OTMql4Lib

OpenTrading commented 8 years ago

We've broken the documentation out into a wiki now, and the documentation in the code is getting automatically pulled up into the wiki pages, so things should improve now as the documentation get filled out.

The prefix notation is described in https://github.com/OpenTrading/OTMql4Lib/wiki/DevelopmentStyle