MarketPosition_at_broker

Questions about MultiCharts and user contributed studies.
alex522
Posts: 42
Joined: 31 May 2010
Has thanked: 20 times
Been thanked: 2 times

MarketPosition_at_broker

Postby alex522 » 31 May 2010

Had anybody use the new "MarketPosition_at_broker" function?

I found this function return very unreliable. When I have a open position in the broker (I am using IB). most of the time it will return 1 but sometimes it will return 0. That make my signals sometimes generate the wrong quantities of order to IB that exceed my risk margin. And that's very dangerous!

Anybody got a solution?

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

Postby Emmanuel » 01 Jun 2010

Hi

This is interesting, I had the same bug, from time to time MC buy even if my previous position is not closed.

I am looking as well for a solution

Brian Chung
Posts: 4
Joined: 11 Sep 2009

Postby Brian Chung » 01 Jun 2010

I found this problem, too.
Then, I tried MarketPosition_at_Broker_for_The_Strategy.
I think this function work correctly.

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

Postby Emmanuel » 02 Jun 2010

Hi Brian,

I didn't know this function :?

Thank you very much Brian for this information. :D

alex522
Posts: 42
Joined: 31 May 2010
Has thanked: 20 times
Been thanked: 2 times

Postby alex522 » 04 Jun 2010

Thanks Emmanuel and Brian for your reply. Now I know there are others faced with the same symptom and that's not just happen in my setup.

I will try the MarketPosition_at_Broker_for_The_Strategy to see if that solve the problem.

Thanks.

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 485 times

Postby Dave Masalov » 08 Jun 2010

Dear Sirs,

The MarketPosition_at_broker works this way: IB sends the value to MC, MC saves it and returns this value at MarketPosition_at_broker. Which means that if the value is not correct - it is the IB problem.

KeyDiver
Posts: 8
Joined: 29 May 2010
Location: Trinity, Florida

Postby KeyDiver » 21 Jun 2010

Dear Sirs,

The MarketPosition_at_broker works this way: IB sends the value to MC, MC saves it and returns this value at MarketPosition_at_broker. Which means that if the value is not correct - it is the IB problem.


Dear Dave,

I don't think so. Including me, there are now four people who are trying to use MarketPosition_at_Broker and finding that it does not work reliably. I am looking at my TWS open positions and running a simple strategy that reports MPaB as "0" (flat) when I am "-1" (short). TWS fires the UpdatePortfolio event frequently so any mismatch should be corrected within a minute or so. Should I send you pictures at the support email address?

Andy

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 485 times

Postby Dave Masalov » 22 Jun 2010

Dear Andy,

I have discussed the problem with our programmers. Could you please send us the screenshots with the description of the problem as well as your log files to dmasalov@multicharts.com?

You can find log files here "%USERPROFILE%\Local Settings\Application Data\TS Support\MultiCharts\".

You should paste this line in Start --> Run and in the window that will pop up make a zip-folder.

If the zip-folder is too big to send by e-mail, you can send it via http://rapidshare.com/ or our Live Chat.

KeyDiver
Posts: 8
Joined: 29 May 2010
Location: Trinity, Florida

Postby KeyDiver » 22 Jun 2010

Dave,
I will put together a package tonight and get it to you.
Thanks,
Andy

janus
Posts: 755
Joined: 25 May 2009
Has thanked: 41 times
Been thanked: 84 times

Postby janus » 09 Jul 2010

I've started to use MarketPosition_at_Broker and discovered, at least in v5.5 that it returns the number of contracts long (>0) or short (<0) or flat (0), not the documented 1,0 -1. I prefer it the way it works, not the way it's documented. Is the documentation is wrong, at least in v5.5?

oakshadows
Posts: 33
Joined: 01 May 2007

Postby oakshadows » 09 Jul 2010

Fantastic ! I agree with Janus: Leave the way it works as is and change the description of how it works in the manual. Or, change the way it works to resemble MarketPosition and add a new CurrentContracts_at_Broker to resemble CurrentContracts now in available.

janus
Posts: 755
Joined: 25 May 2009
Has thanked: 41 times
Been thanked: 84 times

Postby janus » 10 Jul 2010

So, what's the latest on this? Also, do we all agree that the behaviour of MarketPosition_at_Broker as I described is the right one and will remain that way?

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 485 times

Postby Dave Masalov » 14 Jul 2010

Dear Sirs,

There is an error in the Help regarding MarketPosition_at_Broker behavior. It will be fixed soon. MarketPosition_at_Broker works as it is supposed to.

janus
Posts: 755
Joined: 25 May 2009
Has thanked: 41 times
Been thanked: 84 times

Postby janus » 14 Jul 2010

Thanks Dave - that's good news.

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 485 times

Postby Dave Masalov » 15 Jul 2010

Dear janus,

You are welcome.


Return to “MultiCharts”