那位能帮我写两个EA(一个是做多,一个是做空)
[localimg=300,246]1[/localimg]那位能帮我写两个EA(一个是做多,一个是做空)
一个 : 是做多 止赢50点 止损300点 (止赢50点或者和下面那根线线交叉出单)一个货币 就做一单,等成功出单,才可继续做下一单;
一个 : 是做空 止赢50点 止损300点 (止赢50点或者和上面那根线线交叉出单)一个货币 就做一单,等成功出单,才可继续做下一单;
价格 和指标线 形成十字形,交叉了,才下单;止赢50点或者和上,下面那根线线交叉出单)
指标是 经典的波浪指标.mq4;是一个相当简单的指标,但我觉得相当有价值,所以请那位高人有空帮我写一个这个EA 谢谢!
代码如下:
//+------------------------------------------------------------------+
//| A WolfWave finder based on ZIGZAG.MQ4 |
//| fukinagashi a t gmx p o i n t net
//| Patched by Nen @ http://onix-trade.net/forum/index.php?showtopic=373
//| Patched again by Maumax |
//+------------------------------------------------------------------+
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Yellow
#property indicator_color2 DodgerBlue
#define MaxAnalyze 200
#define UpperDistance 15
#define LowerDistance 5
#define Title "WW"
//---- indicator parameters
extern int ExtDepth=28;//12
extern int ExtDeviation=1;//3
extern int ExtBackstep=1;//2
//---- indicator buffers
double ExtMapBuffer;
double ExtMapBuffer2;
int timeFirstBar=0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
IndicatorBuffers(2);
//---- drawing settings
SetIndexStyle(0,DRAW_SECTION);
//---- indicator buffers mapping
SetIndexBuffer(0,ExtMapBuffer);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexEmptyValue(0,0.0);
SetIndexEmptyValue(1,0.0);
ArraySetAsSeries(ExtMapBuffer,true);
ArraySetAsSeries(ExtMapBuffer2,true);
//---- indicator short name
IndicatorShortName("WolfWave");
//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
for (int i=1;i<=5;i++)
{
ObjectDelete(Title + ""+i);
}
ObjectDelete(Title + "Line-2-4");
ObjectDelete(Title + "Line-1-3");
ObjectDelete(Title + "Line-1-4");
ObjectDelete(Title + "Line-2-5");
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
int shift, back,lasthighpos,lastlowpos;
double val,res;
double curlow,curhigh,lasthigh,lastlow;
int num=0;
int Peak[MaxAnalyze],h,i,j;
int Wolf[6];
string WolfWave="None";
double Winkel1, Winkel2;
bool found=false;
//----+ 镳钼屦赅 觐腓麇耱忄 徉痤?磬 漕耱囹铟眍耱?潆12345.gif复件 经典的波浪指标.mq4.rar