I'm doing this. What is wrong? How it is done correctly? .
TEND1= iADX(NULL,PERIOD_M15,14,PRICE_CLOSE, MODE_PLUSDI,1); TEND2= iADX(NULL,PERIOD_M15,14,PRICE_CLOSE, MODE_PLUSDI,2);
trader201: What is wrong |
|
TEND1= iADX(NULL,PERIOD_M15,14,PRICE_CLOSE, MODE_PLUSDI,1); TEND2= iADX(NULL,PERIOD_M15,14,PRICE_CLOSE, MODE_PLUSDI,2);
trader201: What is wrong |
|
You agree to website policy and terms of use
What is wrong in that code? How it is done correctly?
when I do the testing, using "Print (" error ", GetLastError ());" it say "error 4054". But when I give opening that message, the txt says "Error 131".
I'm doing this:
void OnTick()
{
double TEND1, TEND2;
TEND1= iADX(NULL,14,PERIOD_M15,PRICE_CLOSE, MODE_PLUSDI,1);
TEND2= iADX(NULL,14,PERIOD_M15,PRICE_CLOSE, MODE_PLUSDI,2);
//---
if (OrdersTotal()==0 && TEND1>TEND2)
{
int ticket=OrderSend(Symbol(),OP_BUY,0.01, Ask, 10, Ask-500*Point, Ask+500*Point, NULL, 0, 0, clrNONE);
}
Print("error", GetLastError());
}