Can my strategy query its own P/L info?

I'm working on something akin to a genetic algorithm, and the most obvious fitness function is my strategy's own P/L data. Is there an easy way I can query this inside the on_strategy_finish() event?

Comments

  • Never mind. I think I figured that part out.

  • ptunneyptunney Posts: 246

    account.account_id                            Account Id
    account.buying_power                          Buying Power
    account.entry_pl                              Entry P&L
    account.mtm_pl                                MTM P&L
    account.open_capital_long                     Open Capital Long
    account.open_capital_short                    Open Capital Short
    account.pending_capital_long                  Capital Long
    account.pending_capital_short                 Capital Short
    account.[self.symbol].pending.capital_long    Capital Long
    account.[self.symbol].pending.capital_short   Capital Short
    account.[self.symbol].pending.count_long      Count of long orders
    account.[self.symbol].pending.count_short     Count of short orders
    account.[self.symbol].pending.shares_long     Shares Long
    account.[self.symbol].pending.shares_short    Shares Short
    account.[self.symbol].position.capital_long   Capital Long
    account.[self.symbol].position.capital_short  Capital Short
    account.[self.symbol].position.entry_price    Entry Price
    account.[self.symbol].position.mtm_price      MTM Price
    account.[self.symbol].position.shares         Position Shares
    account.[self.symbol].realized_pl.entry_pl    Realized Entry P&L
    account.[self.symbol].realized_pl.mtm_pl      Realized MTM P&L
Sign In or Register to comment.