NexusFi: Find Your Edge


Home Menu

 





User input to running NT strategy


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one gain247 with 4 posts (0 thanks)
    2. looks_two sam028 with 2 posts (4 thanks)
    3. looks_3 kandlekid with 1 posts (0 thanks)
    4. looks_4 aqawle with 1 posts (2 thanks)
    1. trending_up 5,875 views
    2. thumb_up 7 thanks given
    3. group 7 followers
    1. forum 12 posts
    2. attach_file 0 attachments




 
Search this Thread

User input to running NT strategy

  #1 (permalink)
 
gain247's Avatar
 gain247 
Helsinki, Finland
 
Experience: Advanced
Platform: NT8
Broker: NTB
Trading: ES, CL
Posts: 131 since Apr 2010
Thanks Given: 125
Thanks Received: 123

Hi guys,

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!

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Deepmoney LLM
Elite Quantitative GenAI/LLM
Futures True Range Report
The Elite Circle
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
Battlestations: Show us your trading desks!
26 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
17 thanks
  #3 (permalink)
kandlekid
College Point, NY (Queens)
 
Posts: 63 since Nov 2009
Thanks Given: 5
Thanks Received: 20


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.

Note: haven't tried this ...

Reply With Quote
  #4 (permalink)
 
Adamus's Avatar
 Adamus 
London, UK
 
Experience: Beginner
Platform: NinjaTrader, home-grown Java
Broker: IB/IQFeed
Trading: EUR/USD
Posts: 1,085 since Dec 2010
Thanks Given: 471
Thanks Received: 789

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.
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #5 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629

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.

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
Thanked by:
  #6 (permalink)
 
gain247's Avatar
 gain247 
Helsinki, Finland
 
Experience: Advanced
Platform: NT8
Broker: NTB
Trading: ES, CL
Posts: 131 since Apr 2010
Thanks Given: 125
Thanks Received: 123

Thanks for all your suggestions!

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?

Thanks!

Started this thread Reply With Quote
  #7 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,396 since Jun 2009
Thanks Given: 33,172
Thanks Received: 101,534

Elite stuff is not to be shared to non-Elite members so please do not ask for someone to PM you something you don't have access to.

But I agree the toolbar is the recommended method, this is what I've used in the past for myself and customers who hired me for strategies.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #8 (permalink)
 
gain247's Avatar
 gain247 
Helsinki, Finland
 
Experience: Advanced
Platform: NT8
Broker: NTB
Trading: ES, CL
Posts: 131 since Apr 2010
Thanks Given: 125
Thanks Received: 123

I understand.

Started this thread Reply With Quote
  #9 (permalink)
 aqawle 
Kansas City, Mo
 
Experience: Beginner
Platform: Ninjatrader
Broker: Zen-fire
Trading: ES, Oil
Posts: 19 since Mar 2010
Thanks Given: 1
Thanks Received: 11


gain247 View Post
Thanks for all your suggestions!

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?

Thanks!

Try the link below:
TradeTimer for [AUTOLINK]Ninjatrader[/AUTOLINK] 7: Installation and Usage Guide Read the Prospectus

Reply With Quote
Thanked by:
  #10 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629




And compare its cost ($100) with the cost of an Elite membership, with its tons of resources.

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on April 17, 2015


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts