在mql之前从c 开始..应该学习多少c ?
Results 1 to 3 of 3

Thread: 在mql之前从c 开始..应该学习多少c ?

  1. #1
    大家好..决定学习编写mql并制作自己的脚本。在阅读了这里后 - 似乎学习mql最好的方法是学习一些c
    首先转到mql ...我已经完成了..

    我的问题是这样的。在转换到mql之前,你认为应该学习多少c ?我需要学习类和构造函数以及所有这些东西吗?或者是ifthen语句传递变量等的基本理解。足够?只是想知道在转移到学习mql之前我需要用c 去多远。

    谢谢所有...

  2. #2

    Quote Originally Posted by ;
    大家好..决定学习编码mql并制作自己的脚本..在阅读了这里之后 - 似乎最好的学习mql的方法是先学习一些c 然后再转到mql上......我哪已经完成了..我的问题是这个..你认为在转换到mql之前应该学习多少c ?我需要学习类和构造函数以及所有这些东西..或者是ifthen的基本理解语句传递变量足够了吗?只是想知道我需要走多远c 才移动到学习mql ..谢谢所有...
    The short answer is none but it depends on your long-term goals and current level of programming experience. MQL4 and MQL5 are domain specific languages. They look like C (many other languages have borrowed the C-style syntax) but MQL has some major differences - primarily due to the differences in goals. C is a general purpose language language it is, as a generalisation, considered to be a superset of C (there are some minor differences). It supports low-level operations direct control of memory alloion, hardware access etc. In contrast MQL is designed to run in the Metatrader Sandbox. It needs to be this way so a malicious programmer can't easily write EA's, indiors or scripts to take control of a traders system etc. MQL is also single threaded e.g. there is only on execution thread available to the entire sandbox for all indiors and EAs being run on all charts. C can be multi-threaded it depends on the platform your working on and the if you want the appliion to be multi-threaded. Threaded appliions can be a nightmare to develop if done poorly. In MQL you cannot directly manipulate memory. The runtime largely takes care of memory management for you (but when you alloe arrays or create pointers you need to explicitly delete them to avoid memory leakage. Noting that pointers in MQL are not like pointers in C or C . Pointers are also very different. In MQL pointers are merely handles that point to objects and once created and only be changed by assigning a new pointer value or via a delete statement In C pointers can be manipulated and create far greater memory leakage issues when you fail to deallocte them from the heap etc. In C you 100% on your own when in comes to memory management. MQL has classes similar to C . The MQL class model does not supporture virtual functions (e.g. creating abstract classes like in Java). The documentation does state this functionality exists but its just doesn't work. multiple inheritance. In C you can inherit from more than one base/ancestor class. In some circumstances this can be a very handing design idiom. operator overloading support is unreliable/nonexistent when using template classes and pointers. Templates functions, methods and class are closer to Java style generics. If you look in the include folder in you MetaEditor you will see there is a hierarchy of Array classes with a root class of CObject. The template system does support the same level type resolution and compile time meta-programming you can achieve with C 's template compiler hence you need a hierarchy of classes rather than just have generic containers like the C standard template library's vector, list, map etc. There are some more subtleties but this should be enough information (probably too much for a beginner - depends on your current level of programming knowledge). So back to the short answer ... if you are new to programming start with MQL. If you've got some experience learn both. Also it is worth learning MQL and a language with good data sciences support e.g. Python, Julia or R. After all if you want to bring programming to bear on your trading then 80% of that work will be data manipulation and visualisation, 19% implementing your analysis and 1% spent on the idea. .

  3. #3
    如果你不打算学习多年,选择其他编码语言C(基本C)有32个关键字,但你可以指望几个好的C编码器在那里。与高级编程语言不同,你必须使用CC 来处理所有事情 - 如果你多年没有这样做,你的结果将只是你期望的结果。使用更高级的编程语言 - 从mql开始然后,也许,如果你仍然认为你需要它,学习CC

發布權限

  • 您不可發布新主題
  • 您不可回复
  • 您不可發布附件
  • 您不可編輯您的帖子
  •  
  • BB代碼是打開的
  • 表情符號是打開的
  • [IMG]代碼是打開的
  • [視頻]代碼是打開的
  • HTML代碼是關閉的
forex-pedia網站使用cookie 文字跟蹤
forex-pedia.com網站使用cookie 文字跟蹤,某些設定已經固定。您可以點擊此處閱讀我們的Cookie使用說明。 請點擊右鍵接受我們的cookies。如果您選擇繼續使用forex-pedia.com網站,我們將認為您接受我們的cookies。