微信登录
注册忘记密码
查看: 1171|回复: 0

[我要爆料] MT5,外汇,人工神经网络,编程,EA,简洁之1.2「MQL5 的语法」

[复制链接]

该用户从未签到

发表于 2022-6-7 17:10:21 | 显示全部楼层 |阅读模式
1.注释 (与c,c++相同)
//--- 单行线注释
/* Multi-
line // 嵌入式单行线注释
comment
*/

2.关键词
数据类型
bool
float
uint
char
int
ulong
class
long
union
color
short
ushort
datetime
string
void
double
struct


enum
uchar



访问分类符
const
private
virtual
delete
protected


override
public



存储类型
extern
input
static

操作符
break
dynamic_cast
operator
case
else
pack
continue
for
return
default
if
sizeof
delete
new
switch
do
offsetof
while

其他
this
#define
#import
true
#ifdef
#include
false
#ifndef
#property
template
#else
group
typename
#endif
namespace

3.标识符
*.长度不能超过63个字节。
*.字符可包括数字0-9、拉丁字母大写A-Z和小写a-z(大小写有区分的)还有下划线(_)。
*.首字符不可以是数字。
*.标识符不能和 保留字冲突。
示例: NAME1 namel Total_5 Paper _05
4.函数
int start()
{
double some_array[4]={0.3, 1.4, 2.5, 3.6};
double a=linfunc(some_array, 10.5, 8);
double a=linfunc(some_array, 10.5); //...
}
double linfunc(double x[], double a, double b=0.1) //带参数函数
{
return (a*x[0] + b);
}

声明:以上内容来源于网络,如有侵权请联系我们(123@shiyan.com)删除!

发表回复

您需要登录后才可以回帖 登录 | 立即注册 微信登录

本版积分规则