用​m​t​4​平​台​所​提​供​的​m​q​l​4​语​言​编​写​。​风​险​与​利​润​同​在​,​高​风​险​可​博​得​高​利​润​。​自​己​把​握​。​已​经​测​试​通​过​,​下​载​导​入​系​统​即​可。

#property copyright "Copyright ?2008, PUNCHER from POLAND"
#property link "bemowo@tlen.pl"
// 5 or 15 MIN timeframe only extern int RSIPeriod=14;
extern int Short_price_MA_periods=9;
extern int Long_price_MA_periods=45;
extern int Short_RSI_MA_periods=9;
extern int Long_RSI_MA_periods=45;
extern int Slippage=3;
extern int pisto=0; //Stochastic Indicator period
extern int pistok=5; // Stochastic Period(amount of bars) for the calculation of %K line
extern int pistod=3; //Stochastic Averaging period for the calculation of %D line
extern int istslow=3; //Stochastic Value of slowdown
extern int pimacd=0; //Indicator period
extern int fastpimacd=12; //Averaging period for calculation of a quick MA
extern int slowpimacd=26; //Averaging period for calculation of a slow MA
extern int signalpimacd=9; //Averaging period for calculation of a signal line
extern int piwpr=0; //WPR Indicator period
extern int piwprbar=14; //WPR Period (amount of bars) for indicator calculation
extern int pidem=0; //Indicator period
extern int pidemu=14; //Period of averaging
for indicator calculation double Lots=1; // that mean 0.1 value if you want 1 lot type 10
double tp=17; // take profit 获利,止盈
double sl=7777; // stop loss 止损
int start()
{
int arraysize=200;
double RSI[];
double RSI_SMA[];
ArrayResize(RSI,arraysize);
ArrayResize(RSI_SMA,arraysize);
ArraySetAsSeries(RSI,true);

for(int i3=arraysize-1;i3>=0;i3--)
RSI[i3]=iRSI(NULL,0,RSIPeriod,PRICE_CLOSE,i3);
for(i3=arraysize-1;i3>=0;i3--)
RSI_SMA[i3]=iMAOnArray(RSI,0,Short_RSI_MA_periods,0,MODE_SMA,i3);
double RSI9 =RSI_SMA[1];
for(i3=arraysize-1;i3>=0;i3--)
RSI[i3]=iRSI(NULL,0,RSIPeriod,PRICE_CLOSE,i3);
for(i3=arraysize-1;i3>=0;i3--)
RSI_SMA[i3]=iMAOnArray(RSI,0,Long_RSI_MA_periods,0,MODE_SMA,i3);
double RSI45 =RSI_SMA[1];
double Price45=iMA(NULL,0, Long_price_MA_periods ,0,MODE_LWMA,PRICE_CLOSE,1);
double Price9 =iMA(NULL,0, Short_price_MA_periods,0,MODE_SMA,PRICE_CLOSE,1);
bool Long=false;
bool Short=false;
bool Sideways=false; if(Price9>Price45 && RSI9>RSI45) Long=true;
if(Price9<Price45 && RSI9<RSI45) Short=true;
if(Price9>Price45 && RSI9<RSI45) Sideways=true;
if(Price9<Price45 && RSI9>RSI45) Sideways=true;
if(Long==true && OrdersTotal()==0)
{
if(iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_MAIN,1)<19&&iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_MAIN,0)>=19)
{
if(iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_MAIN,1)<iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_SIGNAL,1)&&iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_MAIN,0)>=iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_SIGNAL,0))
{
if(iDeMarker(NULL,pidem,pidemu,1)<0.35&&iDeMarker(NULL,pidem,pidemu,0)>=0.35) { if (iWPR(NULL,piwpr,piwprbar,1)<-81&&iWPR(NULL,piwpr,piwprbar,0)>=-81) {OrderSend(Symbol(),OP_BUY,Lots/10,Ask,Slippage,Ask-sl*Point,Ask+tp*Point,"Piotrek Buy");
}
}
}
}
}

