用​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. css3、html5学习笔记

    2016/12/14 ----认真看完绝对对你有帮助 HTML5针对移动端,移动端的浏览器主要是chrome,是webkit内核; app(applicatin):应用; native app:原生的 ...

  2. Android笔记:如何在Fragment里使用findViewById()方法?

    在Activity中,可以直接用findViewById(int id),通过xml的id来找到对应的View. 查找官方的api,具体如下: https://developer.android.go ...

  3. shift

    -------siwuxie095 shift 更改批处理文件中可替换参数的位置 语法: SHIFT [/n] 如果命令扩展被启用,SHIFT 命令支持 /n 命令行开关:该命令行开关告诉 命令从第 ...

  4. C# 通过代理获取url数据

    public static string doPost(string Url, byte[] postData, SinaCookie bCookie, String encodingFormat, ...

  5. ArcMap中地图输出(Options)选项显示不完整

    首先,我开始遇到的时候,认为是高分辨屏幕的问题,所以修改了屏幕的分辨率,结果并没有改变. 然后,认为是对话窗口的显示,修改字体大小,也没有显示完整. 最后,是修改了ArcGIS的注册表才解决.解决方式 ...

  6. 由Struts return SUCCESS引发的基础问题

    该问题的最初来源,是源于Struts中的 return SUCCESS; 和 return "success"; 在Struts的配置文件struts.xml我们可以找到" ...

  7. 无法在Web服务器上启动调试,已附加了一个调试器

    运行环境:开发环境:Windows7旗舰版64bit.VisualStudio2008 With SP1.ArcEngine10.0.NetFrameWork4.0.IIS7和C#开发语言. 问题描述 ...

  8. selenium2(WebDriver)环境搭建

    1.安装jdk并配置环境变量: jdk安装jdk下载地址: http://www.oracle.com/technetwork/java/javase/downloads/index.html环境变量 ...

  9. Robotium-无源码测试

    [总结] 1.新建工程,选择Android Application Project,选择This Project: PS:新建测试工程时报NULL错误,新建一个Android工程,然后再按上诉步骤建立 ...

  10. mysql,实现数据库检索结果添加自增的序号

    select t2.rowno  from( select (@rownum:=@rownum+1) as rowno, t1.id    from news t1 ,(select (@rownum ...