Macro to import/export symbol data?

Questions about MultiCharts and user contributed studies.
jek
Posts: 181
Joined: 24 Dec 2006
Has thanked: 1 time
Been thanked: 2 times

Macro to import/export symbol data?

Postby jek » 03 Oct 2009

I would like to script the importing/exporting of symbol data.

Can you recommend how to proceed?

Thanks.

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

Postby bowlesj3 » 04 Oct 2009

Some database programs (maybe even basic programs) can issue sendkey commands. It can automate almost anything in MC that involves user keystrokes. Pauses have to be introduced however after any command that opens a new form in MC or the sendkey functions will run on ahead of MC and it will not work. It takes a while to get these pauses correct. Once correct this works very well. I use this a lot to control both MC and IB's TWS (as well as other programs I use related to the discretionary trading process I have developed). I can even have a bracket open in TWS and have it track prices waiting for entry transmit without having to directly command TWS through their API which would create too much transmission traffic as prices keep shifting. Eventually I may use the TWS API to get the required data directly rather than through MC but my method does save some time of opening the bracket. The sendkey needs absolutely no slow down at all for adjusting the TWS bracket order before it is transmitted.

I have had situations where I needed to have the sendkey process stop to receive an answer (or even a menu of choices) in places where I had to make a manual determination or do something manually with the software I am controlling. With the tool I am using there really is no limit with the one exception of right click functions. It may be that some programs could even do this.

jek
Posts: 181
Joined: 24 Dec 2006
Has thanked: 1 time
Been thanked: 2 times

Postby jek » 04 Oct 2009

Thank you bowlesj3.

I've also been using something called "AutoIt" which has some primitives that can look inside windows and titles and wait until they manifest or disappear.

You might give that one a look.

Any other suggestions?

I haven't yet upgraded to 5.5 which says it has a multiple symbol import/export method.

I'm hoping that it will work with AutoIt whereas prior to 5.5 it wasn't really practical.

Of course, the ideal would be to have a command-line argument to import/export/list symbols... and not have to use macros.

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

Postby bowlesj3 » 04 Oct 2009

what is AutoIt? does it have a programming language. A database program clould probably with one button click do the export and actually get the file and bring it in and and do something with it by using a loop to test if the file is out there yet. It has to activate the application based upon the name in the task bar then issue the key strokes. Of course learning basic or a database program could take a while. Minor point :-)

brodnicki steven
Posts: 407
Joined: 01 Jan 2008
Been thanked: 3 times

Postby brodnicki steven » 04 Oct 2009

MacroExpress is very good Macro program that will do anything that you want(keystrokes, mouse position etc) and no programming is necesary. I used to use it to login to TWS, after shutdown, when I was sleeping, it worked great.

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

Postby bowlesj3 » 05 Oct 2009

Steven, are you saying that MacroExpress can activate a program (MC for example) and include right click mouse commands to MC after the proper key strokes have been applied to highlight a specific chart.

So in other words I could have my program activate MacroExpress and kick it off to execute the commands described above (many times my program will do key stroke commands as a small part of a much larger function that could be write rocords to a file etc). So I am thinking that I could use MacroExpress as a middle man at times.

Thanks,
John.

brodnicki steven
Posts: 407
Joined: 01 Jan 2008
Been thanked: 3 times

Postby brodnicki steven » 05 Oct 2009

Steven, are you saying that MacroExpress can activate a program (MC for example) and include right click mouse commands to MC after the proper key strokes have been applied to highlight a specific chart.

So in other words I could have my program activate MacroExpress and kick it off to execute the commands described above (many times my program will do key stroke commands as a small part of a much larger function that could be write rocords to a file etc). So I am thinking that I could use MacroExpress as a middle man at times.

Thanks,
John.
** Yes, you can do just about anything that you want. Years ago, I used to have it update daily data, run a scan for the stocks I was interested in and all those passing my filter, would be printed out, so it was ready when I came home from work(midnight), all with a macro.
You have full mouse control by left or right "click" or by position on the screen etc. It can wait for a window to "pop up" then activate the window etc.
It's an amazing program for macros and can be used by non-programmers.

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

Postby bowlesj3 » 05 Oct 2009

Thanks Steven.
Sounds like it is well work checking into.
John.

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

Postby bowlesj3 » 06 Oct 2009

It can wait for a window to "pop up" then activate the window etc.
I will have to get around to trying this Steven. As mentioned above the key strokes I send to MC require that delays be inserted to wait for it. Even activating the application itself requires a delay be introduced. I am curious how I would know specific MC file menu's would be detected by this program so it can then issue the commands to that menu. For example snap on/off or the commands to compress the bars. I use both of those often.

jek
Posts: 181
Joined: 24 Dec 2006
Has thanked: 1 time
Been thanked: 2 times

Postby jek » 01 Nov 2009

what is AutoIt? does it have a programming language.
Yes, it is a free macro program:
http://www.autoitscript.com/autoit3/

jek
Posts: 181
Joined: 24 Dec 2006
Has thanked: 1 time
Been thanked: 2 times

Postby jek » 01 Nov 2009

MacroExpress is very good Macro program that will do anything that you want(keystrokes, mouse position etc) and no programming is necesary. I used to use it to login to TWS, after shutdown, when I was sleeping, it worked great.
It does sound good. How do you get around the use of the security token for login though?

brodnicki steven
Posts: 407
Joined: 01 Jan 2008
Been thanked: 3 times

Postby brodnicki steven » 01 Nov 2009

It can wait for a window to "pop up" then activate the window etc.
I will have to get around to trying this Steven. As mentioned above the key strokes I send to MC require that delays be inserted to wait for it. Even activating the application itself requires a delay be introduced. I am curious how I would know specific MC file menu's would be detected by this program so it can then issue the commands to that menu. For example snap on/off or the commands to compress the bars. I use both of those often.
**You can add delays or just have it wait for a window to open etc, you need to see if they have a demo that you could try or at least the docs for it. It can do anything that I ever wanted it to do and alot more.

brodnicki steven
Posts: 407
Joined: 01 Jan 2008
Been thanked: 3 times

Postby brodnicki steven » 01 Nov 2009

MacroExpress is very good Macro program that will do anything that you want(keystrokes, mouse position etc) and no programming is necesary. I used to use it to login to TWS, after shutdown, when I was sleeping, it worked great.
It does sound good. How do you get around the use of the security token for login though?
**The only way to get around the security "token" is to disable it, in TWS and just use the user name and password, without the extra security. Personally , I like the added security, so I have to do manual logins now but since MC backfills data from IB, it's just a small nuisance.


Return to “MultiCharts”