[MT4-EA]4Stochs EA for MetaTrader 4
//+------------------------------------------------------------------+
//| 4Stochs EA for MetaTrader 4 |
//| version 0.1 |
//| Copyright 2008 Forex-Factory |
//| Strategy first published by David (ljyljl5555) |
//| EA Conversion by Azmel Ainul |
//+------------------------------------------------------------------+
extern int Magic = 775769;
extern double LotSize = 0.01;
extern int TP = 10;
extern int SL = 10;
extern string LongComment = "4Stochs Long";
extern string ShortComment = "4Stochs Short";
double S1M;
double S1S;
double S2M;
double S2S;
double S3M;
double S3S;
double S4M;
double S4S;
string Signal;
string Status;
double ticket;
double slippage=5;
int init()
{
S1M=iStochastic(NULL,PERIOD_M5,5,3,3,MODE_SMA,0,MODE_MAIN,0);
S1S=iStochastic(NULL,PERIOD_M5,5,3,3,MODE_SMA,0,MODE_SIGNAL,0);
S2M=iStochastic(NULL,PERIOD_M30,5,3,3,MODE_SMA,0,MODE_MAIN,0);
S2S=iStochastic(NULL,PERIOD_M30,5,3,3,MODE_SMA,0,MODE_SIGNAL,0);
S3M=iStochastic(NULL,PERIOD_H1,5,3,3,MODE_SMA,0,MODE_MAIN,0);
S3S=iStochastic(NULL,PERIOD_H1,5,3,3,MODE_SMA,0,MODE_SIGNAL,0);
S4M=iStochastic(NULL,PERIOD_H1,14,3,3,MODE_SMA,0,MODE_MAIN,0);
S4S=iStochastic(NULL,PERIOD_H1,14,3,3,MODE_SMA,0,MODE_SIGNAL,0);
Signal="NONE";
Status="READY";
if(S1M>S1S && S2M>S2S && S3M>S3S && S4M>S4S)
{
Signal="LONG";
Status="SHORT ACTIVE";
}
if(S1MS1S && S2M>S2S && S3M>S3S && S4M>S4S)
{
Signal="LONG";
}
if(S1M-1)
{
Status="LONG ACTIVE";
}
}
if(Status=="READY" && Signal=="SHORT")
{
ticket=OrderSend(Symbol(),OP_SELL,LotSize,Bid,slippage,Bid+SL*Point,Bid-TP*Point,ShortComment,Magic,0,Red);
if(ticket>-1)
{
Status="SHORT ACTIVE";
}
}
if(Status=="LONG ACTIVE" && (Signal=="NONE" || Signal=="SHORT"))
{
Status="READY";
}
if(Status=="SHORT ACTIVE" && (Signal=="NONE" || Signal=="LONG"))
{
Status="READY";
}
return(0);
}
发表于:2015-09-14 15:01只看该作者
2楼
看不懂啊~~~
韬客社区www.talkfx.co
发表于:2015-09-26 02:22只看该作者
3楼
這要怎麼用
韬客社区www.talkfx.co
发表于:2016-09-09 07:18只看该作者
5楼
如何使用呢
韬客社区www.talkfx.co
发表于:2016-09-09 10:23只看该作者
6楼
感謝大大樓主分享(^^)
韬客社区www.talkfx.co
发表于:2016-09-09 14:43只看该作者
7楼
看看而已,只为通宝。。。。。。
韬客社区www.talkfx.co
发表于:2016-09-27 04:56只看该作者
8楼
欠通寶啊~~~想下載試看看
韬客社区www.talkfx.co
发表于:2017-01-10 07:37只看该作者
11楼
weitongbnao
韬客社区www.talkfx.co
发表于:2017-01-12 05:57只看该作者
12楼
不会用
韬客社区www.talkfx.co