IB automatic trading  [SOLVED]

Questions about MultiCharts and user contributed studies.
Guest

IB automatic trading

Postby Guest » 05 Feb 2007

Hello TS Support team,

could you make a turtorial about using the autotrading in IB?

Thanks

User avatar
Kate
Posts: 758
Joined: 08 Dec 2006

Postby Kate » 05 Feb 2007

We'll make it in a couple of days.

Guest

  [SOLVED]

Postby Guest » 05 Feb 2007

Hi Kate,

is there a reason why the MCTrader is no longer availible?

Do you plan to integrate an window where you can follow your open positions send from MC to IB?

Will it be possible to exit positions manually that are entered trough a signal and will MC recognize that i am flat and dont send a second closing order if the strategy gives the exit signal?

User avatar
Stanley Miller
Posts: 556
Joined: 26 Jul 2005
Has thanked: 3 times

Postby Stanley Miller » 06 Feb 2007

1. Run TWS.
2. Under menu select Configure then click API. Make sure Enable ActiveX and Socket Clients is checked otherwise check it.
3. Under menu select Configure then click API. Make sure Fire openOrder on status' change is checked otherwise check it.
4. Go to MultiCharts.
5. Apply a strategy to a chart.
6. Access Format Objects window.
7. Select Signals tab.
8. Click Properties.
9. Select IB Auto Trading tab.
10. Check Automate order execution.
11. In the confirmation window appeared carefully read the agreement and click Yes if accepted.
12. Check Require order confirmation for manual order execution.
13. Uncheck Require order confirmation for automatic order execution.
14. In the Audio Alert area set audio alerts if required.
15. In case the chart symbol is an IB symbol (add via Add Symbol From DataSource) skip to Step 18.
16. In case the chart symbol is not an IB symbol select Symbol Dictionary tab.
17. Click Add and set properties for IB symbol to execute orders with (according to TWS).
18. Click OK.

Nick
Posts: 496
Joined: 04 Aug 2006
Has thanked: 4 times
Been thanked: 24 times

Postby Nick » 06 Feb 2007

I mentioned this before, but any excuse to refresh people memories :). I would love to have orders triggered from drawn lines. (A couple of the FX platforms do this I believe).

Horiztontal lines would be great (you would need break out and fade and ideally a way to have a OCO for a stop and target)

Sloping lines would be more than great!!! (but obviously trickier)

Nick
Posts: 496
Joined: 04 Aug 2006
Has thanked: 4 times
Been thanked: 24 times

Postby Nick » 06 Feb 2007

One more while I am on a roll :) I know some people want to go for full automation but semi is appealing too. A quick example you have entered manually but one to trail a stop based on ATR (average true range).

Maybe some clever coding could do that now? Enter order to enter through TWS then apply a simple study 'ATR Trail Short' that will ratchet a stop up and close automatically when it gets hit? Does that sound feasible or am I fantasising?

Victor

Postby Victor » 07 Feb 2007

Dear, MC Support, but it is very important!

There was no answer on that question:

- is there a reason why the MCTrader is no longer availible?

- Do you plan to integrate an window where you can follow your open positions send from MC to IB?

- Will it be possible to exit positions manually that are entered trough a signal and will MC recognize that i am flat and dont send a second closing order if the strategy gives the exit signal?

Thanks

User avatar
Stanley Miller
Posts: 556
Joined: 26 Jul 2005
Has thanked: 3 times

Postby Stanley Miller » 07 Feb 2007

Dear, MC Support, but it is very important!

There was no answer on that question:

- is there a reason why the MCTrader is no longer availible?
Yes, MCTrader is no longer available. You can track all your orders and positions right in the broker application.
- Do you plan to integrate an window where you can follow your open positions send from MC to IB?
May be we'll integrate such a window in the future. Right now you can do all this in TWS window.
- Will it be possible to exit positions manually that are entered trough a signal and will MC recognize that i am flat and dont send a second closing order if the strategy gives the exit signal?
Yes, you can exit positions manually and MultiCharts will recognize that position is closed and will not send a redundant exit position order.
Last edited by Stanley Miller on 07 Feb 2007, edited 3 times in total.

SP
Posts: 465
Joined: 06 Feb 2006
Has thanked: 36 times
Been thanked: 286 times

Postby SP » 07 Feb 2007

Horiztontal lines would be great (you would need break out and fade and ideally a way to have a OCO for a stop and target)

Sloping lines would be more than great!!! (but obviously trickier)
Hi Nick,

you can get values from manuall drawn trendlines as an indicator with:

Code: Select all

Value1 = tl_getfirst(7); // 7 Trendline drawn by user
value2 = tl_getvalue (value1, date, time) ;
If TL_Exist(value1) and close crosses over value2 then begin
alert ("Trendline is broken up");
end;

If TL_Exist(value1) and Lastbaronchart then value99 = Text_New(Date, Time, value2, NumToStr (value2,2));
I didnt try, but if you create it as an signal and replace the alert with an buy this bar market, it could work also as entry tool.

Nick
Posts: 496
Joined: 04 Aug 2006
Has thanked: 4 times
Been thanked: 24 times

Postby Nick » 07 Feb 2007

Hi SP,

Thanks for that I'll have a mess around later.


Return to “MultiCharts”