Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I have a strategy which I'd like to "pause" occasionally to avoid some clearly risky entry locations or times. In this case the general "disable" function is not a good way to do it because of the way my strategy prepares and locates the entry areas before triggering an entry, so I don't want to close/restart the strategy at that point as it would start strategy calculations from the scratch again thus missing this previously calculated entry area. I just want to inhibit any actual entries at some times without disabling the whole strategy.
So, I would like to interact with the running strategy via a dialog screen or button to put strategy to "idle" (ie not to take entries but still to keep calculating strategy as normal) and then later turn it back on "active" to let the strategy to take the entries again as normally. This maybe could be done using a check box dialog on the chart? Would somebody be able to tell / point me how to do this? Any C code example would be really helpful. I just need an example of how to build a chart dialog box object and how a running strategy would read it's input real time.
Thanks a lot!
Can you help answer these questions from other members on NexusFi?
Afaik, when the strategy is running (i.e. enabled), it locks all user input. Otherwise, you could just use a region var.
So, the only thing that I can think of is to have a file read on every call to OnBarUpdate (or maybe on every bar). When you want to disable the strat from taking entries, edit the file to include some value that the strat reads to disable entries. Edit it back to take 'em again.
You can affect the strategy variables, but NinjaTrader don't offer any support. You have to know C# well and how to link into a DLL which you program to pop up a dialog box to accept the input. Beyond that I know nothing, sorry - except that I know that people have done it or had it programmed for them.
As for placing your own buttons on the NinjaTrader menus - I'm watching this thread with interest to find out if anyone can confirm that it's possible.
You can discover what your enemy fears most by observing the means he uses to frighten you.
What I'm doing is adding a button on the toolbar, which change the value of a boolean. This boolean is tested before each potential entry, and the order is not set if the boolean variable is false.
I think we have such button examples in the forum, here for example.
Sam028, your method looked like one that would work in my case. I just need a user definable, real time "on/off flag" that the strategy could read before triggering any order. However, I'm not Elite member and couldn't access the toolbar example link you posted... Any chance to get that example via pm?