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

Strategy sample

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

    Strategy sample

    Hi support!

    Can you provide a startegy sample of cancelling/covering orders with state Working, Filled, PartFilled (i.e. limit orders) in transution from historical to real-time data using unmanaged approach? The idea is to have zero position at reaching reltime state to start strategy from scratch. Test it with Market replay please.
    For e.g. on Range bars you can place buy limit orders on up bar close at best bid and sell limit orders on down bar close at best ask.
    Last edited by ren37; 11-12-2017, 01:14 PM.

    #2
    Hello ren37,

    Thank you for your note.

    I do not have any samples of what you are looking for under the unmanaged approach. I would suggest searching the forums for examples which contain pieces of what you're looking for.

    If you're unable to find samples and are interested, I can have someone reach out with a list of third parties that would be interested in building a sample for you.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hi

      I have my own code witten a year ago but it doesn't work well now in 8.0.9.0 (e.g. in case of partial fill). Your approach with GetRealtimeOrder() is very turbid I think (e.g. why Ninja can't transit historical working orders to live orders automatically as an option or cancel/cover all?) and fails with partial fills.

      I can't find any other samples so send to me some please.

      Comment


        #4
        Hello ren37,

        You could see the following documentation on transitioning order references from historical to live.


        The unmanaged approach is reserved for very experienced programmers, if you’d like a larger array of reference samples I might suggest working within the managed approach for which more samples exist.

        If you wanted to eliminate the issue with historical orders you could always add the following to the top of OnBarUpdate,

        Code:
        if(State==State.Historical) return;
        If you'd like to upload the full code I can take a look and see if anything jumps out. Or if you'd prefer to email a copy, send to platformsupport[at]ninjatrader[dot]com with Attn: Alan P in the Subject line. Also within the email please include a link to this thread, and the files.

        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Hello

          Managed approach is just for kids, but not for real strategies.
          So you want to say that you are not experienced enough to code and drop here a sample for the platform that you supports?

          Comment


            #6
            Hello ren37,

            In the support department at NinjaTrader we do not create, debug, or modify code for our clients. This is so that we can maintain a high level of service for all of our clients.

            You can also contact a professional NinjaScript Consultants who would be eager to create or modify this script at your request or assist you with your script. Please let me know if you would like our business development follow up with you with a list of professional NinjaScript Consultants who would be happy to create this script or any others at your request.

            Please let us know if you need further assistance.
            Alan P.NinjaTrader Customer Service

            Comment


              #7
              Ask Chelsea. I think he can do it if you can't.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by mmenigma, Today, 02:22 PM
              1 response
              3 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by frankthearm, Today, 09:08 AM
              9 responses
              35 views
              0 likes
              Last Post NinjaTrader_Clayton  
              Started by NRITV, Today, 01:15 PM
              2 responses
              9 views
              0 likes
              Last Post NRITV
              by NRITV
               
              Started by maybeimnotrader, Yesterday, 05:46 PM
              5 responses
              26 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by quantismo, Yesterday, 05:13 PM
              2 responses
              21 views
              0 likes
              Last Post quantismo  
              Working...
              X