Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Fri Dec 13, 2019 4:54 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: 100% mimic browser or no?
PostPosted: Sat May 26, 2012 2:11 am 
Offline

Joined: Tue Mar 23, 2010 8:44 pm
Posts: 673
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: 100% mimic browser or no?
PostPosted: Sat May 26, 2012 7:46 pm 
Offline
User avatar

Joined: Mon Apr 02, 2007 2:08 am
Posts: 1225
Location: San Francisco, CA, USA
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.

_________________
Boredom Software


Top
 Profile  
Reply with quote  
 Post subject: Re: 100% mimic browser or no?
PostPosted: Sat May 26, 2012 8:07 pm 
Offline

Joined: Wed Mar 22, 2006 11:15 am
Posts: 712
Location: Southern California
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.

_________________
Daniel L. Taylor
Custom Controls for Real Studio WE!
Visit: http://www.webcustomcontrols.com/


Top
 Profile  
Reply with quote  
 Post subject: Re: 100% mimic browser or no?
PostPosted: Sat May 26, 2012 11:15 pm 
Offline

Joined: Tue Mar 23, 2010 8:44 pm
Posts: 673
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group