I want to long or exit after certain number of positions, based on the last position is 10% profit or 10% loss. For example, currently I longed three times, then a new trading signal was triggered, however I want to take action when the last position is 10% profitable. I checked quick reference, there is no profitability property of Position object. Do I have to calculate the profit of the current position manually? how to do that by coding please? Thanks for your help in advance.
Size:
Color:
QUOTE:
I checked quick reference, there is no profitability property of Position object.
Are you sure? How about:
NetProfitAsOfBar
NetProfitAsOfBarPercent
(In addition to NetProfit and NetProfitPercent which are designed for use in Performance Visualizers).
Size:
Color:
thanks so much.
Size:
Color: