Topic: Manage order send - unknown result
Hey, I have couple of ea's generated by fsb pro, and I see a lot of problems in expert console. Symbol filling is ORDER_FILLING_FOK, but in code I dont know why is loop:
if(check.retcode == TRADE_RETCODE_INVALID_FILL)
{
switch (orderFillingType)
{
case ORDER_FILLING_FOK:
Print("Filling mode changed to: ORDER_FILLING_IOC");
orderFillingType = ORDER_FILLING_IOC;
break;
case ORDER_FILLING_IOC:
Print("Filling mode changed to: ORDER_FILLING_RETURN");
orderFillingType = ORDER_FILLING_RETURN;
break;
case ORDER_FILLING_RETURN:
Print("Filling mode changed to: ORDER_FILLING_BOC");
orderFillingType = ORDER_FILLING_BOC;
break;
}
so my filing is fok, ea's fillink should be fok, but its changed on start, and then i see a lot of issues in console, also if i will disable this check there are another problems, so I dont really know this strategy works fine or no, also here is description from fsb:
Entry signal in the direction of the present position:
Add to a winning position but not to a losing one. If the position is at a loss, cancel the additional entry order. Do not exceed the maximum allowed number of lots to open.
Entry signal in the opposite direction:
No modification of the present position is allowed. Cancel any additional orders which are in the opposite direction.
so from the logs i see ea tryies to close position and open new one, but it is not allowed by desc, so it is only a try which will always fail or something wrong with ea?