Does anyone know why setting up
limit order exits based off of the entry price as shown below is not working
(note: I am using two separate entries of 100000 units - so the entry prices should be different...)
LT1 and LT2 are "limit target" variables
if marketposition = 1 and currententries = 2 then begin
LT1 = entryprice*(1+.005);
LT2 = entryprice*(1+.006);
sell ("LT1") currentshares/2 shares next bar at LT1 limit;
sell ("LT2") currentshares/2 shares next bar at LT2 limit;
end;
I have tried incorporating the code right after the buy order like so (see below) and that hasn't worked either:
....
buy ( "1S" )100000 shares next bar at market;
LT1 = entryprice*(1+.005);
sell ("LT1") currentshares/2 shares next bar at LT1 limit;
end;
buy ( "2S" )100000 shares next bar at market;
LT2 = entryprice*(1+.005);
sell ("LT2") currentshares/2 shares next bar at LT2 limit;
end;
Any help would be greatly appreciated. Thanks!