thanks
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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 Karado58, 11-26-2012, 02:57 PM
|
8 responses
14,828 views
0 likes
|
Last Post Today, 09:09 AM | ||
Started by Option Whisperer, Today, 09:05 AM
|
0 responses
1 view
0 likes
|
Last Post Today, 09:05 AM | ||
Started by cre8able, Yesterday, 01:16 PM
|
3 responses
11 views
0 likes
|
Last Post
by cre8able
Today, 08:28 AM
|
||
Started by Harry, 05-02-2018, 01:54 PM
|
10 responses
3,204 views
0 likes
|
Last Post
by tharton3
Today, 08:52 AM
|
||
Started by ChartTourist, Today, 08:22 AM
|
0 responses
6 views
0 likes
|
Last Post
by ChartTourist
Today, 08:22 AM
|
Comment