Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy startup
Collapse
X
-
Strategy startup
Hello, everyone I have yet another question about a strategy. I have a strategy that "works", and doesnt start trading until 9am. My issue is, when it is enabled, and 9am rolls around it immediately takes a trade since it is technically a valid signal. Is there a way to wait for the next valid signal before it starts trading? I use the "wait until flat" but dont think that is what im looking for since technically when the strat starts it is flat. Thanks in advance.Tags: None
-
Hello sprks7979,
Thanks for your post.
When a strategy is enabled, the condition to place the trade becomes true, and the strategy is in a flat position when 'Wait Until Flat' is used, the strategy will place a trade.
Something you could consider doing is using a bool to control when trades are placed. You could create a bool variable (initially set to false), and when the condition to place the order becomes true you could flip the bool to true. In another condition, you could check the same conditions and include a condition checking if the bool is true and call your Entry order method to place the order.
That way the condition must become true twice and the bool must be true for the strategy to place the trade. The bool will be set to true the first time the condition becomes true.
Note that you will need to reset the bool to false, such as after the order is placed. Otherwise, the bool will remain true.
Please let me know if I may assist further.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
-
When it comes to waiting for the next valid signal, consider setting a timer or a schedule for your bot to start looking for signals rather than just having it go full throttle right at 9am. Another thing you could try is tweaking your "wait until flat" function to make it more specific to your needs.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
62 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
134 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
75 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
50 views
0 likes
|
Last Post
|

Comment