Real Software Forums
http://forums.realsoftware.com/

100% mimic browser or no?
http://forums.realsoftware.com/viewtopic.php?f=2&t=44151
Page 1 of 1

Author:  J.Sh3ppard [ Sat May 26, 2012 2:11 am ]
Post subject:  100% mimic browser or no?

Are there any limitations for an RS app when trying to mimic a web browser?

I have a project in mind for an RS app to login and pretend its a web browser performing a lot of different tasks which a browser does.

I dont know if an RS desktop app can do everything a web browser can?

This is not a normal website. It has more functionality than most websites.

Does anyone know of any limitations of an RS app pretending to be a web browser?

Thanks.

Author:  charonn0 [ Sat May 26, 2012 7:46 pm ]
Post subject:  Re: 100% mimic browser or no?

Exactly how do you need to mimic a browser? If you just need to interact with a webserver via HTTP and it's picky about the User-Agent string then you can just use an HTTPSocket and set the User-Agent request header as needed:
SetRequestHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)")


If you need to actually parse the HTML coming back or interact with the DOM, etc. then that'll be harder.

Author:  taylor-design [ Sat May 26, 2012 8:07 pm ]
Post subject:  Re: 100% mimic browser or no?

If you connect to the web site using sockets then you will not be emulating a web browser. You will only be retrieving the data. It will be entirely up to you to parse that data. Your socket will not automatically download linked files, compile and run JavaScript, render HTML, etc.

If you need to do things just like a human interacting with a real browser, then you will have to either use an HTMLViewer and ExecuteJavaScript to simulate user interaction, or possibly even launch a real browser and simulate mouse and keyboard events.

Author:  J.Sh3ppard [ Sat May 26, 2012 11:15 pm ]
Post subject:  Re: 100% mimic browser or no?

Thank you both for replying.

I am not a web expert so dont know exactly what this project would require.

Here's more info to give you guys an idea.

I am interested in using a desktop app to log into,retrieve data, perform calculations on the data then send order execution data back to the server from my FOREX, Stock and Options broker's web site portal.

Why roll my own?

Because I want to automate my trading and my broker doesn't really provide this.
For the past few years they had a system in place being developed but soon it will not be available and it wasn't available for FOREX or Futures. In was Stock trading only. They said they will have a replacement in the future but who knows how long that will be and whether or not it will do FOREX.

They do have a great desktop app with an API but I don't qualify for API access as I would need $200,000.00 in my account. At least that is what support told me. They did tell me by the end of this year they expect to lower the API requirements as they don't make sense.

I thought about maybe trying to reverse hack the desktop API without their consent but it's probably easier to just fake a web browser using an RS app.


Other brokers have API access and bot trading already but I really like and prefer my broker's charts and setup so if over time I can do this I'll be happy. If not then I may wait until my broker gets what I want or I'll go with someone else.

I have to consider what I'm missing out on compared to how much work it would be.
In the meantime I am manually logging the trades I miss and adding up the results -see below.

Because FOREX trades day and night with the hot sessons for us here in the states starting around midnight pacific with the London session I am missing a lot of good trades. I can't stay up all night then sleep all day. So if I can automate my trading for the night shift I should be able to catch good trades AND sleep :)

Unfortunately I am not wealthy but if I was I'd probably just hire an RS developer to bang it out for me quickly because I'm swamped with too many things going on.

I wonder what a developer would charge me for a project like this?
It's a small project but I would add more functionality to it later.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/