Hi,
I have an strategy that uses multiple LE And SE's this smoothes it out for me. anyway I'd like to cancel LE's and SE's if they are going to be activated on the same 'next bar'.
I haven't set up this to automated it, so I don't know if they would cancel each other out anyway in IB, but I just want to make sure...
Anyone know if this will be a problem? Do the LE's and SE's that are activated on the next bar cancel each other out and if there is say 2 LE's and 3 SE's they would just send 1 SE order?
The reason I ask is that it does show these trades in the performance reports... But I just can't see how this would send out anything but in this example 1 SE order to my IB account... could someone correct me or confirm this?
BTY, first post, and I am happy to be here...
Old TS guy with question
- Bruce DeVault
- Posts: 438
- Joined: 19 Jan 2010
- Location: Washington DC
- Been thanked: 2 times
- Contact:
If you use code like:
Both TS and MultiCharts handle this in the same way, which is to enter you into a position with LE then use the SE as an exit. While this is arguably unexpected (and is not really what I would have hoped for in an ideal world) at least the two platforms handle it identically.
If you change the code as follows, however:
On TS, the SE4 exits all three long positions leaving you flat, while on MultiCharts, SE4 exits LE1, and SE5 exits LE2, leaving LE3 open.
Code: Select all
if currentbar = 10 then
begin
buy ("LE") next bar at market;
sell ("SE") next bar at market;
end;
If you change the code as follows, however:
Code: Select all
if currentbar = 10 then
begin
buy ("LE1") next bar at market;
buy ("LE2") next bar at market;
buy ("LE3") next bar at market;
sell ("SE4") next bar at market;
sell ("SE5") next bar at market;
end;
- ABC
- Posts: 722
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 410 times
- Contact: