Old TS guy with question

Questions about MultiCharts and user contributed studies.
User avatar
Mobiius
Posts: 60
Joined: 11 Mar 2010
Location: Victoria, BC, Canada
Has thanked: 4 times

Old TS guy with question

Postby Mobiius » 11 Mar 2010

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...

User avatar
Bruce DeVault
Posts: 438
Joined: 19 Jan 2010
Location: Washington DC
Been thanked: 2 times
Contact:

Postby Bruce DeVault » 12 Mar 2010

If you use code like:

Code: Select all

if currentbar = 10 then
begin
   buy ("LE") next bar at market;
   sell ("SE") next bar at market;
end;


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:

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;


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.

User avatar
Mobiius
Posts: 60
Joined: 11 Mar 2010
Location: Victoria, BC, Canada
Has thanked: 4 times

Postby Mobiius » 12 Mar 2010

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.


Thanks for replying. Yes, but what exactly does IB see? I guess i could do a test...

User avatar
ABC
Posts: 524
Joined: 16 Dec 2006
Has thanked: 111 times
Been thanked: 295 times
Contact:

Postby ABC » 12 Mar 2010

If you have an IB account, you get an additional Simulation Account, which works perfect for testing such things. In case you don't have it, it might even work with their free demo account with delayed data.

User avatar
Mobiius
Posts: 60
Joined: 11 Mar 2010
Location: Victoria, BC, Canada
Has thanked: 4 times

Postby Mobiius » 12 Mar 2010

oh, that's right... i will try and set up a sim account. thx.


Return to “MultiCharts”