About SAT mode

Questions about MultiCharts and user contributed studies.
2haerim
Posts: 502
Joined: 01 Sep 2006
Been thanked: 2 times

About SAT mode

Postby 2haerim » 26 Jun 2009

MC Help describes SAT as:
Synchronous Mode for Auto Trading
The synchronous auto trading mode (SAT) is a mode where entry/exit arrows are plotted on the chart only after orders have been executed at the broker.
The synchronous auto trading mode ensures avoiding discrepancies between the market position on the chart and the market position at the broker. The following conditions must be met in order for the synchronous auto trading mode to work properly:
1. The same symbol cannot be traded from more than one chart. Trading the same symbol from two or more charts will cause a market position conflict between the charts.
2. The market position at the broker must be 0 at the time when auto trading is launched.

3. A trader must not trade the symbol directly through the broker’s platform while trading the same symbol through MultiCharts platform.
4. At the moment of connection loss, the broker did not send notifications about complete order filling or cancellation.
Among these restrictions, 1 and 2 makes SAT not much usable for users who trade multiple resolutions for a single symbol.

Are these limitations are to be overcome in the future version? If so, when approx?

janus
Posts: 838
Joined: 25 May 2009
Has thanked: 64 times
Been thanked: 105 times

Re: About SAT mode

Postby janus » 26 Jun 2009

According to the TWS API guide an application can connect up to eight API sessions to one TWS client by assigning a different client ID for each API session. Therefore, any orders sent for each id can be tracked independently.

Also, there's a "request executed orders" API that can be used by MC to keep in sync with the order status. This would allow us to execute orders directly through IB without fear of MC missing them.

I hope these two features are implemented in the next release.

bowlesj3
Posts: 2180
Joined: 21 Jul 2007
Has thanked: 227 times
Been thanked: 429 times

Postby bowlesj3 » 27 Jun 2009

According to the TWS API guide
Hi Janus,

How did you get the TWS API guide? I emailed about it and they discouraged it. Maybe I emailed the wrong people.

The one below would be handy since I execute through my database program rather than MC but do it all via macro control commands. It is not a major deal since I am discretionary anyway but I could make use of it a few ways. Right now when I am in a position and using the database to control TWS I get the price info from MC via GVs but it would be better to get it direct from TWS since it would be much faster, I could tell when the position was closed and the info would be almost guaranteed to be accurate.
Also, there's a "request executed orders" API that can be used by MC to keep in sync with the order status. This would allow us to execute orders directly through IB without fear of MC missing them.
Thanks,
John.

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Postby TJ » 27 Jun 2009

I assume you already have this?
API Reference Guide
http://www.interactivebrokers.com/php/a ... iguide.htm

bowlesj3
Posts: 2180
Joined: 21 Jul 2007
Has thanked: 227 times
Been thanked: 429 times

Postby bowlesj3 » 28 Jun 2009

Thanks TJ. Thats great. I will check it out.
John.

janus
Posts: 838
Joined: 25 May 2009
Has thanked: 64 times
Been thanked: 105 times

Re: About SAT mode

Postby janus » 28 Jun 2009

I was referring to this one:

http://www.interactivebrokers.com/downl ... C++API.pdf

It's in the beginning of chapter 16.

bowlesj3
Posts: 2180
Joined: 21 Jul 2007
Has thanked: 227 times
Been thanked: 429 times

Postby bowlesj3 » 28 Jun 2009

Thanks Janus,
I will check into both of them.

I have two questions. You mentioned windows calls in another post regarding "TWS all time running". I have always wanted to learn about doing windows calls for XP and know zero about it.

Are there any good books on how do do this?

Do I need to know C at all for doing these windows calls?
Here is the thing. Although I have programmed in about 12 languages in varying amounts (commodor machine language, IBM assembler, 2 cobols, RPG, MS-access VBA, Outlook VBA, Linux bash shell, unix Korn shell, sed, awk, etc) I have never learned anything about C language at all (never had any need and want to avoid it since I am heavily into trading these days).

I am google researching it now and have found some web pages (below). It seems a little scattered at this point (a can of worms). Interesting web pages actually.
http://delphi.about.com/b/a/43460.htm
http://discuss.fogcreek.com/askjoel/def ... Replies=19
http://www.mono-project.com/Gui_Toolkits
http://www.thefreecountry.com/programmi ... eous.shtml
http://wareseeker.com/free-windows-api-calls/



Thanks again.
John.

janus
Posts: 838
Joined: 25 May 2009
Has thanked: 64 times
Been thanked: 105 times

Postby janus » 28 Jun 2009

Depending on the complexity of the task I use either FreeBasic (with FBEdit) or VC++/VB. For this particular task I used FreeBasic because it's short, sweet and fast. You can go to the FreeBasic forum (http://www.freebasic.net/forum/) to find examples of how to use windows api's in their raw form. The better approach is to use Visual Studio and the standard windows calling features as there are lots of examples from various web sites, including MSN. I've reviewed various commercial IDE's that are much better than Visual Studio to make life easier but they are pretty expensive. Eclipse is free and looks like a good alternative to Visual Studio but requires a lot of plug-ins to work with windows apps. Eclipse was originally designed just for java but now covers other languages. Many commercial packages have been developed using Eclipse as well as Visual Studio.

If you don't want to learn C++ (I don't blame you - I actually hate C and C++) then VB is fine. FreeBasic is excellent for quick and simple programming. I use it a lot as a sort of scripting language. I used to use vbscript and rexx for this but found FreeBasic a lot better yet easier to use. However, don't let the word Basic in FreeBasic give you the wrong impression. It supports almost everything C++ does (eg, pointers, user defined variable types, etc.) so can be used for complex applications, including 3-d game development. There are a couple of fancy IDE's that can be used with FreeBasic, such as FBEdit and FBIde.

bowlesj3
Posts: 2180
Joined: 21 Jul 2007
Has thanked: 227 times
Been thanked: 429 times

Postby bowlesj3 » 28 Jun 2009

Thanks Janus, I will probably check into it sometime after checking out the TWS API info.
John.


Return to “MultiCharts”