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 argusthome, 03-08-2026, 10:06 AM
              0 responses
              116 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              61 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              40 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              44 views
              0 likes
              Last Post TheRealMorford  
              Started by Mindset, 02-28-2026, 06:16 AM
              0 responses
              82 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Working...
              X