if(Short==true && OrdersTotal()==0)
{ if(iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_MAIN,1)>81&&iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_MAIN,0)<=81)
{ if(iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_MAIN,1)>iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_SIGNAL,1)&&iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_MAIN,0)<=iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_SIGNAL,0))
{
if(iDeMarker(NULL,pidem,pidemu,1)>0.63&&iDeMarker(NULL,pidem,pidemu,0)<=0.63)
{
if (iWPR(NULL,piwpr,piwprbar,1)>-19&&iWPR(NULL,piwpr,piwprbar,0)<=-19) {OrderSend(Symbol(),OP_SELL,Lots/10,Bid,Slippage,Bid+sl*Point,Bid-tp*Point,"Piotrek Sell");}
}
}
}
}
}

 用​m​t​4​平​台​所​提​供​的​m​q​l​4​语​言​编​写​。​风​险​与​利​润​同​在​,​高​风​险​可​博​得​高​利​润​。​自​己​把​握​。​已​经​测​试​通​过​,​下​载​导​入​系​统​即​可。

 #property copyright "Copyright ?2008, PUNCHER from POLAND"
#property link "bemowo@tlen.pl"
// 5 or 15 MIN timeframe only extern int RSIPeriod=14;
extern int Short_price_MA_periods=9;
extern int Long_price_MA_periods=45;
extern int Short_RSI_MA_periods=9;
extern int Long_RSI_MA_periods=45;
extern int Slippage=3;
extern int pisto=0; //Stochastic Indicator period
extern int pistok=5; // Stochastic Period(amount of bars) for the calculation of %K line
extern int pistod=3; //Stochastic Averaging period for the calculation of %D line
extern int istslow=3; //Stochastic Value of slowdown
extern int pimacd=0; //Indicator period
extern int fastpimacd=12; //Averaging period for calculation of a quick MA
extern int slowpimacd=26; //Averaging period for calculation of a slow MA
extern int signalpimacd=9; //Averaging period for calculation of a signal line
extern int piwpr=0; //WPR Indicator period
extern int piwprbar=14; //WPR Period (amount of bars) for indicator calculation
extern int pidem=0; //Indicator period
extern int pidemu=14; //Period of averaging
for indicator calculation double Lots=1; // that mean 0.1 value if you want 1 lot type 10
double tp=17; // take profit 获利,止盈
double sl=7777; // stop loss 止损
int start()
{
int arraysize=200;
double RSI[];
double RSI_SMA[];
ArrayResize(RSI,arraysize);
ArrayResize(RSI_SMA,arraysize);
ArraySetAsSeries(RSI,true); for(int i3=arraysize-1;i3>=0;i3--)
RSI[i3]=iRSI(NULL,0,RSIPeriod,PRICE_CLOSE,i3);
for(i3=arraysize-1;i3>=0;i3--)
RSI_SMA[i3]=iMAOnArray(RSI,0,Short_RSI_MA_periods,0,MODE_SMA,i3);
double RSI9 =RSI_SMA[1];
for(i3=arraysize-1;i3>=0;i3--)
RSI[i3]=iRSI(NULL,0,RSIPeriod,PRICE_CLOSE,i3);
for(i3=arraysize-1;i3>=0;i3--)
RSI_SMA[i3]=iMAOnArray(RSI,0,Long_RSI_MA_periods,0,MODE_SMA,i3);
double RSI45 =RSI_SMA[1];
double Price45=iMA(NULL,0, Long_price_MA_periods ,0,MODE_LWMA,PRICE_CLOSE,1);
double Price9 =iMA(NULL,0, Short_price_MA_periods,0,MODE_SMA,PRICE_CLOSE,1);
bool Long=false;
bool Short=false;
bool Sideways=false; if(Price9>Price45 && RSI9>RSI45) Long=true;
if(Price9<Price45 && RSI9<RSI45) Short=true;
if(Price9>Price45 && RSI9<RSI45) Sideways=true;
if(Price9<Price45 && RSI9>RSI45) Sideways=true;
if(Long==true && OrdersTotal()==0)
{
if(iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_MAIN,1)<19&&iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_MAIN,0)>=19)
{
if(iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_MAIN,1)<iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_SIGNAL,1)&&iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_MAIN,0)>=iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_SIGNAL,0))
{
if(iDeMarker(NULL,pidem,pidemu,1)<0.35&&iDeMarker(NULL,pidem,pidemu,0)>=0.35) { if (iWPR(NULL,piwpr,piwprbar,1)<-81&&iWPR(NULL,piwpr,piwprbar,0)>=-81) {OrderSend(Symbol(),OP_BUY,Lots/10,Ask,Slippage,Ask-sl*Point,Ask+tp*Point,"Piotrek Buy");
}
}
}
}
} if(Short==true && OrdersTotal()==0)
{ if(iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_MAIN,1)>81&&iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_MAIN,0)<=81)
{ if(iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_MAIN,1)>iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_SIGNAL,1)&&iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_MAIN,0)<=iStochastic(NULL,pisto,pistok,pistod,istslow,MODE_EMA,0,MODE_SIGNAL,0))
{
if(iDeMarker(NULL,pidem,pidemu,1)>0.63&&iDeMarker(NULL,pidem,pidemu,0)<=0.63)
{
if (iWPR(NULL,piwpr,piwprbar,1)>-19&&iWPR(NULL,piwpr,piwprbar,0)<=-19) {OrderSend(Symbol(),OP_SELL,Lots/10,Bid,Slippage,Bid+sl*Point,Bid-tp*Point,"Piotrek Sell");}
}
}
}
}
}

