What is the preferred method for obtaining individual performance information?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Tracking Performance of Multiple Strategies on Same Instrument
Collapse
X
-
Tracking Performance of Multiple Strategies on Same Instrument
Hello, I want to run 6 different strategies on the ES and track the individual P/L performance of each strategy. If I use the Performance.AllTrades.TradesPerformance.Currency.C umProfit it seems to include all P/L from all 6 strategies.
What is the preferred method for obtaining individual performance information?Tags: None
-
Mikefra,
I would suggest in this case using separate simulation accounts.
The reasons can be read about here : http://www.ninjatrader.com/support/h..._account_p.htm
Here is more information on using multiple simulation accounts : http://www.ninjatrader.com/support/h...n_accounts.htmAdam P.NinjaTrader Customer Service
-
protected override void OnBarUpdate()
{
if (Bars.FirstBarOfSession)
{
// Store the strategy's prior cumulated realized profit and number of trades
priorTradesCount = Performance.RealtimeTrades.Count;
priorTradesCumProfit = Performance.RealtimeTrades.TradesPerformance.Curre ncy.CumProfit;
}
if (Performance.RealtimeTrades.TradesPerformance.Curr ency.CumProfit - priorTradesCumProfit > 0
&& Performance.RealtimeTrades.Count - priorTradesCount >= 1)
{
targetReachedToday = true;
}
if (Performance.RealtimeTrades.TradesPerformance.Curr ency.CumProfit - priorTradesCumProfit < 0
&& Performance.RealtimeTrades.Count - priorTradesCount > 0)
{
trySecondLevel = true;
}
if (Performance.RealtimeTrades.Count - priorTradesCount > 1)
{
trySecondLevel = false;
targetReachedToday = true;
}
if (CurrentBar < 2) return;
if (Time[0].DayOfWeek != Time[1].DayOfWeek) // new day, reset bool flag
{
targetReachedToday = false;
trySecondLevel = false;
}
DrawTextFixed("MyTag0", ("The strategy has taken " + Performance.RealtimeTrades.Count + " real-time trades."), TextPosition.TopRight);
DrawTextFixed("MyTag1", ("SecondLevel=" + trySecondLevel + " TargetReached=" + targetReachedToday), TextPosition.BottomLeft);
DrawTextFixed("MyTag2", (Performance.RealtimeTrades.Count - priorTradesCount).ToString(), TextPosition.TopLeft);
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by popecapllc, 08-09-2023, 07:42 PM
|
8 responses
1,351 views
0 likes
|
Last Post
by Johng22
Today, 06:26 PM
|
||
Started by ETFVoyageur, 04-30-2024, 02:04 PM
|
11 responses
101 views
0 likes
|
Last Post
by ETFVoyageur
Today, 05:31 PM
|
||
Started by bubblegum, 03-18-2024, 10:41 AM
|
3 responses
46 views
0 likes
|
Last Post
by vjsworld
Today, 05:23 PM
|
||
Started by JamesK1, Today, 02:48 PM
|
1 response
13 views
0 likes
|
Last Post
by JamesK1
Today, 05:23 PM
|
||
Started by llanqui, Today, 03:51 PM
|
0 responses
13 views
0 likes
|
Last Post
by llanqui
Today, 03:51 PM
|
Comment