I am trading live using the ATM in the DOM ladder. I don't always have an ATM strategy going, instead setting my entries and exits manually. I want to be alerted (either audibly or by drawing an object on the chart) when a certain condition occurs while a position is open.
For example, say I have an indicator that alerts me whenever three price bars in a row have 3 equal highs. Now suppose I want the indicator to alert me only if 3 equal highs occur during a profitable open position.
How would I do this? I see methods like GetAtmStrategyMarketPosition() but they require a position ID, which I don't know how to obtain. Another method AvgProfit() seem to take into account past positions, not just the open ones. OnPositionUpdate() requires a strategy, not an indicator. So does the Positions object.
How would I obtain the current open position's running profit or loss within an indicator, not a strategy? The DOM window is able to display this value, so how would I access it from an indicator? For all open positions as well as individual open positions?
-A
Comment