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

MACD conditions in an indicator

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

    MACD conditions in an indicator

    Hello,
    i've a question about macd conditions:
    condition1: macd crossing above slow ema (12)
    condition2: macd crossing below fast ema (26)
    How can i set these conditions ?

    #2
    Just replied to your other thread as well, either you could completely custom code those conditions using the CrossAbove / CrossBelow methods or you setup a strategy with those conditions and then 'view' its code and copy over the snippets needed for your indicator.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks Bertrand for the suggestion,
      but it didn't help me and it's the first time i'm in touch with this strategy wizard.
      I want to know when the macd is above the ema(12)(fast) and when the macd is below the ema(26)(slow).

      Comment


        #4
        Ok, so what exactly did you setup then for those conditions, can you please take a screenshot for us?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Bertrand,
          attached a screenshot.
          As you can see:
          the green line is the fast (ema(12)) from macd
          the red line is the slow (ema(26)) from macd
          the dots are the macd.
          What i want is a signal
          - when the macd (dots) are above the green line (ema(12))
          - when the macd (dots) are below the red line (ema(26))

          Never IN the green shadow nor ON the green/red lines

          The purpose is to have only the price panel to trade with the necessary signals from certain indicators. This would then be only once indicator as overlay on my price panel.
          Attached Files
          Last edited by mate41; 11-07-2011, 09:54 AM.

          Comment


            #6
            mate41, then you would need to custom code this either in an indicator or strategy, you can access the values of those plots from the study you reference. If you haven't custom coded before I would recommend you taking a look at those tutorials here to get more familiar :



            Alternatively the signal could also be setup in the wizard :

            BertrandNinjaTrader Customer Service

            Comment


              #7
              Solved

              Bertrand,
              i know these links.
              I have solved it by enlarge the macd deviation from the trigger lines.

              Comment


                #8
                Glad to hear you could resolve it for you.
                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by bortz, 11-06-2023, 08:04 AM
                47 responses
                1,603 views
                0 likes
                Last Post aligator  
                Started by jaybedreamin, Today, 05:56 PM
                0 responses
                8 views
                0 likes
                Last Post jaybedreamin  
                Started by DJ888, 04-16-2024, 06:09 PM
                6 responses
                18 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by Jon17, Today, 04:33 PM
                0 responses
                4 views
                0 likes
                Last Post Jon17
                by Jon17
                 
                Started by Javierw.ok, Today, 04:12 PM
                0 responses
                12 views
                0 likes
                Last Post Javierw.ok  
                Working...
                X