Jump to content
Sign in to follow this  
elmutt

Doesnt seem to work with tradestation 9.1?

Recommended Posts

elmutt

Im trying to write a script to automate some things in tradestation 9.1 and it seems any kind of automated input simply does not work with tradestation. I tried autohotkey and it does not work either.

I assume this is because there are some built in countermeasures in tradestation to prevent automated input. Im curious if anyone has run into this problem with tradestation or any other programs and if there is any way around it?

I was thinking of just writing what I need in c++ but I have a feeling it still might not work.

Any ideas?

Thanks for any help

Share this post


Link to post
Share on other sites
water

What does the AutoIt Window Info Tool display for the controls you try to automate?

What have you tried so far? Can you post the code?

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
elmutt

Im just trying a very basic script before I do anything major. Ultimately I want to do some automated data downloading but right now im just trying to make anything work:

WinWaitActive("TradeStation 9.1 - Desktop #1 - StockResearch1")

Send("This is a test")

MsgBox(0, "Tutorial", "Hello World!")

The message box comes up but the text does not get entered. When used on notepad the text gets entered fine. Exact same deal with autohotkey, I can get it to beep when the script is run but mouse clicks and keyboard input do nothing at all.

Share this post


Link to post
Share on other sites
water

I would give ControlSend a try because Send is not very reliable for what you try to do.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
elmutt

I tried

ControlSend("TradeStation 9.1 - Desktop #1 - StockResearch1", "", "[CLASSNN:Edit47]", "test string")

and it does nothing in tradestation.

Also the mouse clicks work if im doing it for notepad but does nothing for tradestation.

MouseClick("left", 1220, 298, 2) - Works in notepad but does nothing if tradestation is the active window

Edited by elmutt

Share this post


Link to post
Share on other sites
water

What's the return value of ControlSend?

$iResult = ControlSend("TradeStation 9.1 - Desktop #1 - StockResearch1", "", "[CLASSNN:Edit47]", "test string")
MsgBox(0, "", "Result: " & $iResult)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-12-03 - Version 1.4.11.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
JLogan3o13

Is this an actual desktop app, or are you trying to enter data into the website itself? From the website (albeit without creating an account) it appears it is all web based, which if it is Java may make it very difficult to interact with.


√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
peterp

elmutt,

Depending on what you're trying to do, it may be simpler to use TradeStation's EasyLanguage. I'd be happy to give you a hand with that.

peter@tradestation.com

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×