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:
    https://ninjatrader.com/support/help...d_approach.htm
    https://ninjatrader.com/support/help...ofittarget.htm
    https://ninjatrader.com/support/help...etstoploss.htm
    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 KirkHammett, Today, 11:15 PM
          0 responses
          3 views
          0 likes
          Last Post KirkHammett  
          Started by soon123, Today, 11:12 PM
          0 responses
          1 view
          0 likes
          Last Post soon123
          by soon123
           
          Started by JustinCross, Today, 09:48 PM
          0 responses
          8 views
          0 likes
          Last Post JustinCross  
          Started by Unsuitable, Today, 06:30 PM
          0 responses
          5 views
          0 likes
          Last Post Unsuitable  
          Started by michaelsh, Today, 04:28 PM
          0 responses
          6 views
          0 likes
          Last Post michaelsh  
          Working...
          X