Keeping MC synced with the broker (MarketPosition_at_Broker, etc) - MultiCharts | futures io social day trading
futures io futures trading


Keeping MC synced with the broker (MarketPosition_at_Broker, etc)
Updated: Views / Replies:1,238 / 9
Created: by jesse514 Attachments:4

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Keeping MC synced with the broker (MarketPosition_at_Broker, etc)

  #1 (permalink)
Trading Apprentice
Montreal, QC
 
Futures Experience: Intermediate
Platform: MultiCharts, Ensign, Sierra, IB/TWS
Favorite Futures: CL
 
Posts: 11 since Apr 2014
Thanks: 5 given, 5 received

Keeping MC synced with the broker (MarketPosition_at_Broker, etc)

I've found that if I'm running a strategy and holding a position, but then I restart MC or the strategy, MC gets out of sync with the broker. For example if I'm +1 (long) on an "always in" strategy, and the strategy should short, it sells 1 contract and makes me flat instead of selling 2 to reverse positions to -1, since it's not taking MarketPosition_at_Broker into consideration.

So far my research tells me that doing something like this would likely fix it:
 
Code
variables:
vMktPos( MarketPosition_at_Broker ), 
vMktPosStrat( MarketPosition_at_Broker_for_The_Strategy );

If vMktPos = vMktPosStat then <buy or sell like I usually would do> ;

if vMktPos=1 and vMktPosStrat=0 then <on sell signal, sell short 2 contracts instead of 1>;

and so on...
But are there easier ways to achieve this that require less customized code for each strategy? Off the top of my head:

1) Being able to set MarketPosition_at_Broker_for_The_Strategy to equal MarketPosition_at_Broker would fix this

2) Maybe there is a command to buy/sell short which changes the position based on what MarketPosition_at_Broker is. So for example I could then "Sellshort so that position = -1" and it wouldn't matter if I'm flat or at +1 or at +2, etc, it would just sell the necessary number of contracts so that the position becomes -1.

Any ideas/suggestions? Thanks!

Reply With Quote
 
  #2 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

jesse514,

what settings are you using in the last part of the Strategy Properties "Auto Trading" tab?

You could also try the build in !From Strategy To Broker MP Synchronizer! and !From Broker To Strategy MP Synchronizer! signals.

Regards,
ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #3 (permalink)
Trading Apprentice
Montreal, QC
 
Futures Experience: Intermediate
Platform: MultiCharts, Ensign, Sierra, IB/TWS
Favorite Futures: CL
 
Posts: 11 since Apr 2014
Thanks: 5 given, 5 received


Great! I added the "!From Broker To Strategy MP Synchronizer!" signal and it seems to be exactly what I needed. Thanks again!

As for my signal settings on the Auto-Trading tab, I've attached a screenshot. Would you have me change anything?

Attached Thumbnails
Keeping MC synced with the broker (MarketPosition_at_Broker, etc)-auto-trading_tab.png  
Reply With Quote
 
  #4 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

jesse514,

you are welcome. Your automation settings look okay.

If you want you can try out "Async" mode and see how this effects the issue you are currently having.

Regards,
ABCTG

Reply With Quote
 
  #5 (permalink)
Trading Apprentice
Montreal, QC
 
Futures Experience: Intermediate
Platform: MultiCharts, Ensign, Sierra, IB/TWS
Favorite Futures: CL
 
Posts: 11 since Apr 2014
Thanks: 5 given, 5 received

ABCTG,

"!From Broker To Strategy MP Synchronizer!" with the default settings of TimeOutMS=250 and LatencyMS=500 has turned out to be behave strangely. Every single trade is doubled in MC's performance report. See attached screenshots of MC history vs the broker's history.

This is simply a MACD always-in reversal system I'm testing. Without the synchronizer it works fine. The strategy began when the broker was +1, so I expected one initial internal sync trade, after which things would function normally since the broker and the strategy were in sync. Would you have any idea of why it is instead behaving like this?

thanks again.

Attached Thumbnails
Keeping MC synced with the broker (MarketPosition_at_Broker, etc)-syncing.png   Keeping MC synced with the broker (MarketPosition_at_Broker, etc)-syncing2.png  
Reply With Quote
 
  #6 (permalink)
Trading Apprentice
Montreal, QC
 
Futures Experience: Intermediate
Platform: MultiCharts, Ensign, Sierra, IB/TWS
Favorite Futures: CL
 
Posts: 11 since Apr 2014
Thanks: 5 given, 5 received

According to this thread, it is likely a latency issue: https://www.multicharts.com/discussion/viewtopic.php?f=5&t=9905

However this thread also mentions ChangeMarketPosition which is perhaps what I should be using. Something like this:

 
Code
if MarketPosition_at_Broker <> MarketPosition_at_Broker_for_The_Strategy then
ChangeMarketPosition( MarketPosition_at_Broker, etc ..........

Reply With Quote
 
  #7 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

jesse514,

you might want to limit the ChangeMarketPosition execution to once when you start (restart) the signal. Also using this check means you should avoid trading the same market from more than one chart.

Regards,
ABCTG


jesse514 View Post
According to this thread, it is likely a latency issue: https://www.multicharts.com/discussion/viewtopic.php?f=5&t=9905

However this thread also mentions ChangeMarketPosition which is perhaps what I should be using. Something like this:

 
Code
if MarketPosition_at_Broker <> MarketPosition_at_Broker_for_The_Strategy then
ChangeMarketPosition( MarketPosition_at_Broker, etc ..........


Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #8 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

jesse514,

did you try using the assign the initial market position at broker dialog?

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


This gives you the ability to align the chart position with the broker position.

Regards,
ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #9 (permalink)
Trading Apprentice
Montreal, QC
 
Futures Experience: Intermediate
Platform: MultiCharts, Ensign, Sierra, IB/TWS
Favorite Futures: CL
 
Posts: 11 since Apr 2014
Thanks: 5 given, 5 received

Ah, the "assign the initial market position at broker dialog" definitely seems like a simple solution! I'll only bother with the more complicated coded solutions if I find scenarios where the strategy and broker get out of sync on their own.

I suppose if a bracket order gets triggered during a disconnection from the broker things would get out of sync. It would be nice if there was a simple setting to always assign market position based on broker, not only when starting strategy, and not through a dialog. But I guess that requires some code.

Thanks again ABCTG.

Reply With Quote
 
  #10 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary


jesse514,

we could gather a couple of scenarios of what could happen and how to deal with it. This should be of general interest to many.

Your situation with the bracket order and disconnection would be something to try out in a simulated environment. When you get a disconnection that turns your strategy automation off, there is not much you can do from the strategy code anymore anyway.

Regards,
ABCTG

Reply With Quote

Reply



futures io > > > > Keeping MC synced with the broker (MarketPosition_at_Broker, etc)

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
MC Traders dynamic index -> conveting to MC yiman MultiCharts 12 August 2nd, 2016 11:40 AM
[Forex] ECN broker with micro account for MC ? enjoyaol MultiCharts 8 January 28th, 2013 09:47 PM
Vote 10 years tick data futures synced bid-ask-trade bomberone1 MultiCharts 1 October 23rd, 2011 07:29 AM
Keeping it Simple Silver Dragon Trading Journals 26 September 19th, 2011 06:00 PM
Broker for order execution using MC auto+manual trading SPTrading MultiCharts 18 July 9th, 2011 09:40 AM


All times are GMT -4. The time now is 02:30 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-17 in 0.13 seconds with 20 queries on phoenix via your IP 54.82.56.95