• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.


No announcement yet.

Partner 728x90


plotting a MA style line on a chart that reads its values from a text file

  • Filter
  • Time
  • Show
Clear All
new posts

    plotting a MA style line on a chart that reads its values from a text file

    Hi, I'm new to Ninja Trader, and please excuse my ignorance, but I just cannot seem to be able to find this solution anywhere. I need to plot a moving average style of line onto a chart using values derived from a text file. for example I want to read in consecutive dates and price values from a text file that would have a series of values that have been pre-determined. The line could be straight, sloped or wavy depending on the price values in the text file.

    Any help would be greatly appreciated.

    Thank you in advance.


    Hello Brian,

    Thanks for your post and welcome to the NinjaTrader forums!

    What you want to do would require custom programming in the Ninjascript/ C# programming language.

    If you want to create this yourself, we can provide links to references to help get you started but to be clear as small team we do not provide coding or debugging services and are glad to assist if you get stuck on solving a particular question related to ninjascript.

    If you want this created for you, we can also provide a link to 3rd party programmers in the NinjaTrader ecosystem that would be glad to provide that service.

    In general terms, you would need a script that can read a file and we do have an example of this (linked below), from the data in that file you would need to read in the datetimes and values and then in your script compare the date/time of the current bar in the data series (of the chart you are applying this to) to then "plot" the values you have from the file that relate to that date/time.
    Here is a link to reading a text file: https://ninjatrader.com/support/help...o_read_fro.htm

    Paul H.NinjaTrader Customer Service


      Thanks Paul. I will have a look at the NinjaScript. Could you please also advise of a 3rd party link to programmers.




        Hello Brian,

        Thanks for your reply.

        I will ask our sales team to provide the link to 3rd parties.

        NinjaScripts are built on C#. While we do not provide programming education services in the Support Department, there are a vast number of educational C# resources external to NinjaTrader and we do have some tutorials and tools that can assist in the learning process.

        Many users report that a good way to start before fully learning C# is to go through the NinjaTrader 7 NinjaScript tutorials in the help documentation to get a fundamental grasp on .NET framework and how it is used in NinjaScript. From there I suggest looking at the Code Breaking changes for NinjaTrader 8 to understand the differences between NinjaTrader 7 and NinjaTrader 8.

        You can view the tutorials for NinjaTrader 7 here: https://ninjatrader.com/support/help...?tutorials.htm

        Although we do not currently provide NinjaScript tutorials like in NinjaTrader 7, we do provide in-depth help documentation on developing NinjaScripts for NinjaTrader 8. We also provide samples and a complete reference of the language. More in depth educational resources can be found elsewhere throughout the internet.

        You can find the educational resources here: http://ninjatrader.com/support/helpG..._resources.htm

        Once you have a basic understanding of C#, I suggest following the documented Code Breaking changes between NinjaTrader 7 and NinjaTrader 8. This page also gives an overview for NinjaScripts in NinjaTrader 8.

        You can find the Code Breaking changes here: http://ninjatrader.com/support/helpG...ng_changes.htm

        Other users have wrote in about this information in our support forums here: https://ninjatrader.com/support/foru...d.php?p=488807

        Also available are webinars on the NinjaScript editor and the Strategy Builder. The Strategy Builder can be used to generate NinjaScript syntax for NinjaScript strategies. You may wish to create a strategy and clicking View Code after each piece of logic created in the Builder to observe the generated syntax.

        Strategy Builder 301: https://www.youtube.com/watch?v=HCyt90GAs9k

        NinjaScript Editor 401: https://www.youtube.com/watch?v=K8v_2ONBbqI

        You can register for live webinars here: https://ninjatrader.com/PlatformTraining

        Our documentation will be your best friend while developing, and the complete supported NinjaScript interface can be referenced here: http://ninjatrader.com/support/helpGuides/nt8/en-us/

        The information above is publicly available.
        Paul H.NinjaTrader Customer Service


          Hello squireb3333,

          This is Chris following up on behalf of Paul.

          You can search our extensive library of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more:You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third-party services for NinjaTrader, all pricing and support information will need to be obtained through the consultant.

          The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem, LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

          Let me know if I may be of further assistance.
          Christopher D.NinjaTrader Customer Service


          Latest Posts


          Topics Statistics Last Post
          Started by waldoalvarez, Today, 04:59 PM
          0 responses
          Last Post waldoalvarez  
          Started by habibalex, Today, 09:45 AM
          2 responses
          Last Post habibalex  
          Started by junkone, Today, 03:42 PM
          1 response
          Last Post NinjaTrader_ChelseaB  
          Started by peterslane1, Today, 09:47 AM
          2 responses
          Last Post aviat72
          by aviat72
          Started by SlickRick, Today, 02:47 PM
          1 response
          Last Post NinjaTrader_Zachary