当前位置:网站首页>Mt4/mql4 getting started to mastering EA tutorial lesson 5 - common functions of MQL language (V) - common functions of account information
Mt4/mql4 getting started to mastering EA tutorial lesson 5 - common functions of MQL language (V) - common functions of account information
2022-06-22 08:01:00 【EA development - green shirt code customer】
bool IsConnected();
Check whether the connection between the client and the server is normal
The script instance
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
if(!IsConnected())
{
Print(" The connection fails !");
}
else Print(" The connection is normal !");
}
Running results 
Manually disconnect , To run a 
Show connection failure 
This function is used to check whether the network connection is normal , Whether the server is disconnected
bool IsDemo();
This function is used to detect whether the account is simulated
void OnStart()
{
if(IsDemo()) Print(" This is a mock account !");
else Print(" This is not a simulated account !");
}
Running results 
bool IsExpertEnabled();
This function is used to detect whether automatic transaction is allowed ;
The script instance
void OnStart()
{
if(IsExpertEnabled()) Print(" Allow automatic transactions !");
else Print(" Automatic transactions are not allowed !");
}
Turn off automatic transactions 
Run the script 
Turn on automatic transaction , Run the script 

A good workman does his work well , You must sharpen your tools first , The most important thing in trading is to follow the rules , Strictly carry out . Official account , Study MQL Beginner to master EA course , Learn more EA Programming , Write your own EA, Forge your own magic weapon .
边栏推荐
- Difference between ID instancetype nsobject *
- Use of keepalived high availability cluster
- Characteristics of industrial Internet
- User defined pop-up use
- Lookup encapsulation of unity monobehavior component
- What is distributed transaction
- 什么是分布式事务
- .net core 技术栈 网站收集
- OSI and tcp/ip
- Note pad replaces all contents after a character in all lines
猜你喜欢

【宋红康 MySQL数据库 】【高级篇】【07】MySQL的存储引擎

MySQL 8.0 under Linux forgets the password

模電實驗——實驗二 JFET共源極放大電路

什么是分布式事务

lr 2022超详细安装教程「最新」

Model electricity experiment -- Experiment 1 transistor common emitter single transistor amplifier

MySQL view

Invalid applet margin right, text overflow?

Node red sends wechat official account message (template message)

QT 自定义组合控件(类提升功能)
随机推荐
AutoCAD 2020.3 Chinese Version (old version)
先锋期货安全么?期货开户都是哪些流程?期货手续费怎么降低?
代码覆盖率测试对编程小白的意义及其使用方法
Why redis is so fast:
Lookup encapsulation of unity monobehavior component
模板代码概述
Toyota bz4x canceled the launch conference. Even if the low-temperature charging problem does not exist, how about the product strength?
Maptalks: basic operation and wms/wmts map service loading
Blob format problems involved in image uploading
关于菲涅尔现象
【Oracle 数据库】奶妈式教程 day14 转换函数
[songhongkang MySQL database] [advanced chapter] [06] logical architecture of MySQL
ConfigManager JsonToObject
【宋红康 MySQL数据库 】【高级篇】【07】MySQL的存储引擎
[common template problems in graph theory] four shortest path solutions and two minimum spanning tree solutions
Kubernetes practice
什么是分布式事务
OSI and tcp/ip
ES6 set data type de duplication of array, intersection, union and difference
Asynchronous sending and receiving of message passing based concurrent programming (MPI)