OK. about TicketID, you can think it as a unique identity for each position you have. I think this should be a widely accepted method to track the trading activities.
I believe every broker will provide a table looks like this:
Code: Select all
Position Table At Broker Side ( or pos_at_broker )
ticketID Acount Symbol Lots side Price . . .
11101 12131 .. . . .
11102 12134 .. . ..
11103 1435 . . . ..
. . .
we synchronize above table with our software side position table
Code: Select all
Position Table Inside Software ( or pos_at_inside )
ticketID Acount Symbol Lots side Price . . .
11101 12131 .. . . .
11102 12134 .. . ..
11103 1435 . . . ..
. . .
and at the same time we maintain a table which looks like this
Code: Select all
Strategy Position Table ( or stg_pos_tab )
ticketID StrategyName . . .
11101 strategy_01 . . .
11102 strategy_02 . . .
11103 strategy_01 . . .
. . .
by cross reference two tables inside software, we can quickly spot the position of a strategy. when some technical problem happens (network is down, power is off, power plant blows off, etc... ) and later we come bace online, we only need to do is
Code: Select all
1. synchronize from "pos_at_broker" to "pos_at_inside",
2. then compare "pos_at_inside" and "stg_pos_tab"
2.1 find out the intersections of the two tables with the help of ticketID, and then re-assign those positions automatically.
2.2 find out the difference between two tables, and notify the trader that these trades have gone, and assgin initial market positions as 0.
2.3 or some new trades generated by some pending orders, notify and let the trader handle them right away or later.
Maybe different pople will come up with different processes , but only you provide us the unique identity of trades or positions can let us to do it. By now,as I know, MC can only gives us a position number at some symbol. If we only trade one strategy on the same symbol that is not a big problem though.
So What I'm asking is quiet sample: where and how can I get this ticketID within MC?
BTW I just think out a very useful feature relate to table "stg_pos_tab". You can add a column called "childWindowHandle" which is the window handle of the chart where the strategy is running on. and add
a right mouse popout menu named as "Open Running Chart" for "strategy positions" tab in "Order and Position Tracker" window. By click this menu, MC just find the right chart for us and put it at top of all windows. This feature should be handy if many many charts are running. hahaha...
Maybe I should request a new feature in your PM.
Hello Oliveagle.
When you turn off the auto trading - the strategy position becomes zero.
You need to specify the position manually for each strategy. Please do the following:
Format-> Strategy properties-> Auto trading-> Assign the initial market position at the broker setting->Show the assign the initial market position at the broker dialogue-> Show always-> Ok.
When you start the auto trading - a dialogue window will appear where you can set the position for the strategy. This is how you can synchronize it (continue the trading from the position where you have left it).
Position on the broker cannot be divided between multiple strategies automatically (by means of the "syncronizer" scripts). If you are trading with multiple strategies on one instrument - you need to assign the position manually for each strategy.
Please describe your question with TicketID. How do you want to process this value, and what is your final goal.