MQL4程序:一个号称成功率100%的EA程序 .mq4的更多相关文章

  1. (1)风色从零单排《C++ Primer》 一个简单的c++程序

    从零单排<C++ Primer> --(1)一个简单的c++程序 本次学习收获 0.写在前面 风色以前上过C++的课程,然而当时并没有认真去学,基本不能使用c++来作项目开发. 这次又一次 ...

  2. BCB一个问过100遍啊100遍的问题

    一个问过100遍啊100遍的问题作者: ---------- ,如转载请保证本文档的完整性,并注明出处.欢迎光临 C++ Builder 研究, http://www.ccrun.com/doc/go ...

  3. Python3学习之路~8.6 开发一个支持多用户在线的FTP程序-代码实现

    作业: 开发一个支持多用户在线的FTP程序 要求: 用户加密认证 允许同时多用户登录 每个用户有自己的家目录 ,且只能访问自己的家目录 对用户进行磁盘配额,每个用户的可用空间不同 允许用户在ftp s ...

  4. 1   开发一个注重性能的JDBC应用程序不是一件容易的事. 当你的代码运行很慢的时候JDBC驱动程序并不会抛出异常告诉你。   本系列的性能提示将为改善JDBC应用程序的性能介绍一些基本的指导原则,这其中的原则已经被许多现有的JDBC应用程序编译运行并验证过。 这些指导原则包括:    正确的使用数据库MetaData方法    只获取需要的数据    选用最佳性能的功能    管理连

    1 开发一个注重性能的JDBC应用程序不是一件容易的事. 当你的代码运行很慢的时候JDBC驱动程序并不会抛出异常告诉你. 本系列的性能提示将为改善JDBC应用程序的性能介绍一些基本的指导原则,这其中的 ...

  5. Facebook再现丑闻,约100位应用程序开发人员偷看用户数据

    Facebook今天披露了另一起安全事件,承认大约100名应用程序开发人员可能不正确地访问了某些Facebook组中的用户数据,包括他们的姓名和个人资料图片. 在周二发布的博客文章中,Facebook ...

  6. Scheme语言实例入门--怎样写一个“新型冠状病毒感染风险检测程序”

    小学生都能用的编程语言 2020的春季中小学受疫情影响,一直还没有开学,孩子宅在家说想做一个学校要求的研究项目,我就说你做一个怎么样通过编程来学习数学的小项目吧,用最简单的计算机语言来解决小学数学问题 ...

  7. 空闲时间研究一个小功能:winform桌面程序如何实现动态更换桌面图标

    今天休息在家,由于天气热再加上疫情原因,就在家里呆着,空闲时想着,在很早以前(约3年前),产品人员跟我提了一个需求,那就是winform桌面程序的图标能否根据节日动态更换,这种需求在移动APP上还是比 ...

  8. 搭建QQ聊天通信的程序:(1)基于 networkcomms.net 创建一个WPF聊天客户端服务器应用程序 (1)

    搭建QQ聊天通信的程序:(1)基于 networkcomms.net 创建一个WPF聊天客户端服务器应用程序 原文地址(英文):http://www.networkcomms.net/creating ...

  9. 一个简单的c# 贪吃蛇程序

    一个简单的c#贪吃蛇程序 程序分为界面设计和程序设计:界面设计和程序设计均参考了一些游戏实例,但是所有代码内容是本人编写. 由于看到别人写的程序并没有署名,这里的署名全部都是csdn官网. 游戏界面设 ...

