Say, I want to long at 1:30pm and exist at 1:45pm. How to express this strategy?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
how to express a fixed time?
Collapse
X
-
hl685,
What you can do is check the timestamps of the bars. When the timestamp of the bar is of the time you want to exit, then place in your exit.
Untested code to give you an idea.
Code:if (ToTime(Time[0]) == 133000) EnterLong(); else if (ToTime(Time[0]) == 134500) ExitLong();Josh P.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
656 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
371 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 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
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
579 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment