[Intrabarordergeneration = true];
I enter a Short trade.
SellShort ("FX1S") 200000 contract next bar at ShortLevel stop;
This is fine, I'm now short 200,000
Marketposition =-1 Marketposition_at_broker = -200000
A Limit order (profit take) is now triggered
buytocover ("PS1_SX") 100000 contracts next bar at ShortExitLevel Limit;
This order works.
Marketposition =-1 Marketposition_at_broker = -100000
Now, no further orders work.
Ie I have a StopLoss order at a price level and it has disappeared.
I have a buytocover for the rest and it no longer works
buytocover ("EB_SX") next bar at market;
Marketposition =-1 Marketposition_at_broker = -100000
The actual code looks is
Code: Select all
MP=Marketposition_at_broker;
If (MP<0) AND (CurrentTime_S>ExitTradeTime) then
begin
buytocover ("EB_SX") next bar at market;
print("111111111");
end;
Still says Marketposition =-1 Marketposition_at_broker = -100000
Why is it so?
Neil.