Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help with Arrays not DataSeries Compiles won't run

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

    Help with Arrays not DataSeries Compiles won't run

    I'm working on some code from John Ehler's. In his notes he says of the code,

    "First the entire code is completed for each bar and the values of the variables are retained from bar to bar. However, the values of the arrays are not automatically indexed to each price bar."

    So I used arrays instead of DataSeries.... At first I declared and initalized in one step in the variables section. They are all the same size and all hold a double value.


    Code removed by poster.
    Last edited by Crassius; 02-25-2011, 04:38 PM.

    #2
    Hello Crassius,

    Unfortunately arrays deal more with C# than NinjaScript, so will fall outside our scope of support. Hopefully other community members with experience in this area can lend a hand. For capturing more detailed information related to exceptions, you can use TryCatch blocks. Technique for these is detailed here:
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      You might want to pay a visit to BigMike:
      Reviews, Strategies, Indicators & more | NexusFi community forum


      You should find a file named: Ehlers Collection for NT7. Your indicator may already be coded. Or it will give some ideas on how to program things in NinjaScript

      Comment


        #4
        Thanks for the suggestion... I am a member of BigMikes, and there are some great programmers over there. I have loked at those Ehler Collection posts, unfortunately, as is sometimes the case with shared code, both collections of Ehlers work posted there have errors, and do not return accurate measurements of the cycle period, or use older Ehler methods that have been improved upon by him, and the newer code released.

        Ehler's stuff is not easy, and translating it to another language carries with it a risk of getting an indicator that looks like it is working, but isn't returning valid values. That is the case for every NinjaTrader version of this one, and some other Ehler indicators either rely on this one's measurement, or use older, outdated, Ehlers algorithms that have either/or greater lag less resolution.

        I have stepped through that code and returned the math to variables that are not in a loop, and the math works and returns the correct value.... it is something about my loop. Hiopefully one of the C# wiz community members here can spot it.

        Also I must say that I have learned a great deal attempting to code his stuff myself, rather than just download an indicator... it is often the only way I can really understand his math... to code it step by step.

        Comment


          #5
          Problem solved...

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          581 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          338 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          552 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X