Posted 9/27/2010 07:14:35
|
|
|
|
Hi,
I'm just wondering if it's possible to get the list of recent transactions from code in RightEdge.
What I mean by transaction is information about the position size changed of a particular ticker. For example:
1. Ticker name
2. Direction (long / short)
3. Spot price (e.g. buy price if increasing position / sell price if decreasing position)
4. How much position has been changed?
5. When is the transaction occurred?
Thanks in advance,
Felix Tjung
|
|
Posted 9/27/2010 11:45:37
|
|
|
|
When you ask for change, are you looking at P/L or size? You'll have to call GetOpenPositions in PositionManager. The Position holds the size, opening price (so you can compare against the current price).
felixtjung (9/27/2010) Hi,
I'm just wondering if it's possible to get the list of recent transactions from code in RightEdge.
What I mean by transaction is information about the position size changed of a particular ticker. For example:
1. Ticker name
2. Direction (long / short)
3. Spot price (e.g. buy price if increasing position / sell price if decreasing position)
4. How much position has been changed?
5. When is the transaction occurred?
Thanks in advance,
Felix Tjung
|
|
Posted 9/27/2010 11:56:31
|
|
|
|
The fill information should contain the information you need. There's not a simple way to get the recent fills though. The fills are attached to positions, which may either be in the OpenPositions or ClosedPositions list. I'd recommend adding logic to the OrderFilled method to store the fill/position information in your own queue (you might want to use the RList class for this) which will be ordered by the fill time. Then you'll have easy access to the recent fills.
Thanks,
Daniel
|
|
Posted 9/27/2010 16:48:53
|
|
|
|
I found propert Trades on class RightEdge.Common.Position. Is this the one that I've to check?
Thanks,
Felix
|
|
Posted 9/27/2010 21:36:49
|
|
|
|
Yes, that's the one. In the OrderFilled method, the trade is passed to you so you can also access it that way.
Daniel
|
|
Posted 9/28/2010 08:18:11
|
|
|
|
I think I got what I need from that list.
Thanks a lot,
Felix
|
|
|
|