随机推荐

  1. 图解直方图均衡化及其Python实现

    在理解直方图均衡化的过程中,参考了一些书籍和博客,让人困惑的是,笔者对于直方图的理解还是停留在表面,并没有深入理解其内涵.因此,本文拟结合图片对直方图的概念进行阐述,并给出其Python实现,最后对她 ...

  2. CSS3 结构伪类选择器 详解

    1 CSS3 结构伪类选择器 1.E:root 匹配E元素所在的根元素 即:html 2. E:nth-child(n) (1)匹配E元素的父元素中第n个子元素,(2)且该位置的子元素类型必须是E类型 ...

  3. I/O流——其他流

    其他流 一.ObjectInputStream/ObjectOutputStream ① ObjectInputStream和ObjectOutputStream分别与FileInputStream和 ...

  4. Matrix Calculator

    表达式分析+矩阵+计算器+寄存器=矩阵计算器 怎么想起来搞这个呢.. //刚看龙书兴致勃勃要搞表达式分析 这个寄存器比较简陋,26字母+4缓存,//字母不分大小写 当然,不只能算矩阵,还能算数= = ...

  5. Unity开发心路历程——制作画板

    有人说 编程是份很无聊的工作 因为整个工作时间面对的都是电脑这种机器 因为眼睛盯着的内容都是索然无味的代码 因为总是会有意想不到的bug让你怀疑自己的智商 而我认为 编程是件及其有意思的事情 可观的收 ...

  6. c程序中出现segment error 和 bus error 的原因

    在c程序中,经常会遇到段错误(segment error)和总线错误(bus error),这两种问题出现的原因可能如下 段错误: 对一个NULL指针解引用. 访问程序进程以外的内存空间. 实际上,第 ...

  7. flask文件的上传和下载

    from werkzeug.utils import secure_filename from flask import Flask,render_template,jsonify,request i ...

  8. 第九周PSP

     工作周期:11.10-11.17 本周PSP: C类型 C内容 S开始时间 ST结束时间 I中断时间 T净时间(分) 文档 写随笔(PSP) 19:00min 22:00min 30min 90mi ...

  9. linux driver编译环境搭建和命令

    首先将ubuntu14.04的内核升级到内核3.18.12. 其次,Ubuntu14.04上驱动编译命令 $ sudo make -C ~/linux-3.18.12/ M=`pwd` modules ...

  10. sql server 按分组拼接数据

    SELECT B.id , LEFT(tempname, LEN(tempname) - 1) AS name FROM ( SELECT id , ( SELECT name + ',' FROM ...