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.Gaby V.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Nancy75, Today, 10:22 AM
|
1 response
4 views
0 likes
|
Last Post Today, 10:32 AM | ||
Started by Armin, Today, 02:26 AM
|
1 response
13 views
0 likes
|
Last Post Today, 10:26 AM | ||
Windows Updates causing NT8.1.x to generate new machine ID - unstable domino effect
by xiinteractive
Started by xiinteractive, 08-08-2023, 11:55 AM
|
44 responses
887 views
3 likes
|
Last Post
by bltdavid
Today, 10:12 AM
|
||
Started by Thomas75k, 11-29-2024, 02:11 AM
|
7 responses
76 views
0 likes
|
Last Post Today, 10:04 AM |
Comment