Coding a bracket order

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Coding a bracket order

Postby arjfca » 07 Dec 2010

Hello

If my broker is IB, How do you code a bracket order. I did not found any example

I want to sent a "Stop order" meaning it is conditionnal to the price reach my target. Now, if done, I want to have a stop loss installed. This 2'orders is conditionnal to the execution of the initial order.

Hope I'm clear ennough

Martin

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: Coding a bracket order

Postby Dave Masalov » 08 Dec 2010

Dear Martin,

MC does not send bracket orders to IB. However, the following can be done:

buy next bar at close stop;
if entryprice > 0 then sell next bar at entryprice - 10 points stop;

When the first order is executed, the second is activated.

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Coding a bracket order

Postby arjfca » 08 Dec 2010

Hello Dave

In a past question from Quark about a similar question:
http://www.multicharts.com/discussion/v ... hp?p=28556

Andrew answerd that IF IB is the broker, both orders are sent as a bracket order
Andrew Kirillov Post subject: Posted: 11 Sep 2009

Profile pm_me! e-mail
Joined: 28 Jul 2005
Posts: 1901 Dear quark,

In case of IB, you just need to use SetStopLoss and SetProfitTarget statements; they will be handled as a bracket order automatically.
Now, I did research SetStopLoss and some say that it is not reliable in live trading.

I'm looking for a solution where my Stop will reside on IB server, not on my PC.

Martin

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: Coding a bracket order

Postby Dave Masalov » 08 Dec 2010

Dear Martin,

Your stop will be submitted to IB only when you enter the position (entry order is executed).

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: Coding a bracket order

Postby arjfca » 08 Dec 2010

Dear Martin,

Your stop will be submitted to IB only when you enter the position (entry order is executed).

Dave, if I follow you, PC and Multicharts as to be on to monitor the change.

Since IB allow these stop loss to reside on their servers, is it something that MC plan to integer in a future version?

Martin

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 489 times

Re: Coding a bracket order

Postby Dave Masalov » 08 Dec 2010

Since IB allow these stop loss to reside on their servers, is it something that MC plan to integer in a future version?
Dear Martin,

It is not planned to be implemented in the next version, but I will forward your suggestion to the developers.


Return to “MultiCharts”