I found nothing in the Trade object.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Number of Bars
Collapse
X
-
Hello tbmuc,
Thanks for writing in and I am happy to assist you.
To export the executed trades please follow the below steps.- In Control Center click on Executions tab.
- Right-click on the data grid.
- In the context menu goto Grid>Export to Excel.
Please let me know if I can assist you any further.JoydeepNinjaTrader Customer Service
-
Is there a way to get this information for closed trades? The other data is determined tis way:
foreach (Trade myTrade in Performance.AllTrades)
{
IExecution entryOrder =myTrade.Entry;
IExecution exitOrder =myTrade.Exit;
File.AppendAllText( tradefile, strategyname
+ ";" + Instrument.MasterInstrument.Name
+ ";" + entryOrder.MarketPosition
+ ";" + myTrade.Quantity.ToString()
+ ";" + entryOrder.Price.ToString()
+ ";" + exitOrder.Price.ToString()
+ ";" + ToDay(entryOrder.Time).ToString()
+ ";" + ToDay(exitOrder.Time).ToString()
+ ";" + (myTrade.ProfitCurrency * myTrade.Quantity).ToString() +"\r\n"
);
}
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
160 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
308 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
245 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
349 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
179 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|

Comment