thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
indicator trade duration
Collapse
X
-
indicator trade duration
hi hello is any indicator available that show the duration of the trade?
thanks
Tags: None
-
Hello canarydaytrading,
I'm not aware of any indicators that would show the number of minutes/seconds between an entry and exit order from an account object.
This thread will remain open for any community members to share.
Is this something you are attempting to develop?
If so, you can monitor the <Account>.ExecutionUpdate event and store the entry and exit executions to variables, and then compare the time of the orders.
https://ninjatrader.com/support/help...tionupdate.htmChelsea B.NinjaTrader Customer Service
-
-
Hello canarydaytrading,
You are wanting to compare the current time minus the entry time before the exit order closes the trade?
Assign the <execution>.Time to a variable. Then use <DateTime>.Subtract to subtract this
private DateTime entryTime;
In the <Account>.ExecutionUpdate event handler;
entryTime = e.Time;
In OnBarUpdate():
if (entryTime != null)
{
Print(Time[0].Subtract(entryTime));
}Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
35 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|
||
|
Started by CarlTrading, 07-05-2026, 01:16 PM
|
0 responses
20 views
0 likes
|
Last Post
by CarlTrading
07-05-2026, 01:16 PM
|
||
|
Started by CaptainJack, 06-17-2026, 10:32 AM
|
0 responses
12 views
0 likes
|
Last Post
by CaptainJack
06-17-2026, 10:32 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:15 AM
|
0 responses
18 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:15 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:06 AM
|
0 responses
20 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:06 AM
|

Comment