当前位置:网站首页>Mt4/mql4 getting started to proficient in foreign exchange EA automatic trading tutorial - special identification of the K line on the chart
Mt4/mql4 getting started to proficient in foreign exchange EA automatic trading tutorial - special identification of the K line on the chart
2022-06-22 08:02:00 【EA development - green shirt code customer】
EA It can be done to K Line for identification , And output on the icon , In order to facilitate the resumption , Also on EA More intuitive understanding of the implementation of , It can be done to EA Detailed optimization of the entrance and exit of .
The effect is as follows

Custom method SignalBar
void SingalBar(int myBarPos,double myPrice)
{
string TextBarString=Time[myBarPos];
// stay K A sign is displayed above the highest price of the line
switch(Digits()){
case 0:{myPrice=myPrice+55;break;}
case 1:{myPrice=myPrice+5.5;break;}
case 2:{myPrice=myPrice+0.55;break;}
case 3:{myPrice=myPrice+0.055;break;}
case 4:{myPrice=myPrice+0.0055;break;}
case 5:{myPrice=myPrice+0.00055;break;}
}
// Generate a thumbdown logo OBJ_ARROW_THUMB_DOWN
ObjectCreate(TextBarString,OBJ_ARROW_THUMB_DOWN,0,Time[myBarPos],myPrice);
ObjectSetInteger(0,TextBarString,OBJPROP_HIDDEN,true);
ObjectSetInteger(0,TextBarString,OBJPROP_COLOR,Blue);
}
Write a script to execute
//+------------------------------------------------------------------+
//| BarText.mq4 |
//| Copyright 2021, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2021, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
#property strict
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
//---
SingalBar(1,High[1]);
}
//+------------------------------------------------------------------+
void SingalBar(int myBarPos,double myPrice)
{
string TextBarString=Time[myBarPos];
// stay K A sign is displayed above the highest price of the line
switch(Digits()){
case 0:{
myPrice=myPrice+55;break;}
case 1:{
myPrice=myPrice+5.5;break;}
case 2:{
myPrice=myPrice+0.55;break;}
case 3:{
myPrice=myPrice+0.055;break;}
case 4:{
myPrice=myPrice+0.0055;break;}
case 5:{
myPrice=myPrice+0.00055;break;}
}
// Generate a thumbdown logo OBJ_ARROW_THUMB_DOWN
ObjectCreate(TextBarString,OBJ_ARROW_THUMB_DOWN,0,Time[myBarPos],myPrice);
ObjectSetInteger(0,TextBarString,OBJPROP_HIDDEN,true);
ObjectSetInteger(0,TextBarString,OBJPROP_COLOR,Blue);
}
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 .
边栏推荐
- Query where uiwebview is used in the project
- Multiple ways for idea to package jars
- Chmod Chmod command
- [songhongkang MySQL database] [advanced chapter] [07] MySQL storage engine
- Submit values of various inputs of the form
- 模电实验——实验二 JFET共源极放大电路
- Template code overview
- Invalid applet margin right, text overflow?
- Skills required for O & M automation?
- ES6 set data type de duplication of array, intersection, union and difference
猜你喜欢

Some suggestions on Oracle SQL query return optimization

XMIND 2022 mind map active resources?

Upload your own library to pod

Node red sends wechat official account message (template message)

Qt 错误提示1: invalid use of incomplete type ‘***‘

【Oracle 数据库】奶妈式教程 day11 数值函数
![[普通物理]波的能量与干涉](/img/fe/066aa9e8ed776b8f069b59b7123367.png)
[普通物理]波的能量与干涉

Target detection series -- detailed explanation of RCNN principle

Website sharing of program ape -- continuous update

MySQL 8.0 under Linux forgets the password
随机推荐
【Oracle 数据库】奶妈式教程 day12 字符函数
MySQL delete from and subquery as conditions
Upload your own library to pod
[Oracle database] mammy tutorial day13 date function
【 Oracle database】 Nursery Mother Tutorial day13 date Function
Vue page caching problem solving (keep alive + page level routing guard + lifecycle activated)
OSI and tcp/ip
[Oracle database] wet nurse tutorial day15 DDL, DML, index, view, sequence and deadlock are enough
Applet /vant UI to upload files
【Oracle 数据库】奶妈式教程 day14 转换函数
Permission Operation of MySQL
PostgreSQL common commands and SQL -- continuous update
JSON使用示例
Charles uses
Xlua environment configuration
MySQL intercepts the string cs0000_ 1 medium_ Following characters
XMIND 2022 mind map active resources?
Use multithreading to speed up your crawler
Windchill API drops
先锋期货安全么?期货开户都是哪些流程?期货手续费怎么降低?