另外编译如下代码出现同样的问题。还望高手指点
void OnStart() { //--- //--- Compiler will generate an error message that is initialized trade_settings my_set={0.0,0.0,5}; } //+------------------------------------------------------------------+ struct trade_settings { double take; // Values of the price fixing profit double stop; // Price value protective stop uchar slippage; // Value of the permissible slip //--- Constructor trade_settings() { take=0.0; stop=0.0; slippage=5; } //--- Destructor ~trade_settings() { Print("Это конец"); } };
这段代码是MQL5帮助中的一个例子。
兄弟,这是帮助文档里面的一个错误示范,表示这样做会出错的。。。
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
问题如下。
编辑如下代码的脚本文件
然后点编译,编辑器就自动退出了。
再打开后,编辑器后就发现代码变。
少了
不知道是我的程序写法不对还是编辑器的问题。
在编译前我保存了文件的。