Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

macd crossover

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

    macd crossover

    hi

    How can I develop a strategy that is based on the fast crossing over the slow in a macd ?
    So far I have only been able to get rising or falling macd to work properly.
    Cant seem to pull the slow or fast out of macd for a crossover strategy.

    thanks

    shane

    #2
    Shane, you could check into the attached example from the wizard interface. It would execute Market Orders to go Long / Short on the MACD plot crossing the AVG plot of the MACD system indicator.
    Attached Files

    Comment


      #3
      hi

      thanks for that

      after looking at the code, I could not see how to do the one plot crossing over the other.
      But I can just save that and build off of that right ?
      It is not protected code ?
      How do you select the macd plot out of the macd indicator, or just select the avg plot ?
      I seem to only be able to select the whole indicator.

      anyway, thanks so much for the sample
      I appreciate that.

      shane

      Comment


        #4
        Shane, it's not protected in any way but done via the wizard interface. You can hit the view code button and then would see this condition used - the default MACD value is checked for a cross with the .Avg Plot value:

        if (CrossAbove(MACD(12, 26, 9), MACD(12, 26, 9).Avg, 1))
        {
        EnterLong(DefaultQuantity, "");
        }

        Comment


          #5
          thanks for pointing it out !
          I overlooked that.
          I appreciate your help with this.

          thanks again

          shane

          Comment


            #6
            i had been looking at the other macd sample which appears to be a rising and falling macd.

            thanks
            shane

            Comment


              #7
              No worries Shane, glad to help.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by CarlTrading, 03-31-2026, 09:41 PM
              1 response
              37 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by CarlTrading, Yesterday, 02:41 AM
              0 responses
              17 views
              0 likes
              Last Post CarlTrading  
              Started by CaptainJack, 03-31-2026, 11:44 PM
              0 responses
              25 views
              1 like
              Last Post CaptainJack  
              Started by CarlTrading, 03-30-2026, 11:51 AM
              0 responses
              40 views
              0 likes
              Last Post CarlTrading  
              Started by CarlTrading, 03-30-2026, 11:48 AM
              0 responses
              34 views
              0 likes
              Last Post CarlTrading  
              Working...
              X