[存档!]任何菜鸟问题,为了不给论坛添乱。专业人士,不要与它擦肩而过。没有你,哪里都不能去 - 2. - 页 158

 

让我们一起做一个。你有什么进展吗? 我还有一个挥手指示器,显示它的方向--你需要它吗?
 
主题中有人写到账户的利润率。
附加的文件:
 
谁的权力指数 是条形图?
 
todem:

比方说

if (d1!=0) {OrdOpen(0,OP_BUY,flot,MG);}

谢谢你,我试过类似的方法。我已经试过了,但不幸的是,它并不奏效。

尝试用这个指标做一个EA,但我不知道如何使用iCustom来打开它。

//+------------------------------------------------------------------+

//| ADX Crossing.mq4

//| Amir

//+------------------------------------------------------------------+

#property copyright "Author - Amir"


#property indicator_chart_window

#property indicator_buffers 2

#property indicator_color1 Lime

#property indicator_color2 Red


//---- input parameters

extern int ADXbars=14;

extern int CountBars=1000;

extern int Level=25;

//---- buffers

double val1[];

double val2[];

double b4plusdi,nowplusdi,b4minusdi,nowminusdi;


//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

string short_name;

//---- indicator line

IndicatorBuffers(2);

SetIndexStyle(0,DRAW_ARROW);

SetIndexArrow(0,108);

SetIndexStyle(1,DRAW_ARROW);

SetIndexArrow(1,108);

SetIndexBuffer(0,val1);

SetIndexBuffer(1,val2);

//----

return(0);

}

//+------------------------------------------------------------------+

//| AltrTrend_Signal_v2_2 |

//+------------------------------------------------------------------+

int start()

{

double adx;

if (CountBars>=Bars) CountBars=Bars;

SetIndexDrawBegin(0,Bars-CountBars);

SetIndexDrawBegin(1,Bars-CountBars);

int i,shift,counted_bars;



//---- check for possible errors

if(counted_bars<0) return(-1);


//---- initial zero

if(counted_bars<1)

{

for(i=1;i<=CountBars;i++) val1[CountBars-i]=0.0;

for(i=1;i<=CountBars;i++) val2[CountBars-i]=0.0;

}


for (shift = CountBars; shift>=0; shift--)

{


adx=iADX(NULL,0,ADXbars,PRICE_CLOSE,MODE_MAIN,shift);

b4plusdi=iADX(NULL,0,ADXbars,PRICE_CLOSE,MODE_PLUSDI,shift-1);

nowplusdi=iADX(NULL,0,ADXbars,PRICE_CLOSE,MODE_PLUSDI,shift);

b4minusdi=iADX(NULL,0,ADXbars,PRICE_CLOSE,MODE_MINUSDI,shift-1);

nowminusdi=iADX(NULL,0,ADXbars,PRICE_CLOSE,MODE_MINUSDI,shift);

if (b4plusdi>b4minusdi && nowplusdi<nowminusdi && adx>Level)

{

val1[shift]=Low[shift]-5*Point;

}

if (b4plusdi<b4minusdi && nowplusdi>nowminusdi && adx>Level)

{

val2[shift]=High[shift]+5*Point;

}



}

return(0);

}

//+------------------------------------------------------------------+

 
BooGUY:

谢谢你,我试过类似的方法。但是,不幸的是,这并不奏效。

该指标可以画点,我想尝试用它做一个EA,但我不明白如何通过iCustom编写开仓条件。

d1=iCustom(Symbol(),"ADX Crossing",14,1000,25,0,1);  // lime 

d2=iCustom(Symbol(),"ADX Crossing",14,1000,25,1,1);  // red  
 

大家好!你有没有看到下午6点后的20/200点是什么好的交易策略。

 
谁的权力指数 是条形图?发布代码。
 
_Aybulat_:
谁的权力指数是条形图?发布代码。

RSI - 相对强弱指数 ?
 

我试了一下,如果(d1!=0)

但EA仍然在一个错误的地方打开。一般来说,它应该把买入改为卖出,但有时它为卖出打开两次。也许我没有复制什么。

 
BooGUY:

我试了一下,如果(d1!=0)

但EA仍然在一个错误的地方打开。一般来说,它应该把买入改为卖出,但有时它为卖出打开两次。也许我没有复制什么。


把代码发给我,我就可以纠正它
原因: