Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using Arrays

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

    Using Arrays

    I want to use a multidimensional arrays in a Ninja script strategy, i'm having problems with getting my code to run, is it that NT does not support??

    What is the answer for storing data in arrays??
    thanks

    #2
    LloydH, welcome to the forums - unfortunately this more a general C# concept which can't really support, however you can look into the Arraylist for example on MSDN for this, or search the forum, there have been some discussions on how to use those in scripts for NinjaTrader.

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Using Arrays

      Hi Bertrand,

      Thanks for your kind welcome, I must say I am finding this forum an invaluable resource to help with my coding in NT. Your reply has helped me solve my issue, many thanks.

      Now I have run into another issue. I want to attach 3x1 Profit targets to a 3 quantity order. Looking through the forum is seems that NT6.x only supports attaching a single 3 quantity Profit Target (ExitShortLimit) to a 3 quantity order, is this a correct assumption?

      At the minute, I am having to manually track the price and use a EnterLong(1, ...) position to take the targets of individually, but I'm afraid this is volatile and producing unpredictable results.

      Is there anything you can recommend to help please? I have registered for the NT 7 beta so I can try the new SubmitOrder features but I am waiting for the next build to become available.

      kind regards and thanks once more for your assistance.
      Lloyd

      Comment


        #4
        Hello,

        Are you considering using ATM's? Although they work great, I recommend not using them if you need to alter/modify the strategy as price moves after you submit the ATM. ATM's dont' allow for modification after the fact.

        If not, please explain your strategy more so I can help.
        DenNinjaTrader Customer Service

        Comment


          #5
          HI Ben
          Thanks for your reply. I have managed to achieve what I wanted to do by using a struct and List to store my IORDER objects. I then manage them using the Advanced Order Handling methods ExitShortStop and ExitShortLimit.
          thanks and kind regards
          Lloyd

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by yertle, Yesterday, 08:38 AM
          7 responses
          28 views
          0 likes
          Last Post yertle
          by yertle
           
          Started by bmartz, 03-12-2024, 06:12 AM
          2 responses
          21 views
          0 likes
          Last Post bmartz
          by bmartz
           
          Started by funk10101, Today, 12:02 AM
          0 responses
          5 views
          0 likes
          Last Post funk10101  
          Started by gravdigaz6, Yesterday, 11:40 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by MarianApalaghiei, Yesterday, 10:49 PM
          3 responses
          11 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Working...
          X