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

indicators/charts/formulas

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

    indicators/charts/formulas

    Hi,

    I am new to NinjaTrader(NT) indicators/charts/formulas. I am seeking help.

    1. Attached few data of S&P 500 in excel, Column H has difference between the current day and the previous day close price. I need a buy/sell indicator in the NinjaTrader chart with Buy or Sell indicator based of the difference column. The simple logic is I need a sell indicator at when the difference is negative, need a buy indicator when the difference is positive. Pls help with formulas.

    2. I wanted above to be stored as a formula/indicator so that I can back test the same with EOD data, 1 minute, 5 minute data for may index and stocks.

    3. Also when a Buy indacotr is triggered, I wanted to place automated buy order in the NT chart(I guess this is my ATM strategy), like wise a sell order too.

    Above 3 points i need help.

    thanks
    ntrmj
    Attached Files

    #2
    Hello ntrmj,

    Thank you for your note.

    To build a strategy which will enter long if the previous bar is higher than the current bar, you would build a condition of Close[0] <Close[1], and an action of enter long. I put together a sample strategy which will accomplish this on the long side and you could apply this strategy to a daily or minute time frame.

    To build the short aspect of your strategy, at the bottom of the conditions and actions page, you’ll select Set 2 and define like I’ve done in set 1, but use enter short and change the operator from less than to greater than.

    The strategy is build using the wizard, so after importing it I suggest going to Control Center>New>Strategy Builder and selecting the strategy to see how its built.

    To Import a NinjaScript into NinjaTrader 8 do the following:
    From the Control Center window select Tools -> Import-> NinjaScript...
    Find the file location.

    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Alan,

      Thanks for your help, that’s perfect.

      Attached Nt_data_graph.zip, pls take a look at the excel file.

      1. Date Open High Low Close Adj Close* Volume are column heading.

      2. Column H(Strategy) contains a simple Strategy with excel formula

      3. Column I (Cumulative) contains the cumulative values for column H.

      4. The graph under "Raw Data" contains the Bar chart of raw data

      5. The graph under "Graph for Cumulative data" contains the line chart of cumulative value.

      I am seeking your help in plotting a chart in Ninja trader 8 as same in excel.

      Hope I clarified what is in my mind, have a good day.
      Attached Files

      Comment


        #4
        Hello ntrmj,

        To do this, you would have to create a custom series, for which you’d set to the difference between Close[0] -Close[1].

        See Using a series or dataseries object to store calculations,


        You could then use a loop to sum the previous data points. I would suggest seeing Getting a sum of closing prices” link below,



        You should see Multi Colored plots for an example of adding plots.


        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Alan,

          I saw the code in the ninja script editor after importing your sample. Its Greek and Latin to me and I dint understand, i am not a tech guy who can do programming stuff. Is there any other way to get what i need.

          thanks
          ntrmj

          Comment


            #6
            Hello ntrmj,

            In the support department at NinjaTrader we do not create, debug, or modify code for our clients. This is so that we can maintain a high level of service for all of our clients as well as our partners.

            We do have a large ecosystem available to help you with programming logic questions. You can post on our forum and ask the other 40,000+ forum members.


            You can also contact a professional NinjaScript Consultants who would be eager to create or modify this script at your request or assist you with your script. Please let me know if you would like our business development follow up with you with a list of professional NinjaScript Consultants who would be happy to create this script or any others at your request.

            Please let us know if you need further assistance.
            Alan P.NinjaTrader Customer Service

            Comment


              #7
              I have posted the same in NT ecosystem which you have shared link, let me wait for that.

              How to contact NinjaScript Consultants for help ?

              Comment


                #8
                Hello ntrmj,

                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!


                This 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.

                Please let me know if you have any questions, concerns or if I can provide any further assistance by responding to this thread at your convenience.
                Ryan L.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by aa731, Today, 02:54 AM
                0 responses
                4 views
                0 likes
                Last Post aa731
                by aa731
                 
                Started by thanajo, 05-04-2021, 02:11 AM
                3 responses
                470 views
                0 likes
                Last Post tradingnasdaqprueba  
                Started by Christopher_R, Today, 12:29 AM
                0 responses
                10 views
                0 likes
                Last Post Christopher_R  
                Started by sidlercom80, 10-28-2023, 08:49 AM
                166 responses
                2,237 views
                0 likes
                Last Post sidlercom80  
                Started by thread, Yesterday, 11:58 PM
                0 responses
                5 views
                0 likes
                Last Post thread
                by thread
                 
                Working...
                X