用​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. socket选项总结(setsocketopt)

    功能描述:        获取或者设置与某个套接字关联的选 项.选项可能存在于多层协议中,它们总会出现在最上面的套接字层.当操作套接字选项时,选项位于的层和选项的名称必须给出.为了操作套接字层的选项, ...

  2. Aspen 安装

    按原安装后破解不成功后: 从下载文件夹中,找到 AspenONEV8.\Patch\-STRGXI2.zip,里面有个 STRGXI2.dll,将该文 件复制到: C:\Program Files(x ...

  3. R随笔(2)

    1,查看R中的变量模式(对象的数据类型)mode() 2,因子(factor),  table()可以获取多个因子的交叉表,可以知道每个因子出现的次数 > g<-c("f&quo ...

  4. Redis(二) 扩展

    事务multi ... exec  之间的操作先进入等待队列,到exec时一起执行                事物的所有操作结果都是一起返回的,所以前一条指令的结果无法作为后一条指令的参数     ...

  5. XML中特殊字符转义

    /// <summary> /// 特殊字符转义 /// </summary> /// <param name="xml"></param ...

  6. CSS中定位机制的想法

    对于一个刚刚接触css的新手而言,CSS的定位机制可能是最让人头疼的一件事情了, 接下来我们了解一下CSS的定位机制. position:static | relative | absolute | ...

  7. xcode如何将系统语言改为中文,可修改拍照界面retake和use按钮

    配置项目本地化支持简体中文和英文 工程-PROJECT-info->Localizations,点"+",选择(Chinese(Simplified))添加简体中文,英文Xc ...

  8. Oracle:ORA-00955: name is already used by an existing object

    下午从生产库导出了一份表结构,用来测试一些问题,由于生产库连接着其他用户下的表所以通过视图在本地模拟一下,于是创建视图: create or replace view csews as select ...

  9. java获取classpath

    public class PathTest { public static void main(String[] args) { //获取根路径三种方式 System.out.println(Path ...

  10. linux操作系统-脚本入门

    背景:在使用linux时,经常会写一些linux命令片段,比较麻烦,有经验的程序员会把 这些碎片式的命令写成shell脚本 1.重启tomcat脚本 #!/bin/sh #kill tomcat pi ...