Also my system is in the market all the time so the order would need to be to reverse the position essentially. Thanks
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
Market Order if Limit not filled by certain time
Collapse
X
-
Market Order if Limit not filled by certain time
Hi need some help. I'm trying to enter and exit the market with a limit order but have my system enter or exit the market if the limit order is not filled by the next bar. Thanks for your help!
Also my system is in the market all the time so the order would need to be to reverse the position essentially. Thanks -
Hello prescottbph,
Thanks for opening the thread.
I have created a demonstration video describing how part of this behavior can be modeled using the Strategy Builder. Keep in mind that the Strategy Builder is only intended for creation of simple strategies, and any more robust behavior will have to be programmed in by unlocking the code.
It is our expectation of our clients that when they unlock the code, they already have a programming background and understand how they can write the proper syntax and logic. As we are a small team, we are not equipped to create, write or debug client code. If you are looking for those services, I can have a member of our business development team reach out to you with more information on NinjaScript Consultants who would be happy to write the code for you.
If you would like to reverse your position, you could call EnterShort() when in a Long position and EnterLong() when in a Short position. Since a strategy's position is separate from the Account position, entering from a a flat position must be minded.
Limit orders will be valid for the bar it is submitted and will no longer be valid on the next bar iteration unless that order method is called again. This is detailed in the LiveUntilCancelled section of the help guide for the Managed Approach.
Demo: https://www.screencast.com/t/8VZuUZSMWf
Managed Approach - https://ninjatrader.com/support/help...d_approach.htm
LiveUntilCanceled (ignored in the Strategy Builder.) - https://ninjatrader.com/support/help...ancelledOrders
Strategy Builder 301 - https://www.youtube.com/watch?v=HCyt90GAs9k
Please let me know if I may be of further assistance.JimNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by bortz, 11-06-2023, 08:04 AM
|
47 responses
1,606 views
0 likes
|
Last Post
by aligator
Today, 07:22 PM
|
||
Started by jaybedreamin, Today, 05:56 PM
|
0 responses
9 views
0 likes
|
Last Post
by jaybedreamin
Today, 05:56 PM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
6 responses
19 views
0 likes
|
Last Post
by DJ888
Today, 05:12 PM
|
||
Started by Jon17, Today, 04:33 PM
|
0 responses
6 views
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
15 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
Comment