I have myself throughly confused...my EA has a StopLoss=20 and TakeProfit=40. Since I have IBFX I have to modify the order to add those values. I'm not sure exactly how to convert the StopLoss and TakeProfit numbers to price. I'm using this code for a buy:
int ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0,NULL,0,0,Green);
if(ticket>0)
{
OrderSelect(ticket,SELECT_BY_TICKET);
OrderModify(ticket,OrderOpenPrice(),Bid-(StopLoss*Point*10),Ask+(TakeProfit*Point*10),0,Green);
}
But when I print the StopLoss and TakeProfit values after the modify they are not what they should be. I'm sure this is something simple but my brain is mush trying to figure normalization, point, and digits...
Thanks for any help
int ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0,NULL,0,0,Green);
if(ticket>0)
{
OrderSelect(ticket,SELECT_BY_TICKET);
OrderModify(ticket,OrderOpenPrice(),Bid-(StopLoss*Point*10),Ask+(TakeProfit*Point*10),0,Green);
}
But when I print the StopLoss and TakeProfit values after the modify they are not what they should be. I'm sure this is something simple but my brain is mush trying to figure normalization, point, and digits...
Thanks for any help