I am using Managed Approach with EnterLongLimit, SetProfitTarget, and SetStopLoss
I have 5 strategies enabled for 5 instruments (ES, CL, YM, NQ, and TF). Total of 5 strategies running.
If my total PnL for all 5 strategies running is less then $-450.00, I would like to Cancel and Exit all trades until the start on new session (Bars.FirstBarOfSession), then reset the total PnL to $0.00
total PnL is the combined PnL for all strategies enabled on the 5 instruments.
Questions:
1. Does the attached logic accomplished my task?
2. When does unrealized_pnl and realized_pnl reset back $0.00 in the attached logic? I need the reset to occur at the start time of new session.
3. Since I am using Managed Approach will ExitLong() and ExitShort() execute with my EnterLongLimit?
4. Will the Position.GetProfitLoss and Performance.AllTrades.TradesPerformance.Currency.C umProfit work in Market Replay and Strategy Analyzer? So far in back test simulation, it stops once cumulative PnL is less then $-450 and no reset.
Thanks and I look forward to your response
Comment