buyreg=m_SupRescl[0]>m_SupResvalR[0] && m_SupRescl1[0]<=m_SupResvalR1[0]; // Crossing the line of resistance up. sellreg=m_SupRescl[0]<m_SupResvalS[0] && m_SupRescl1[0]>=m_SupResvalS1[0]; // Crossing the line of support down.
//--- variables for chart ID long currChart,prevChart=ChartFirst(); int i=0,limit=100; Print("ChartFirst =",ChartSymbol(prevChart)," ID =",prevChart); while(i<limit)// We have certainly not more than 100 open charts { currChart=ChartNext(prevChart); // Get the new chart ID by using the previous chart ID if(currChart<0) break; // Have reached the end of the chart list Print(i,ChartSymbol(currChart)," ID =",currChart); prevChart=currChart;// let's save the current chart ID for the ChartNext() i++;// Do not forget to increase the counter }
朋友们好,我正在用这个indi做新的策略,我想把它和其他指标结合起来,我用的是ICustom,指标有2个缓冲区,这没有问题,但指标有12和15的极端水平,我怎么能在我的自定义指标中编码这些水平,谢谢。
将iCustom()返回的值与12和15进行比较
非常感谢你的回答,我正在学习代码,我只对价格超过15级的时候感兴趣,这里面必须有什么变化?
double SDA(int i)
{
double up = iCustom(Symbol(),0, "SDA v 3.2",1,i+1)!=EMPTY_VALUE。
double dn = iCustom(Symbol(),0, "SDA v 3.2",0,i+1)!=EMPTY_VALUE;
如果(up)
{
返回(1)。
}
如果(dn)
{
return(-1);
}
return(0);
}
编码?
这个指标是 "反转/倾倒 "的。
我使用这段代码从所附的指标中读取支撑和阻力。
我的代码正确吗?
double m_SupResvalS[1];
double m_SupResvalR[1];
double m_SupRescl[1];
int shift=0;
bool buyreg,sellreg=false;
bool getSinal()
{
if(CopyBuffer(m_SupResHand,0,Shift,1,m_SupResvalS)==-1 ||
CopyBuffer(m_SupResHand,1,Shift,1,m_SupResvalR)==-1 ||
CopyClose(_Symbol,CURRENT_PERIOD,Shift,1,m_SupRescl)==-1
) return(false);
buyreg=m_SupRescl[0]>m_SupResvalR[0] && m_SupRescl1[0]<=m_SupResvalR1[0];
// Crossing the line of resistance up.
sellreg=m_SupRescl[0]<m_SupResvalS[0] && m_SupRescl1[0]>=m_SupResvalS1[0];
// Crossing the line of support down.
return(true);
}
大家好。
我正在尝试在我的EA中使用这个功能。
long currChart,prevChart=ChartFirst();
int i=0,limit=100;
Print("ChartFirst =",ChartSymbol(prevChart)," ID =",prevChart);
while(i<limit)// We have certainly not more than 100 open charts
{
currChart=ChartNext(prevChart); // Get the new chart ID by using the previous chart ID
if(currChart<0) break; // Have reached the end of the chart list
Print(i,ChartSymbol(currChart)," ID =",currChart);
prevChart=currChart;// let's save the current chart ID for the ChartNext()
i++;// Do not forget to increase the counter
}
谁能帮帮我?
问候
乔
将iCustom()返回的值与12和15进行比较
我感兴趣的是,当SDA超过15级时,如何在iCustom()中编码。
太感谢了。
我感兴趣的是,当SDA超过15级时,如何在iCustom()中编码。
非常感谢。
这是一个平等的指标,有2个缓冲区,所以可以在iCustom上工作。
检查 缓冲区1和缓冲区2 - 还有什么可以检查的?)