I know lot of MC users have been using auto trading with IB and hence I guess the user guide is quite sufficient. Maybe I should not even be trying auto-trading in the first place but I really wish to. I went thru the manual and I am not up to it. I know TS Multicharts folks are working on hard on next release & video tutorial but I wanted to see if they (or any expert volunteer in this newsgroup) could spend a day or two and write a good easy tutorial for auto trading for dummies. With 4-5 simple examples. I know MC plans video tutorial but I find it difficult to wait much longer.
OK, here is what I would like to do:
- connect with my current IB TWS desktop
- able to place market/limit trades both during market & afterhours
- Use a simple signal with six conditions where one buys and sells.
- find the account balance in my IB account so that auto trade can calculate appropriate trade sizes
- when cond1 happens add 1/3 position, when cond2 happens add another 1/3 and when cond3 happens, add the last third
- now when cond4 happens, sell a third, when cond5 happens, sell another third, when cond6 happens sell the final third
(of course, always check if the previous trade has been executed fully and autotrade knows what position size I am currently holding before sending in next order)
- at market close, I would like to close any existing positions
I hope I am not missing anything here.
Thanks in advance
Auto trade tutorial
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
that's a load of requirement!
you can start here:
Building Winning Trading Systems with TS
http://www.amazon.com/gp/product/047121 ... d_i=507846
if that's too difficult for you,
try this first:
http://www.amazon.com/gp/product/093438 ... d_i=507846
you can start here:
Building Winning Trading Systems with TS
http://www.amazon.com/gp/product/047121 ... d_i=507846
if that's too difficult for you,
try this first:
http://www.amazon.com/gp/product/093438 ... d_i=507846
TJ, I took a quick look and look into further. It looks more to do with easylang which is not a issue yet. I am more looking for interactions between MC(using easylang of course) and interactive broker TWS (making trades (different types), getting to know current positions and their sizes, confirmation of executions of fills, etc)
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
if you have an IB account, you can request a papertrading account.
(the simulated trading, not the demo system).
the papertrading account has live feed, and process orders just like the real thing.
you can test all the MC-TWS interaction through this simulated trading.
for those do not have an IB account, you can use the IB demo system. It is free.
(the simulated trading, not the demo system).
the papertrading account has live feed, and process orders just like the real thing.
you can test all the MC-TWS interaction through this simulated trading.
for those do not have an IB account, you can use the IB demo system. It is free.
Thanks, TJ.
Also, I found a good bit of info at nearly end of the manual (pages 690-740) of the user guide (not much in the autotrading chapter itself earlier). Since MC has such powerful features, it would be great if they provide few scenarios/examples using the commands (agree it is a bit of hand holding)
Also, I found a good bit of info at nearly end of the manual (pages 690-740) of the user guide (not much in the autotrading chapter itself earlier). Since MC has such powerful features, it would be great if they provide few scenarios/examples using the commands (agree it is a bit of hand holding)
Last edited by capgain on 26 Mar 2009, edited 1 time in total.
-
- Posts: 407
- Joined: 01 Jan 2008
- Been thanked: 3 times
I would also like to see some examples of basic systems with reccomended "safety" code for auto trading, that verifies the system is working properly and is connected to IB. I think "sync" mode should always be used but what about code to protect against unforseen connection problems etc. (code to handle reconnection, re-sync with IB etc) after the connection is lost.
I'm sure there is some standard "protection-safety code", that should be included in all autotrading systems, to assure proper sync with IB.
I'm sure there is some standard "protection-safety code", that should be included in all autotrading systems, to assure proper sync with IB.
Also, I was wondering if any here have done auto trading with multiple IB accounts (without adviser - I have 3 accounts but to do adviser, I would have to close them and then open adviser account and then add them - which is a pain and I am not a professional advisor anyway). Is it possible to connect to IB TWS clients running on different machines ?
Last edited by capgain on 26 Mar 2009, edited 1 time in total.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
there is nothing like hands on...
I am a beginner in autotrade as well.
I am learning by experimenting.
there are over 150 strategies included in MC...
and ALL of them make money!
you can learn by jumping in with both feet!
(ok... some of them make money some of the time.)
scaling in/out is more advanced stuff.
it requires careful logic design and expertize coding.
it might take some time to learn and debug.
To promote synergistic learning...
I will be posting some autotrade examples here:
http://www.tssupport.com/forum/viewtopi ... 5462#25462
I am a beginner in autotrade as well.
I am learning by experimenting.
there are over 150 strategies included in MC...
and ALL of them make money!
you can learn by jumping in with both feet!
(ok... some of them make money some of the time.)
scaling in/out is more advanced stuff.
it requires careful logic design and expertize coding.
it might take some time to learn and debug.
To promote synergistic learning...
I will be posting some autotrade examples here:
http://www.tssupport.com/forum/viewtopi ... 5462#25462
TJ,there is nothing like hands on...
...
To promote synergistic learning...
I will be posting some autotrade examples here:
http://www.tssupport.com/forum/viewtopi ... 5462#25462
the approach I am taking so far is this. I had written a dll which takes input from various indicators from various charts and comes up with magic formula . I am extending that DLL to include all the bookkeeping of trades, scaling in/out, etc. So the signal and this DLL work together to do the auto-trades. The signal basically just creates and sends in the orders to IB. This has been my quickest way especially since I am more C++ than easylang (I gave up on easylang when I started to search on way to read from a file!). Anyway, in the one hour or two I tried this, it appears OK (I have other issues which I will write about in another message) - but you can tell about my confidence based on the fact that I am doing autotrading in huge 1 share lots.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
that's great. Maybe you can share with us how to use dll?TJ,
the approach I am taking so far is this. I had written a dll which takes input from various indicators from various charts and comes up with magic formula . I am extending that DLL to include all the bookkeeping of trades, scaling in/out, etc. So the signal and this DLL work together to do the auto-trades. The signal basically just creates and sends in the orders to IB. This has been my quickest way especially since I am more C++ than easylang (I gave up on easylang when I started to search on way to read from a file!). Anyway, in the one hour or two I tried this, it appears OK (I have other issues which I will write about in another message) - but you can tell about my confidence based on the fact that I am doing autotrading in huge 1 share lots.
I have downloaded the GV, ADE, etc., but still haven't made any headway with them.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Auto trade tutorial
Do these functions work (i am using Multicharts with IB) ..
GetAccountID
GetRTAccountNetWorth
GetPositionQuantity
In my signal compilation, it complains about "unknown function". I would appreciate any help on this. Thanks!
GetAccountID
GetRTAccountNetWorth
GetPositionQuantity
In my signal compilation, it complains about "unknown function". I would appreciate any help on this. Thanks!
Re: Auto trade tutorial
No they are not supported as yet, at present we can not get any information from IB into multichart through powerlanguage functionality. I sincerely hope they become available soon.Do these functions work (i am using Multicharts with IB) ..
GetAccountID
GetRTAccountNetWorth
GetPositionQuantity
In my signal compilation, it complains about "unknown function". I would appreciate any help on this. Thanks!
- Andrew Kirillov
- Posts: 1589
- Joined: 28 Jul 2005
- Has thanked: 2 times
- Been thanked: 31 times
- Contact:
-
- Posts: 407
- Joined: 01 Jan 2008
- Been thanked: 3 times
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
FYI:
We are working on a broker's market position keyword.
We are adding two reserved words:
MarketPosition_at_Broker;
MarketPosition_at_Broker_for_The_Strategy;
It will be available in MC 5.1
All existing users are entitled for minor upgrades after MultiCharts 5.0 (Gold) release.
say goodbye to the competition !
- Andrew Kirillov
- Posts: 1589
- Joined: 28 Jul 2005
- Has thanked: 2 times
- Been thanked: 31 times
- Contact: