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 sidlercom80, 10-28-2023, 08:49 AM
|
168 responses
2,262 views
0 likes
|
Last Post
by sidlercom80
Today, 12:05 AM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
3 responses
10 views
0 likes
|
Last Post Yesterday, 11:58 PM | ||
Started by WeyldFalcon, 12-10-2020, 06:48 PM
|
14 responses
1,429 views
0 likes
|
Last Post
by Handclap0241
Yesterday, 10:43 PM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
2 responses
9 views
0 likes
|
Last Post
by DJ888
Yesterday, 10:31 PM
|
||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
41 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
Comment