double 多头最后一单下单时RSI的值()
{
double b=0;
double price=9999999;
&nbs ...
double 多头最后一单下单时RSI的值()
{
double b=0;
double price=9999999;
for(int i=0; i<OrdersTotal(); i++)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
{
if(OrderSymbol()==Symbol()&&OrderType()==OP_BUY&&OrderMagicNumber()==magic)
{
if(OrderOpenPrice()<price)
{
price=OrderOpenPrice();
b=iRSI(NULL,0,14,PRICE_CLOSE,0);
}
}
}
}
return(b);
}
//+------------------------------------------------------------------+
int 多头最后一单下单时RSI的位置()
{
int a=0;
double b=0;
b =多头最后一单下单时RSI的值();
{
if(60<b<=65)
{a=1;}
if(65<b<=70)
{a=2;}
if(70<b<=75)
{a=3;}
if(75<b<=80)
{a=4;}
if(80<b<=85)
{a=5;}
if(85<b<=90)
{a=6;}
if(90<b<=95)
{a=7;}
if(95<b<=100)
{a=8;}
if(35<=b<40)
{a=-1;}
if(30<=b<35)
{a=-2;}
if(25<=b<30)
{a=-3;}
if(20<=b<25)
{a=-4;}
if(15<=b<20)
{a=-5;}
if(10<=b<15)
{a=-6;}
if(5<=b<10)
{a=-7;}
if(0<=b<5)
{a=-8;}
}
return(a);
}
请教以下各位大神,我这两个函数写错了没?编写显示没错误,但是不开仓 |
|
|
|
|