PureBytes Links
Trading Reference Links
|
I have a system where there are 2 entry signals that I labelled ES1 (entry
signal 1 ) and ES2 with 2 Vars that are true/false when they are triggered.
I count the number of days I have been in each trade using counters named
CounterES1 and CounterES2 ..I then need a time-out exit so I wrote:
If CounterES1=exitlen and ES1=true and ES2=true then begin
Exitlong ("Time ES1 LX") currentcontracts/2 contracts at market;
Exitshort ("Time ES1 SX") currentcontracts/2 contracts at market;
ES1=false;
CounterES1=0;
end;
The exit order is then being filled twice on the same bar??? once for what I
can only guess is the correct number of contracts and then again for the
remaining number less 6 or some arbitrary number .. My contract size in each
entry order = 1000/ATR(20).
I need to get the exit order to ONLY sell half the position.. then, if the
second signal enrty times out then it will exit after "exitlen" days from
its entry date.
any ideas??
CE
|