This topic contains 35 replies, has 1 voice, and was last updated by fxtrd 3 years, 2 months ago.
Nov 16, 2017 at 10:02 pm #1231
Anybody has any ideea of FXCM TradeStation API’s?
… and I’m not talking about DynaOrder, that’s to simple, I need something that allowes me to place complete orders, with SL and TP, not just market orders … and doing this from my own build software … I’m an programmer so I can understand prety much all the programming languages … I only need a few pointers …
I’m sure that somebody else tryed to crack this. At this point I’m able to get the account status, the opened position and the dealing rates using callback’s and hooks.
If you have any ideeas on what I’m talking about, please share …
Thx00Nov 16, 2017 at 10:02 pm #1232
Try contacting REFCO directly refcogroup dot com00Nov 16, 2017 at 10:02 pm #1233
Already tryed that … twice by email and once by chat … that was the first thing that I’ve tryed before getting desperate and post this …
Anyway … talking about those official API’s, only for accounts greater than 25k (or something like that), but the thing that I don’t understand is why they doesn’t have some trial period to test whatever strategy the client is going to try for real …
More than that … seems that there is not really an API, is more like an script that they are implement on your real account … and I don’t want that … I’ve worked on my strategy for a long time and I don’t want to give it away for free.00Nov 16, 2017 at 10:02 pm #1234
Have you tried emulating the Market Order dialogue box’s communication with the main window? perhaps it sends some windows messages with the order information to the main window. I’m not sure how to intercept these messages.00Nov 16, 2017 at 10:03 pm #1235
I’ve tryed that … in some way … it uses too many external procedures and I don’t know all the parameters …
One way is to use the SendMessage() procedure to “click” the “Entry” button, then setup all fields through the same procedure and finnaly press “go” … but I guess this can cause too many problems afterwards, plus there is some timeouts because internet communication that I don’t know how to deal with …
What I’m after is the same procedure used by Dynaorder or Fabrefactum Bot.
Now I’m going to try decoding the traffic that TS is doing with FXCM server … seems to be HTTP type …10Nov 16, 2017 at 10:03 pm #1236
you could probably make the Market Order window not visible and then enter in the order info via SendMessage and work “behind the scenes” of the computer user. Then you can continiously poll the Orders window to see when the order got executed. Also you can use ping to check if the internet is still alive.
Why are you using FXCM anyway? f o r e x . c o m offers an API if you ask them for it. it is a SOAP based API.00Nov 16, 2017 at 10:03 pm #1237
I think this maybe what you are looking for: traderobot dot com00Nov 16, 2017 at 10:03 pm #1238
That costs $500. wayy too expensive for someone who can write such a program for himself with a little work.
The free version doesn’t let us put in our own strategy it seems….00Nov 16, 2017 at 10:04 pm #1239
well … even if I wanted to pay to use some kind of automated trading software, I can’t … I’ve seen many applications but no one can do what I’m after … well … almost no one, with Metatrader, for example, I can, it’s prety complicated but the bottom line is that I can, but not in a million years I’m going to send my money in Latvia …
I’ve choosed FXCM because is respectable, has almost no slippage, guaranteed SL and TP … anyway … now I see that even Gain Capital (FOREX.com) and GFT-Forex has almost the same features … if I’m not gonna get to the bottom of this with FXCM, I will lower my demands and go with those other brokers … btw … I really don’t care much about the spread … but I care about the broker reliability and seriousness.
So … tradebot is out and I don’t consider that the “hooks and callbacks” solution is decent for a real programmer.
I’ve traced some of the procedures called by the FXTS with an API spy software and the messages passed through winsock2 … so for now I will take this direction …
Thank all for the sugestions, please continue posting if you have any ideeas … even a remote one … at this point I’m more than content with anything you’ve got10Nov 16, 2017 at 10:05 pm #1240
Check my last post on this thread for info on Gain’s API. I am not using it myself, but would appreciate any feedback from your efforts.
Appreciate posts of your evaluation of them on either thread, I am subscribed to both.
Gain Capital has an excellent reputation.
Gordon10Nov 16, 2017 at 10:05 pm #1241
Try contacting TradeStation, they have a feed00Nov 16, 2017 at 10:05 pm #1242
Well, as I’ve seen a lot of solutions to my problem I came to a conclusion, this is crap … and I will argument this…
One of the first things that I’ve learned at the beginning was that a trade order is composed like this:
+ [StopLoss] + [TakeProfit]
Am I wrong or what? Well, what ever you’re going to say, I never enter in a trade without at least SL set … I’m not stupid…
Because one should always know before enter a trade how much is going to win, or how much is accepting to loose.
In FXCM’s Trade Station (and in others) you can an order like that above … why does anybody else don’t do something like that?
Eg. BuyMarket(pair, lot’s, sl, tp)
… of course, you can monitor yourself when an SL or TP is hit and close position, but what’s happen in this case, with those guaranteed execution on SL and limit orders that FXCM and others brag about? In this case you will take all the slippage hit… right?
Well, in some cases (like Gain API’s) you can place an simple order and later you can modify it to set SL and TP because the complex order like “PlaceSingleOrder” or “PlaceOCOOrder” takes about 60 seconds to be placed in the order process (and this doesn??????t mean that is going to be executed), in some other cases the internet connection can cause problems.
I still can’t understand why FXCM and Refco keep’s their API’s secret, more than that, why every single time that I have sent an email requesting info, they never answer me? Or why every single time that I chat online with their technical advisors, they keep sending me to those people that never answer by email? Why Oanda’s API cost that much? Maybe to keep it out of reach?
I’m being paranoid here, but why they keep secret something that should be public and free? Conspiration Theory?
And, despite what anybody says about “Automatic Trading”, let’s take something into consideration:
There are at least 3 “most-important” facts:
1. There should be at least one strategy with specific rules (enter, exit, SL, TP)
2. discipline should be the first quality that a trader should have
You can use your knowledge to make those rules understanded by a computer (through programming) and benefit from computer discipline to execute trades perfectly. Everybody knows that FOREX is a 2-way market and the prices can go only up or down (well … can go sideways for a while), so pretty much you can use any damn indicator or astrological prediction (if you want) to be right 50%+1 trade (you can try that through backtesting, you??????re be amazed how many indicators give that 50+), that’s it and here’s your profit … do it 1.000.000 times and you’re rich, a computer can do it for you, if it has the means … and without letting human mind interfering.
As I said, a computer can do it if it has the means … but from what I’ve observed, it has not, it is not allowed to, you are not allowed to … so, all this being said, despite of their rules, I will keep on trying to beat the system by hacking into their software (for example), I don’t like this one bit (using hooks and callbacks) but since I have no other options, I’ll do it.10Nov 16, 2017 at 10:06 pm #1243
forgive me if you have covered this ground before and decided it is not for you….
….and I know you started out by saying dynaorder is not how you want to do it….
It seems to me, a “wish-I-was” programmer, that a complete order could be placed using the dynaorder calls, even if those calls were done in sequence within a script.
The sequence using dynaorder calls would be
send the order
check to see if the order executed
continue checking until it returns true
send stoploss (or oco) order
check until it returns true
The script would not be finished until all operations were complete. I realize my outline is very rough, and I know full well when you begin to program you discover many other steps to handle all your what-ifs. … like what if the order is not accepted…how long do you wait….etc,
could a script that executes a gain order with their api continue in sequence until all parts of the order are complete?
Keep us posted,
PS: I have real money accounts at both Gain and Fxcm and both of them can reject orders during certain market conditions.10Nov 16, 2017 at 10:06 pm #1244
well … I can use that sequence, but my problem with it is that I have an 32-128 kbps internet connection (min and max) with about 90%/day link with http://www.fxcorporate.com (wich is the main fxcm transaction server) and an average 1000 ms access response time, this is pretty weak, I cannot afford an larger band because, for example 1MBps costs around 1.000$+VAT plus rent for equipment (total cost is about 1.500$/month), I’m from romania, btw… this is why I don’t trust this kind of “script”, I have great chances that the open order will execute and the TP or SL order will not (in useful time), that’s why I need a complete order setup, in this way that order will or will not execute without any real damage … I did have some bad experience with my internet connection in the past … and I should admit, I did have some mouse caused damage (was wireless and my batteries went dead just before closing a trade … but this was off-topic).
… and, as you have guessed by now, I’m an scalper, I trade for a few pips, I do scan the market for anomalies and take advantage of them … and more than that, I do not trade within market opening hours, fundamentals releases, or news activity … only on quiet market time … for this reasons, most of my orders will execute.
I have not succesfully tested dynaorder because I cannot send any orders to the server, maybe is some problem with my operationg system (I did have some problem on installation), even though the rest of functions worked perfectly, but pretty much I’m confident that can work; I did have studied in details all the DO API functions available for VB6 and those from Gain …
since now, for automated trading testing purposes, I used MetaTrader, wich is btw an work of art, and my own software with DDE link to MT, API link to DO, system hooks to FXTS, and for backtesting purposes, with 10sec data from dukascopy website …10Nov 16, 2017 at 10:06 pm #1245
Since Metatrader seems to be fitting your desires, except your concern about brokers, you may want to look at my thread US Brokers using Metatrader. I would seriously consider Metatrader based on your descriptions. There are many reliable brokers with the Metatrader platform.00
You must be logged in to reply to this topic.