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

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Set visual alert for market analyzer

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

    Set visual alert for market analyzer

    Hello,

    I would like to create an indicator for use within market analyzer.

    The indicator would alert me visually (such as in the picture below, by changing the cell color) when 2 conditions are both met:

    1. ADX with 14 period is above 25
    2. DI+ & DI- crossover




    So I believe I will have to make a custom indicator using something like this:

    if (CrossAbove(DM(14).DiPlus, DM(14).DiMinus,1))

    But I really don't know how to do any of that. Please point me in the right direction. Thank you.
    Last edited by Billythekid747; 04-30-2016, 06:50 PM. Reason: Clarification

    #2
    Hello,
    Setting the cell conditions for the market analyzer through NinjaScript is not supported.
    If we can be of any other assistance please let us know.
    Cody B.NinjaTrader Customer Service

    Comment


      #3
      Thank you. Since that is the case, what I would like to do instead is make the indicator plot the value of:

      the absolute value of the difference between DiPlus & DiMinus.

      Can you assist me with what I need to put in the formula to make it do that?
      I have:

      Plot0.Set(DM(14).DiPlus-DM(14).DiMinus,[0]);

      Comment


        #4
        Hello,
        To have the plot be the absolute value of the differene you will use Math.Abs() for more information on Math.Abs please see the following link: https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx

        I have provided an example below:
        Code:
        Plot0.set(Math.Abs(DM(14).DiPlus-DM(14).DiMinus[0]);
        Cody B.NinjaTrader Customer Service

        Comment


          #5
          Working now except one aspect

          Thanks for the help. I've got it doing almost everything I want. It works on the chart but not in the market analyzer. I am trying to figure out why it returns a different value in the analyzer than it does on the chart.

          Here is a screenshot to show what I mean.


          http://content.screencast.com/users/...05-02_0111.png
          Last edited by Billythekid747; 05-01-2016, 11:12 PM.

          Comment


            #6
            Hello,
            Please change the number of bars look back for the indicator settings on the market analyzer to 256.
            Let us know if you do not see the values appear the same after making this change.
            Cody B.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_CodyB View Post
              Hello,
              Please change the number of bars look back for the indicator settings on the market analyzer to 256.
              Let us know if you do not see the values appear the same after making this change.
              Hello,

              I have made the change, and the market analyzer number updated but still does not match. Here is an image that shows settings of the indicator on the chart compared to the indicator in the market analyzer.

              http://content.screencast.com/users/...05-02_1343.png

              Comment


                #8
                Hello,
                Please either set the Indicator setting to CalculateOnBarClose to false on the chart or set CalculateOnBarClose to true within the Market Analyzer. Please let us know if the values are not the same after adjusting this setting.
                Cody B.NinjaTrader Customer Service

                Comment


                  #9
                  Setting calculate on bar close to True on both worked! I apologize for the oversight--I had set them the same previously but have made so many changes that I lost track. It is working properly now. Thank you again.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by ttodua, Today, 01:52 PM
                  0 responses
                  7 views
                  0 likes
                  Last Post ttodua
                  by ttodua
                   
                  Started by muisca, 05-19-2017, 11:49 AM
                  8 responses
                  6,461 views
                  0 likes
                  Last Post NinjaTrader_Tyler  
                  Started by NinjaTrader_Brandon, Today, 12:08 PM
                  0 responses
                  46 views
                  0 likes
                  Last Post NinjaTrader_Brandon  
                  Started by iq200, Today, 12:00 PM
                  2 responses
                  9 views
                  0 likes
                  Last Post iq200
                  by iq200
                   
                  Started by valhallafutures, Today, 11:33 AM
                  1 response
                  15 views
                  0 likes
                  Last Post NinjaTrader_PatrickG  
                  Working...
                  X