Know account name in a script
Author: abegy
Creation Date: 3/30/2012 4:22 AM
profile picture

abegy

#1
I would like to know if there is a way to know the account name when we run a script in the strategy monitor
profile picture

Eugene

#2
No guarantees but you could try parsing the StrategyMonitorConfiguration.xml file:
CODE:
Please log in to see this code.
profile picture

abegy

#3
I try to do what you recommended to me last time but I have a problem.

I have several strategies in the Strategy Monitor and not all strategies are linked to the same AccountNumber.
When I look the XML file, Strategy Name is not writing in the XML file with a text format (but with a code).

I know how to catch Strategy Name in the script but I don't know how to link with the code in the XML file.
Is there a solution ?
profile picture

Eugene

#4
QUOTE:
I have several strategies in the Strategy Monitor and not all strategies are linked to the same AccountNumber.
When I look the XML file, Strategy Name is not writing in the XML file with a text format (but with a code).

Could you clarify, please? As I do not understand.
profile picture

abegy

#5
I have in the Strategy Monitor :
- StrategyA with account A
- StrategyB with account A
- StrategyC with account B
- StrategyD with account C

How can I found account in this case strategy by strategy ?
Thanks a lot
profile picture

Eugene

#6
It does not matter.

Loop by StrategyCenterItem in the array. Each item has an AccountNumber.
profile picture

abegy

#7
In the XML file, I have only the StrategyID that I don't know how to associate with the strategy name.
How can I know that StrategyA is StrategyID 123 ?

I will try to explain what I would like to do.
In my strategies, I have specific parameters that they are linked to the account (ex. : buy power is not the same depending of my broker contract).
It is for this reason that I want to know what is the account that Strategy Monitor is using with the strategy under execution.

profile picture

Eugene

#8
Forget about Strategy names.

Wealth-Lab identifies Strategies by their Guids - this is the StrategyID field which is the Strategy's unique identifier. And you have the account in AccountNumber. Here's how to find out the current Strategy's Guid:
CODE:
Please log in to see this code.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).