[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why not exit? - EL question



PureBytes Links

Trading Reference Links

Hello, All -

EL help, please...

I'm trying to code exits that "scale" out of multicontract positions.  It
appears that my exit statement is only executed once, and not multiple times
as I believe I have coded it to do.  I've added print statements to see if
the code path is being used, and it is.  The diagnostic print text is
displayed, but the exit statement does not appear to execute.

Looks like:
---------------------
If MP=1 and close > ProfitTarget then begin
	ExitLong CurrentContracts/2 total at Market;
	Print(date," ",getsymbolname," exit half of the contracts right now!");
End;
---------------------

ProfitTarget is reset to a higher level after each partial exit.

The print statement is executed multiple times as the progressive targets
are set and reached, yet the "exitlong" command appears to not be
executed...  I need clue.

I've implemented of EL that uses multiple different exits for different
reasons, but not the "same" exit like this.

Any ideas would be helpful.

Regards,
Rob Hartman