PureBytes Links
Trading Reference Links
|
Im getting an error in the POP code, its a order
execution problem. The error occurs when the program
covers partially and
then tries to cover again.. the second time it tries
to cover a contract it does not execute the order..
**********************
else if Side = 11 then
BuytoCover Size Contract Total next bar at market;
**********************
This Part of the code executes and covers 1 contract
(from a total of 3), when it tries to cover 1 more
contract it does not execute the statment.. I have
debugged it till this point, the Program gets to the
BuytoCover statement second time but does not execute.
Is there a problem with the BuytoCover Statement or
the POP doesnt allow this?
Changed = __popVal(ID1+10, Date, Time);
if (Changed = 99) then begin
Size = __popVal(ID1, Date, Time);
Side = __popVal(ID1+1, Date, Time);
value1 = __pushVal(ID1+10, Date, Time, 222);
if Side = 1 then
buy("buy") Size contract this bar on close
else if Side = -1 then
sellshort("short") Size contract this bar on close
else if Side = -11 then
Sell Size Contract Total this bar on close
else if Side = 11 then
BuytoCover Size Contract Total next bar at market;
end;
end;
__________________________________
|