Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Way to delay entry?
Collapse
X
-
Way to delay entry?
Hello, maybe this is simple and I’m overthinking it but is there a way to delay the entry of a position when I hit buy or sell? For example- on a 10 minute bar, the bar has 4 minutes left until the bar closes and the new one opens. I decide to go long 4 minutes before the bar closes but do not want to enter the trade until the instant of the next bar open price, not at the current price. Thank youTags: None
-
Hi Brandon, thanks for posting.
Your strategy will need to use boolean flags to mark an entry variable, then if that variable is true on the first tick of the next bar, call the entry method. You can check if the tick is the first tick of the bar with IsFirstTickOfBar, and I have also linked a publicly available page on C# booleans:
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
The idea is to detect your entry condition, set the boolean to true, and if the boolean is true on the next bar, enter the trade at that time.
Best regards,
-ChrisLChris L.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by wzgy0920, 04-20-2024, 06:09 PM
|
2 responses
27 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:43 PM
|
||
Started by wzgy0920, 02-22-2024, 01:11 AM
|
5 responses
32 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:33 PM
|
||
Started by wzgy0920, 04-23-2024, 09:53 PM
|
2 responses
49 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:29 PM
|
||
Started by Kensonprib, 04-28-2021, 10:11 AM
|
5 responses
193 views
0 likes
|
Last Post
by Hasadafa
Yesterday, 10:19 PM
|
||
Started by GussJ, 03-04-2020, 03:11 PM
|
11 responses
3,235 views
0 likes
|
Last Post Yesterday, 08:07 PM |
Comment