Hi, Ive opened a new ECN account - but I cannot get my EA to open trades...
I searched and found that I have to create an order without SL and TP and then modify - but I still cannot get any trades to open
My code is as follows
void EnterBuy()
{
double dTP = CalTP(OP_BUY);
int iMagic = JenkinsHash(Symbol(),Period());
int ticket = OrderSend(Symbol(),OP_BUY,LotSize,Ask,100,0,0,"EA Buy",iMagic,0,Green);
if (ticket>0)OrderModify(ticket,OrderOpenPrice(),0,dTP,0,CLR_NONE);
}
This is driving me nuts!
Can anyone help?
Thanks
I searched and found that I have to create an order without SL and TP and then modify - but I still cannot get any trades to open
My code is as follows
void EnterBuy()
{
double dTP = CalTP(OP_BUY);
int iMagic = JenkinsHash(Symbol(),Period());
int ticket = OrderSend(Symbol(),OP_BUY,LotSize,Ask,100,0,0,"EA Buy",iMagic,0,Green);
if (ticket>0)OrderModify(ticket,OrderOpenPrice(),0,dTP,0,CLR_NONE);
}
This is driving me nuts!
Can anyone help?
Thanks