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

Function for adding, subtracting and multiplying inputs inlcuding other indicatos

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

    Function for adding, subtracting and multiplying inputs inlcuding other indicatos

    NT should consider the above as a part of NT platform.
    So instead of, say, adding one ema to another within C# script, there should be two or more inputs which would allow me to add any inputs, including selection of multiparameter indicators(Macd from MACD or Higher band from Keltner or BB)
    Is there such a thing or does it need to be developed?
    Thanks

    #2
    Welcome to our forums DLatNT and thanks for the post : with NT7 you can create indicator on indicators, for example a Bollinger Band running on a custom EMA could be realized without custom coding.

    For more info please see the 3rd section of this link here :



    Thanks,
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Welcome to our forums DLatNT and thanks for the post : with NT7 you can create indicator on indicators, for example a Bollinger Band running on a custom EMA could be realized without custom coding.

      For more info please see the 3rd section of this link here :



      Thanks,
      Thank you for responding but this is not what I am asking about. I understand that you can have an indicator on indicator. What I am asking about is : adding or subtracting or multiplying, to use your example, add Higher Band of BBs of Last, to EMA of Last. It should be possible to create such a Routine/function that can be reused for different purposes and inputs.
      Thank you.
      PS I am familiar with your software even though I did not post much on this forum

      Comment


        #4
        I believe that needs developed.
        Should be possible with the indicator builder?

        Comment


          #5
          Yes, this would need to be custom coded - the indicator wizard will provide a start for configuring the indicator properties and plots but the actual logic would need to be implemented by custom coding then.

          I'll make sure this is added though for future consideration to our product enhancement lists.
          BertrandNinjaTrader Customer Service

          Comment


            #6
            Thanks Bertrand and sledge
            I am aware that it can be coded but, as you mentioned Bertrand, this is a good addition to your features.
            What is the usual turn around for adding features like this?
            Thanks

            Comment


              #7
              Thanks again for the input DLatNT, I could unfortunately not provide an ETA or commitment here, but we track your kind enhancement suggestion now under # 1296 in our list.
              Last edited by NinjaTrader_Bertrand; 09-26-2011, 09:05 AM.
              BertrandNinjaTrader Customer Service

              Comment


                #8
                I achieved this with a workaround. I had to solve several sub-problems which may have been specific to my data.

                In short, I performed the calculations within excel and uploaded the final produkt via historical data import in NT.


                In long, there are several steps needed. I wanted the upvol / (upvol + dvol) function data for which I got from PItrading which by itself comes in NT format.

                Then I went through several steps
                - the txt file was far too large to import into excel, so I had to create several smaller txt files from it.
                - upload the txt files in excel via "data: import: from: csv/txt" which gives a table with 6 parts
                - perform the calculations for each of the 4 price specific data points as one wants

                uploading this in NT yields several errors (given by the log txt file from NT), among them:i) invalid value: open value should be lower or equal to highest value ii) invalid input #DIV/0! from calculations or variants of this iii) my 2 text files had a divergent length of 4 lines

                - to solve iii) I compared the dates within excel using a comparing function to select them and deleted the surplus lines
                - for ii) i used the search and replace function and replaced it with a number that would be false, but valid, and close enough to not distort much given it was 1minute data and hence not each value relevant
                - for i) I had to exchange several elements of the columns: I used the "if" function to achieve a) that the column for "highest value" was indeed the highest, programmable via if (value in highest column) > (value of lowest column) print the left value, if lower the right, for both columnst b) do the same to the effect that the "open value" is the smaller number and the "closing value" the larger
                - I multiplied the decimals with 100 as the [0,1] range didnt display when I uploaded it, the new range was then [0-100].

                - save as "txt with tab as spacing" format
                - open txt with editor and go to the edit/replace function, copy a tab-space with the mouse cursor, paste it into the upper field and put a semicolon into the lower
                - repeat for all txt files and combine in a single txt file

                - then give it a name from the NT symbol library, I chose "^VOL" (indices and futures I think have to be preceded by that edge-symbol) to upload it successfully.

                this gave me the desired indicator and this can be done for other symbols created from other calculations, too. (it was more intuitive for me than to learn the NT language which Im sure would work eventually, but was too much for my memory). maybe I forgot a sub-step, but it works. (that the indicator is correct can be checked by comparing it to tradingview where it can be directly programmed).



                PS several problems can come up when importing data into NT which include choosing the "default 24x7" time frame / trading hours etc., but one can read that up in other threads.
                Attached Files
                Last edited by hansintakt; 09-07-2023, 05:54 AM.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by andrewtrades, Today, 04:57 PM
                1 response
                10 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by chbruno, Today, 04:10 PM
                0 responses
                6 views
                0 likes
                Last Post chbruno
                by chbruno
                 
                Started by josh18955, 03-25-2023, 11:16 AM
                6 responses
                436 views
                0 likes
                Last Post Delerium  
                Started by FAQtrader, Today, 03:35 PM
                0 responses
                9 views
                0 likes
                Last Post FAQtrader  
                Started by rocketman7, Today, 09:41 AM
                5 responses
                20 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Working...
                X