Announcement

Collapse
No announcement yet.

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:


    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.

        Comment


          #19
          What a basic mistake! Thanks

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          75 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          146 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          79 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          50 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          54 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X