But it is in the condition that the order already exists.
First, OrderSend() occurs twice and both times outside the condition you specified.
Secondly, the OrderSend() passes non-normalized price.
Third, analyze the result returned by OrderSend(), write a message to the log in case of errors when opening/modifying/closing an order and analyze the log.
If DN[i] = 70 and dn[i] = 60 and jma>Close[i]. I.e. green has crossed the level of 80 from above to below and the green has crossed the blue from above to below, the closing price is lower than jma.
I have to put a point on the level 10,
if DN[i] = 30 and dn[i] = 40 and jma<Close[i]. i.e. green crossed the level 20 from down to up, and crossed the green blue from down to up, the closing price is higher than jma.
I cannot attach the code to the indicator.
int start()
{
int limit;
double dMA;
int fd, fu,Fd, Fu;
int counted_bars = IndicatorCounted();
if(counted_bars < 0) return(-1);
if(counted_bars > 0) counted_bars--;
limit = Bars - counted_bars;
for(int i = 0; i < limit; i++)
wBuffer[i] = iMA(NULL, TimeFrame, aLine, 0, aMethod, bPrice, i);
for(i = 0; i < limit; i++)
{
dBuffer[i] = iMA(NULL, TimeFrame, aLine, 0, aMethod, bPrice, i) +
iMA(NULL, TimeFrame, aLine, 0, aMethod, bPrice, i) -
(-iRSIOnArray(wBuffer, 0, bLine, i));
rsi[i]=iRSI(NULL, TimeFrame, 14, 0, i);
}
for(i = 0; i < limit; i++)
{
if(dBuffer[i+1]>80 && dBuffer[i]<80) DN[i] = 70; Fd=-1; Fu=0; //пересекла 80 --> 1if(dBuffer[i+1]<20 && dBuffer[i]>20) UP[i] = 30; Fu=1; Fd=0; //пересекла 20 --> 1if(dBuffer[i+1]>rsi[i+1] && dBuffer[i]<rsi[i]) dn[i] = 60; fd=-1; fu=0; //пересечение двух --> 2if(dBuffer[i+1]<rsi[i+1] && dBuffer[i]>rsi[i]) up[i] = 40; fu=1; fd=0; //пересечение двух --> 2if(Fd==-1 && fd==-1) dot[i]=90; Fd=0; Fu=0; fd=0; fu=0;
if(Fu==1 && fu==1) dot[i]=10; Fd=0; Fu=0; fd=0; fu=0;
/*
Надо поставить точку на уровне 90, если DN[i] = 70 и dn[i] = 60. То есть зеленая пересекла уровень 80 с верху в низ и пересекла зеленая синююю с верху в низ.
Надо поставить точку на уровне 10, если DN[i] = 30 и dn[i] = 40. То есть зеленая пересекла уровень 20 с низу в верх и пересекла зеленая синююю с низу в верх.
*/double jma=iCustom(NULL,0,"JMA[i]",Length,Phase,0,i);
if(Fd==-1 && fd==-1 && jma>Close[i]) {dot[i]=90; Fd=0; Fu=0; fd=0; fu=0;}
if(Fu==1 && fu==1 && jma<Close[i]) {dot[i]=10; Fd=0; Fu=0; fd=0; fu=0;}
}
//----return(0);
}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I am sorry, maybe this is not the subject, why does the EA work in the Strategy Tester but it does not open live and demo trades?
Perhaps there is a restriction on using it on real or even demo trading. I would like to use it in the Strategy Tester just to get acquainted.)
Perhaps there is a restriction on using it for real and even for demo. And in the tester for acquaintance)).
I downloaded it freely, but how do I know if there are restrictions or not?
I downloaded it freely, but how do I know if there are restrictions or not?
From a cursory glance, there are no demo/real restrictions
I haven't even found the conditions when it should open the first order.
there is OrderSend(...)
there is OrderSend(...)
But it's in the condition that the orders are already there.
But it is in the condition that the order already exists.
First, OrderSend() occurs twice and both times outside the condition you specified.
Secondly, the OrderSend() passes non-normalized price.
Third, analyze the result returned by OrderSend(), write a message to the log in case of errors when opening/modifying/closing an order and analyze the log.
!!! wow !!! thanks !!!
I'll be digging)))
Help with the gi_RSI indicator code.
I need to put a point on level 90,
If DN[i] = 70 and dn[i] = 60 and jma>Close[i]. I.e. green has crossed the level of 80 from above to below and the green has crossed the blue from above to below, the closing price is lower than jma.
I have to put a point on the level 10,
if DN[i] = 30 and dn[i] = 40 and jma<Close[i]. i.e. green crossed the level 20 from down to up, and crossed the green blue from down to up, the closing price is higher than jma.
I cannot attach the code to the indicator.