Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
indicator that plot in seconds since entry time of order
Collapse
X
-
yes i will need to have a indicator that can count x amount of seconds from a open trade instead of use of an ATM i will like to close trades in seconds for example i open a long trade i will like the duration to be 5 seconds either if it wins or looses .
Comment
-
Hello misalto,
Are you looking to also place orders from within the indicator?
If not, it would be more feasible to code this logic directly from your strategy. An indicator script wouldn't be able to keep track of the exact moment a strategy opens an order, the only information an Order object has in regards to time is the last time the order was updated which may not be when the order was first placed.
If you coded this directly within the strategy, you could use CurrentBars and an added 1-second series to keep track of how long it has been since a certain order was placed. You could save the CurrentBars value to a variable at the time you place the order, then subtract CurrentBars[1] - yourSavedBar (assuming CurrentBars[1] is the added 1-second series) to keep track of how many 1-second bars have elapsed since the order was placed.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
580 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
335 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
102 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
552 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment