Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Enter positions only after script has been started
Collapse
X
-
Enter positions only after script has been started
How can a script be coded to avoid having positions entered when script is started on a chart and chart contains past data which would have met entry (and exit) criteria already in the past? In other words, the first entry should only be possible at or after the script was launched.Tags: None
-
Thanks Jason
When I put this at the beginning of my OnBarUpdate() loop I assume it just returns and loops until live data is being processed, so no "executions" on historical data. But I assume that a lookback period would still work on the first live bar, like SMA(14), as long as at least 13 histroical bars are available, right?
Btw, your reference is a link to this thread here, I guess you wanted to refer to another link?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
93 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
48 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
31 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
34 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
70 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

. Please see the link below.
Comment