Major Error/BUG with Position Sizing

Questions about MCFX and MCFX Data Feed.
kevin kolodzy
Posts: 64
Joined: 25 Jan 2008

Major Error/BUG with Position Sizing

Postby kevin kolodzy » 18 Feb 2008

My strategy specifies the number of contracts to go long or short. Position sizing is set to range from 1 to 3 mini contracts (10,000 to 30,000 units). The strategy on the chart shows the correct size.

However: the actual quantity bought or sold does NOT match - I've had positions open today with 40,000 and 50,000 units, which is absolutely in error. I see no way to reconcile this situation with what is supposed to happen, and I've never had this occur with TS. The worst case is a buy on NZDUSD which the chart shows as 10,000, but 50,000 was bought. I also write each trade signal to a log file, and that also shows 10,000.

This needs to be figured out immediately or I cannot use MCFX further. I can't begin to figure out what could have happened, and would like the people at tssupport to see if they can replicate this - it will require a live test, I think, to duplicate the conditions fully.

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 19 Feb 2008

Kevin,
Could you send us your script? If it is proprietary could you replace your logic with dummy, but leave the money management rules?

kevin kolodzy
Posts: 64
Joined: 25 Jan 2008

Postby kevin kolodzy » 19 Feb 2008

Andrew,

Yes, I'll replace the proprietary entry code and send you a copy within 24 hours. Much of the other code is very "sensitive" so I ask that you do not publish it anywhere, and use it only internally to try to replicate the problem.

I will include a workspace with the appropriate pair and settings for which the problem occurred.

I suspect that this may be a problem with the API interface between MCFX and Order2Go. Perhaps a counter or sizing parameter variable does not get reset in certain circumstances, or "leaks" over from another chart's trades. Several trades since the ones in question have had the correct quantity.

kevin kolodzy
Posts: 64
Joined: 25 Jan 2008

Postby kevin kolodzy » 19 Feb 2008

Sample code and workspace has been sent for your analysis. Thanks.

So far today, the latest 2 trades are showing double the number of positions they should (60,000 units for one, 20,000 for the other), even though the maximum size setting in the format strategy dialog is set to the max I want to allow (30,000 units and 10,000 respectively). The chart shows the correct size, as does my trade log file.

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 20 Feb 2008

Thanks you! Kevin, I will run it tomorrow and comment all your observations.

beck donald
Posts: 199
Joined: 25 Jan 2008
Has thanked: 2 times
Been thanked: 7 times

Postby beck donald » 20 Feb 2008

I suspect and have assumed this is the same /similar root issue that prevents more than one chart per a pair to be traded. If it is any help to diagnose the issue, early on I tried to run the pyramid option on a signal position strategy to verify if my more complex position scaling code would work (it won't).

While the chart generates signals, no trades beyond the first signal takes place. Also of note was the fact that with each additional long signal, the position size under the signal remained constant, meaning, it did not increase with each consecutive signal. The trade size was incorrect some of the time.

I am sure you can select any "can" signal and run it on a FXCM demo with chart at very high speed time (1 minute) or tick(2 tick) pyramid option on (say to 5 positions) and it will show you in short order the mismatch.

Regards,
Don

kevin kolodzy
Posts: 64
Joined: 25 Jan 2008

Postby kevin kolodzy » 20 Feb 2008

Whatever the root cause, I expect that it will get fixed in reasonable time. (The sooner the better, but I'd rather it be right than fast!) Order entry is at the core of all automation, and without reliability in this key area, not much else matters.

Correct entries (both market and limit orders), correct sizing of positions, pyramiding, and correct position matching are critical. I don't presently use pyramiding, but may in the future - all the rest is essential to my ability to trade successfully and with reasonable confidence.

One thought did occur with your mention of multiple charts with the same symbol, Don. Could a chart with a NON-automated strategy (used for reference or to research new ideas, for example) be LEAKING position size info INTO a live automated chart? Perhaps it could cause simultaneous signals to be ADDITIVE. This really should not happen (it absolutley does not in happen TS, for example), but given the often poor integration between one software application and another via an API, it would not surprise me if this happens here.

beck donald
Posts: 199
Joined: 25 Jan 2008
Has thanked: 2 times
Been thanked: 7 times

Postby beck donald » 20 Feb 2008

Kevin,
Whatever the root cause, I expect that it will get fixed in reasonable time. (The sooner the better, but I'd rather it be right than fast!) Order entry is at the core of all automation, and without reliability in this key area, not much else matters.
Over the years, I have found it important to try and figure out a way to live with what is in place while working with the software company towards changes that will improve the situation.
Correct entries (both market and limit orders), correct sizing of positions, pyramiding, and correct position matching are critical. I don't presently use pyramiding, but may in the future - all the rest is essential to my ability to trade successfully and with reasonable confidence.
I agree. I have no idea why the automation does not poll the data server, trade server and chart to look for connectivity and have alarms and alert emailing along with checking for correct operational capability and the correcting of an out of sync position. A list of fail safe issues could be generated without much issue and make the user feel in control rather than wondering shat shoe is going to drop next. This is not to say anything about MCFX specifically, but trade automation as a whole. So far my testing with MCFX and FXCM have been really good. No disconnects, false or missing trades.
One thought did occur with your mention of multiple charts with the same symbol, Don. Could a chart with a NON-automated strategy (used for reference or to research new ideas, for example) be LEAKING position size info INTO a live automated chart? Perhaps it could cause simultaneous signals to be ADDITIVE. This really should not happen (it absolutely does not in happen TS, for example), but given the often poor integration between one software application and another via an API, it would not surprise me if this happens here.
In the case of my earlier tests where trade sizes were not correct, I only had one chart within one open workspace. So I doubt that would be the cause.

Don

kevin kolodzy
Posts: 64
Joined: 25 Jan 2008

Postby kevin kolodzy » 20 Feb 2008

I haven't had any problems with disconnects either, which is a welcome improvement over that other platform!

I have had some missing trades in the last couple of days that are clearly missing, and not simply because I was using contracts instead of units for sizing. Whether the missing trades are related to the incorrect position sizing issue is hard to say, but it could be the case so I'm waiting to see the outcome of the sizing issue before getting too upset about it!

Scuba Steve
Posts: 3
Joined: 11 May 2007
Location: Bolton Landing, NY & Las Vegas, NV
Contact:

Postby Scuba Steve » 20 Feb 2008

Funny how our miserable experiences with TS server disconnects has lowered our expectations.

I am so pleased to read that server connectivity in practically a nonissue here at MCFX!

I must however echo the sentiments expressed by Kevin Kolodzy. The importance of our FXCM account(s) being 100% in sync with our strategies running in MCFX charts is too obvious to assume otherwise. Our money depends on this!

Please TS Support, fix the disconnect so that “the left hand knows what the right hand is doing ALL the time”. A trader who focuses on automated systems trading requires a much higher level of confidence in his platform-data feed marriage than the discretionary trader.

Eagerly awaiting the fix,

~Scuba

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 22 Feb 2008

Update:
We carefully analyzed the the reported issue and found that it was always in our program. I can’t understand why our QA or users didn’t catch it before.
The problem connected with wrong market position we get from broker. The problem is sometimes it works and sometimes it doesn’t. We don’t blame FXCM for the problem.
I assum we simply don’t use the API properly. We are working on it right now and I’m quite sure we will fix it in the next version that will support stop/limit orders.

As a temporary solution I suggest to use confirmation window and manually check every order before send it to your broker. It is not practical, but I have no better idea so far…
Our company apologizes for the inconvenience.


Return to “MCFX”