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!
See more
See less

Partner 728x90

Collapse

Bar Timer Market Order

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Bar Timer Market Order

    Is it possible to create a market order if the bar is less than 10 seconds of closing and my conditions are met? For all other times within the bar, a limit order works, but if within the last 10 seconds, limit orders do not always fill and the order expires at the bar's conclusion.

    I noticed "bar timer" is not an available indicator in strategy builder.

    Thanks

    #2
    Hello thaboushca,

    Thanks for your post.

    I have moved this forum thread to the Strategy Development section of the NinjaTrader Forums since your question seems to be related to programming a custom NinjaScript strategy.

    Only indicators that contain a plot by calling the AddPlot() method are accessible in the Strategy Builder. The Bar Timer indicator that comes with NinjaTrader does not contain a plot which is why it is not accessible in the Strategy Builder.

    With Calculate.OnBarClose your strategy code is executed once at the end of the bar and if a cross condition is true the order is placed and then filled on the subsequent bar (assuming market order type).

    To accomplish this goal, you would have to unlock the code from the Strategy Builder by clicking the 'Unlock code' button and manually program logic into your script to submit an order if the bar is 10 seconds away from closing.

    You could implement logic in your script similar to how the Bar Timer indicator works and then in your logic check if the hours remaining is 0, check if the minutes remaining is 0 and check if the seconds remaining is less than or equal to 10 and call your order entry method.

    To study the Bar Timer indicator script, open a New > NinjaScritp Editor window, open the Indicators folder, and double-click on the BarTimer file.

    If you need someone to write this script for you and add this logic on your behalf, you can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script.

    You can search our extensive library of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more!

    https://ninjatraderecosystem.com/sea...mming-services

    Educators - https://ninjatraderecosystem.com/sea...ures=education

    You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third-party services for NinjaTrader, all pricing and support information will need to be obtained through the consultant.

    This NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Thank you, Brandon, for your detailed and quick response.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by carnitron, Today, 08:42 PM
      0 responses
      5 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Today, 07:51 PM
      0 responses
      6 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,974 views
      3 likes
      Last Post jhudas88  
      Started by rbeckmann05, Today, 06:48 PM
      0 responses
      8 views
      0 likes
      Last Post rbeckmann05  
      Started by rhyminkevin, Today, 04:58 PM
      4 responses
      58 views
      0 likes
      Last Post dp8282
      by dp8282
       
      Working...
      X