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

Automated Strategies using Order Flow Indicators/Chart Type

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

    #16
    Hello shahabjet1,

    Thanks for your replies.

    I see that you significantly changed your post #12 as it looks like you figured out that the sample indicator requires a crossabove the SMA(5) in order to print which is what I was getting ready to reply to you. The example indicator does not provide a plot in the indicator panel and is only provided to demonstrate how to collect and print the level 2 data (On the Ninjascript output window)and uses the crossover event to demonstrate without needing to overwhelm the user with data.

    You are now asking for programming help for the example code. Please note that we do not provide code writing services and if you would like it created for you we can provide a link to 3rd party professional programmers in the NinjaTrader ecosystem who would be glad to provide that service.

    The example indicator uses a condition to pull the data. If you remove that condition you would see that the data is updated in the output window on every tick so that demonstrates how you can get the data. It will be up to you to figure out how to sort and calculate to suit your needs.

    If you want to use the SetProfitTaregt or setStoploss methods, these can be done either statically (meaning you would have the same profit/stop on every entry (for example 10 ticks regardless of direction)) or it can be done dynamically in the OnBarUpdate() where they can be different on every order. I highly recommend that you familiarize yourself with the help guide for these along with the Managed Approach which will help you understand strategy order rules. these documents will save you a lot of time in the long run if you study them now. Here are the links to such:


    Paul H.NinjaTrader Customer Service

    Comment


      #17
      Thanks. Maybe you can at least help me figure out why it compiles with no errors, but I can't add it as a strategy on my chart? It does not come up in strategies list, but it compiles as a strategy just fine! Thank you

      Comment


        #18
        Hello shahabjet1,

        Thanks for your reply.

        Please name the name = field on the State.Setdefaults, currently it shows: Name = "Sample level2 book"; and that is what would show in the Strategies list.
        Paul H.NinjaTrader Customer Service

        Comment


          #19
          What a basic mistake! Thanks

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Lumbeezl, 01-11-2022, 06:50 PM
          31 responses
          817 views
          1 like
          Last Post NinjaTrader_Adrian  
          Started by xiinteractive, 04-09-2024, 08:08 AM
          5 responses
          14 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by swestendorf, Today, 11:14 AM
          2 responses
          6 views
          0 likes
          Last Post NinjaTrader_Kimberly  
          Started by Mupulen, Today, 11:26 AM
          0 responses
          7 views
          0 likes
          Last Post Mupulen
          by Mupulen
           
          Started by Sparkyboy, Today, 10:57 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X