I am working on a Ninja 8 script strategy. I would like the strategy to evaluate the daily gross REALIZED P/L of an account. I am using the Account.Get method as follows ...
Account.Get(AccountItem.{insert account item}
for the above... the {insert account item} I am seeking a better understanding of their meaning...
AccountItem.CashValue
===================
I am assuming that this is returning the account balance. I am also assuming that this value is NOT affected by margins or unrealized profit and losses from open positions Is this assumption correct?
AccountItem.RealizedProfitLoss
=========================
I am assuming that this value returns the profit or loss obtained in a single trading day? I am also assuming that this value resets upon the start of a new trading day? At what time of the day is the reset? 5PM CST when the Globex markets start to open?
The strategy has two targets A maximum daily loss and a maximum daily profit. When either target is reached, the strategy stop executing new orders. This strategy will be allied to multiple markets (ES/ GC ect..) so it needs these values to be account wide and not based on the activity of what occurred on a specific instrument.
I also have a need to determine the unrealized P and L of an open position of the instrument the strategy is applied. I am using Position.GetUnrealizedProfitLoss() method for this purpose.

Comment