Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DM Crossover in Market Analyzer

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

    DM Crossover in Market Analyzer

    I appreciate this question has probably been asked before but I am not a programmer and am struggling to do what I think is something very simple!

    All I want to do is add a column to the market Analyzer window which tells me the status of the DI+ and DI- Values i.e. whether the DI+ > DI- or vice versa and therefore also set up an alert to let me know when they cross.

    I've seen several articles giving hints on how to do this but I just can't get it to work. I was thinking it would simply be a case of enhancing the DM indicator that already exists but I am struggling with basic syntax, so if any one could post the code to do this it would be really appreciated

    Many thanks,

    Neil

    #2
    Hello Neil,
    Welcome to the forum and I am happy to assist you.

    A basic crossover syntax of the DI+ and DI- will look like:
    Code:
    if (CrossAbove(DM(14).DiPlus, DM(14).DiMinus,1))
    {
    	Alert("id", Priority.High, "Di+ > Di-", "Alert2.wav", 1, Color.Green, Color.Yellow);
    }
    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Great thank you...

      So do I just literally place that code into a new indicator and compile?

      Cheers

      Comment


        #4
        Hello Neil,
        I just provided the basic concept and a framework for the code. You have to modify it as per your need. For example the sample code uses a 14 period DM to calculate the value. You may want to change it to a different value etc etc.

        Please let me know if I can assist you any further.
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          hi, i have not quit gotten the i idea what to do such that the Market analyzer alerts me when DI plus crosses over DI minus.
          i do not know how to proceed after i put indicator as DM on the alert column.

          please help

          Comment


            #6
            Hello Gathaiya,

            Thank you for your post and welcome to the NinjaTrader Support Forum!

            You can use Joydeep's example below to create an alert for when the Di+ crosses above the Di-:
            Originally posted by NinjaTrader_Joydeep View Post
            Hello Neil,
            Welcome to the forum and I am happy to assist you.

            A basic crossover syntax of the DI+ and DI- will look like:
            Code:
            if (CrossAbove(DM(14).DiPlus, DM(14).DiMinus,1))
            {
            	Alert("id", Priority.High, "Di+ > Di-", "Alert2.wav", 1, Color.Green, Color.Yellow);
            }
            Please let me know if I can assist you any further.
            Please let me know if I may be of further assistance.

            Comment


              #7
              Originally posted by Gathaiya View Post
              hi, i have not quit gotten the i idea what to do such that the Market analyzer alerts me when DI plus crosses over DI minus.
              i do not know how to proceed after i put indicator as DM on the alert column.

              please help
              I think you should build an indicator that mimics the function of DM and add a condition of alerts you want and test it in the Market Analyzer and add two columns right there and the first column is for the DI plus values and the second one is for DI minus. In that case you can see the values and also open an Alert window or screen so that you can see the alerts being fired. Let me know if you are interested in my idea.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by CortexZenUSA, Today, 12:53 AM
              0 responses
              1 view
              0 likes
              Last Post CortexZenUSA  
              Started by CortexZenUSA, Today, 12:46 AM
              0 responses
              1 view
              0 likes
              Last Post CortexZenUSA  
              Started by usazencortex, Today, 12:43 AM
              0 responses
              5 views
              0 likes
              Last Post usazencortex  
              Started by sidlercom80, 10-28-2023, 08:49 AM
              168 responses
              2,265 views
              0 likes
              Last Post sidlercom80  
              Started by Barry Milan, Yesterday, 10:35 PM
              3 responses
              11 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Working...
              X