Can I get the ticket id ?

Questions about MultiCharts and user contributed studies.
oliveagle
Posts: 20
Joined: 07 Jul 2011
Has thanked: 4 times
Been thanked: 4 times

Can I get the ticket id ?

Postby oliveagle » 15 Sep 2011

Question:
Can I get ticket id for each transaction in MC ? some thing like

TicketID Account Symbol Amount Side EntryPrice P/L Time
41150116 0119001 GBPUSD 10k B 1.58140 15.0 9/15/2011 14:40

Or can someone teach me how to monitor the strategy positions in alternative ways?

Backgroud:

It seems that MC doesn't reload strategy positions. So I want to get ticketID and monitor strategy positions by myself.

for example:

Code: Select all

Before we close MC, Strategy Position tab in Order and Position Tracker window shows this:
Name StrategyPosition BrokerPosition AvgPrice Strategy P/L Open P/L
strategy1 1 2 1.5555 $100 $180
strategy2 1 2 1.5454 $80 $180

After I restart MC and left all above positions open, it shows this:
Name StrategyPosition BrokerPosition AvgPrice Strategy P/L Open P/L
strategy1 0 2 .00000 $.00 $180
strategy2 0 2 .00000 $.00 $180
after I restart MC, all strategies position are 0. and because of this , no exit signal will be sent out for the previous open positions.
btw, !From Broker To Strategy MP Synchronizer! and !From Strategy To Broker MP Synchronizer! they are sucks too, if you are trying to trade multiple strategies on the same instrument.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Can I get the ticket id ?

Postby Henry MultiСharts » 16 Sep 2011

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.

oliveagle
Posts: 20
Joined: 07 Jul 2011
Has thanked: 4 times
Been thanked: 4 times

Re: Can I get the ticket id ?

Postby oliveagle » 16 Sep 2011

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 . . . ..
. . .
Image
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.
Image

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.
Attachments
find_correct_chart.png
(37 KiB) Downloaded 406 times
TicketID.png
(31.57 KiB) Downloaded 404 times

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Can I get the ticket id ?

Postby Henry MultiСharts » 19 Sep 2011

Thank you for your interest. We agree that this feature can be useful for experienced traders, for advanced level of trading. Unfortunately it has not been implemented yet. Please submit a feature request to the Project Management of our web site so other users can vote for it: https://www.multicharts.com/pm/


Return to “MultiCharts”