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

NwMA -- IFTA 2012 -- Mov Avg 3.0

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

    #16
    Hello,

    Thank you for the reply.

    Is the post #1 script still relevant? It seems there were corrections to the script in the following posts which would make this very difficult to see what exactly you are talking about. If this is still something that is happening in the newer modified script please let me know or provide a script that demonstrates what you are asking.

    For Try/Catch statements these would work in NinjaTrader, errors that are thrown will not actually stop the script, mainly you can use the Catch function to print the Exception if needed.
    Use the C# throw statement to signal an occurrence of an exception. Use the C# try statements to catch and process exceptions occurred in a block of code.


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #17
      Originally posted by sumana.m View Post
      Hi Jesse

      thanks for ur update.

      That testcode is done on the scrip on #1 after the suggestion of cal i made post #8;

      2ndly i need to throw the exception ie. (try throw and catch syntax in ninja) for the cases when lamda less than 2 as this code do not provide solution for such cases.
      The code I have posted in #9 already deals with the case lambda < 2. The code is all you need to build the indicator.

      Comment


        #18
        Hello,

        Please include the code in question in a new version of the indicator that demonstrates the question here.
        I can not confirm we are doing the exact same thing if I have to copy and paste from multiple posts, the only way I can correctly address the question is with a example that displays the problem you are asking about.

        Please let me know if I may be of additional assistance.
        JesseNinjaTrader Customer Service

        Comment


          #19
          Hi

          Thanks for your help and support!!!!!The ultimate outcome/test-scrip.


          Originally posted by NinjaTrader_Jesse View Post
          Hello,

          Thank you for the reply.

          Is the post #1 script still relevant? It seems there were corrections to the script in the following posts which would make this very difficult to see what exactly you are talking about. If this is still something that is happening in the newer modified script please let me know or provide a script that demonstrates what you are asking.

          For Try/Catch statements these would work in NinjaTrader, errors that are thrown will not actually stop the script, mainly you can use the Catch function to print the Exception if needed.
          Use the C# throw statement to signal an occurrence of an exception. Use the C# try statements to catch and process exceptions occurred in a block of code.


          I look forward to being of further assistance.
          Attached Files

          Comment


            #20
            Hello,

            Thank you for providing the updated script.

            So the question from #8 was regards to different output.

            I ran this script on a single chart and am currently disconnected from data to ensure the data does not change inbetween tests.

            I have ran this multiple times and each time I get the exact same output from what you are printing. I see from the prior question this is regarding the WMA, if you are asking why the output is changing, were you using live data? if so this more than likely is the case if more data was added that will ultimately change the resulting values you get back inbetween test A and test B.

            Can you clarify what you are asking in regards to the different output? are you changing the periods you have or what is the exact issue you are facing. From what I can see, without knowing exactly what you are looking for, it seems to be working.

            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #21
              Hi

              for #1.#8 the expected output of the WMA call somewhere near to 8500 8200 etc for nifty spot eod.but it returned very lesser value of that.and generated a different plotting on chart which is different than the current one.so i reported that wma return was different.and so the result differs with 5000 points approx the current one.in case of cipla too difference is there.possibly it collided with other package's wma or the issue was in internalization. i initialized it within the function using new operator but not in initialize function(possibly).

              thanks jesse,cal and Harry
              Last edited by sumana.m; 04-03-2015, 11:43 AM.

              Comment


                #22
                Hello,

                I see where you are using the WMA in your custom method that sets the data series values.

                Are you comparing the WMA indicator its self to the dataseries NwMA that you are plotting ?

                If so there is no comparison between the two because they are different calculations.

                Your base calculation comes from two WMA calls in the method NWMA() which returns a calculation of these two WMA calls. The end result would be different than just a single WMA.

                If this is what you are comparing I would expect different results when using the code you are.

                Please let me know if I may be of additional assistance.
                JesseNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by PhillT, Today, 02:16 PM
                2 responses
                3 views
                0 likes
                Last Post PhillT
                by PhillT
                 
                Started by Kaledus, Today, 01:29 PM
                3 responses
                9 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by frankthearm, Yesterday, 09:08 AM
                14 responses
                47 views
                0 likes
                Last Post NinjaTrader_Clayton  
                Started by gentlebenthebear, Today, 01:30 AM
                2 responses
                14 views
                0 likes
                Last Post gentlebenthebear  
                Started by PaulMohn, Today, 12:36 PM
                2 responses
                17 views
                0 likes
                Last Post PaulMohn  
                Working...
                X