any way to check auto-trade positions in MC? [SOLVED]
-
- Posts: 11
- Joined: 30 Dec 2011
- Has thanked: 1 time
any way to check auto-trade positions in MC?
Is there any easy way to check the position status (number of shares and long/short) of auto-trading in MC so that users can double check if positions in auto trading of MC match the actual positions in brokers (I use IB TWS)? I just couldn't find it. Yes, I can restart auto-trading to re-input initial position as a way to "double check", but any way to check it without interrupt auto-trading? Thanks
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: any way to check auto-trade positions in MC? [SOLVED]
In EasyLanguage, you could use MarketPosition and/or CurrentContracts to get the current MultiCharts strategy position size.Is there any easy way to check the position status (number of shares and long/short) of auto-trading in MC so that users can double check if positions in auto trading of MC match the actual positions in brokers (I use IB TWS)?
The reserved word MarketPosition_at_Broker can be used for getting the current position at the broker. It's brother, MarketPosition_at_Broker_for_The_Strategy, might also be helpful for your goal.
-
- Posts: 11
- Joined: 30 Dec 2011
- Has thanked: 1 time
Re: any way to check auto-trade positions in MC?
I added those four parameters into my strategy script as
"print(MarketPosition,CurrentContracts,MarketPosition_at_Broker,MarketPosition_at_Broker_for_The_Strategy);"
I always get 0 0 0 0 output even I do have some positions. Of course, I am using powerlanguage editor of MC. Does powerlanguage support those four variables?
I actually just want to have a way to double check broker actual positions and MC positions. My strategy runs 10 stocks and everyday it takes me little while to input initial positions when I turn on auto-trade. After inputting all initial positions, I want to review my 10 inputs to make sure everything is ok. With 10 stocks, relatively easy to give a wrong initial position.
Thanks
"print(MarketPosition,CurrentContracts,MarketPosition_at_Broker,MarketPosition_at_Broker_for_The_Strategy);"
I always get 0 0 0 0 output even I do have some positions. Of course, I am using powerlanguage editor of MC. Does powerlanguage support those four variables?
I actually just want to have a way to double check broker actual positions and MC positions. My strategy runs 10 stocks and everyday it takes me little while to input initial positions when I turn on auto-trade. After inputting all initial positions, I want to review my 10 inputs to make sure everything is ok. With 10 stocks, relatively easy to give a wrong initial position.
Thanks
In EasyLanguage, you could use MarketPosition and/or CurrentContracts to get the current MultiCharts strategy position size.Is there any easy way to check the position status (number of shares and long/short) of auto-trading in MC so that users can double check if positions in auto trading of MC match the actual positions in brokers (I use IB TWS)?
The reserved word MarketPosition_at_Broker can be used for getting the current position at the broker. It's brother, MarketPosition_at_Broker_for_The_Strategy, might also be helpful for your goal.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: any way to check auto-trade positions in MC?
Hello Stonebrook2011,
PowerLanguage support these four code words (MarketPosition, CurrentContracts, MarketPosition_at_Broker, MarketPosition_at_Broker_for_The_Strategy).
Please refer to the Wiki links provided by Jsh above for description and usage examples.
Please keep in mind that these functions can only be used in signals.
Some of them are working only when the auto trading is enabled.
Please make sure you are using the code words in the signal code and the auto trading is enabled.
You may also find interesting this topic regarding automatic market position synchronizer scripts.
PowerLanguage support these four code words (MarketPosition, CurrentContracts, MarketPosition_at_Broker, MarketPosition_at_Broker_for_The_Strategy).
Please refer to the Wiki links provided by Jsh above for description and usage examples.
Please keep in mind that these functions can only be used in signals.
Some of them are working only when the auto trading is enabled.
Please make sure you are using the code words in the signal code and the auto trading is enabled.
You may also find interesting this topic regarding automatic market position synchronizer scripts.
- t-rader
- Posts: 139
- Joined: 02 Feb 2011
- Location: Australia
- Has thanked: 11 times
- Been thanked: 27 times
Re: any way to check auto-trade positions in MC?
Hi,
Can MarketPosition_at_broker be used with any broker?
The wiki doesn't mention any broker restrictions with this but in the PowerLanguage Editor when I select this from the Keyword Reference the description states:
'This function can only be used with Interactive Brokers, Patsystems, and Zen-Fire.'
Cheers,
Can MarketPosition_at_broker be used with any broker?
The wiki doesn't mention any broker restrictions with this but in the PowerLanguage Editor when I select this from the Keyword Reference the description states:
'This function can only be used with Interactive Brokers, Patsystems, and Zen-Fire.'
Cheers,
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: any way to check auto-trade positions in MC?
Hello t-rader,Hi,
Can MarketPosition_at_broker be used with any broker?
The wiki doesn't mention any broker restrictions with this but in the PowerLanguage Editor when I select this from the Keyword Reference the description states:
'This function can only be used with Interactive Brokers, Patsystems, and Zen-Fire.'
Cheers,
MarketPosition_at_broker can be used with any supported broker.
There are some peculiarities with MIG bank and Trading Technologies though.
MIG bank does not provide market position. It is calculated by MultiCharts after the broker profile has been connected.
TT API does not show a position opened the day before. Entry Price is provided as average of all completed long(short) trades for the day.
We will update the information in the help file.