Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MACD strategy

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

    #16
    Thanks Bertrand!


    If I apply this stops and targets setting, that means the order will be exited automatically.

    Then what setting I have to change to avoid "double exit"?

    My original setting is MACD cross above then enter one and MACD cross below then exit one.

    Comment


      #17
      jp2890, you don't have to worry about a double exit, as the Exit() methods would only attempt to exit a position if you had one, so for example if you target has hit first and the MACD sells, the MACD sell to exit the position would be ignored.

      Comment


        #18
        Thanks Bertrand!

        Another question is how to set a strategy solely depends on one line of indicator?

        e.g. the rising of MA 10 to enter long and falling of MA 10 then enter short?

        Comment


          #19
          jp2890, you could just use the CrossAbove / Below to express this, just compare the current MA value to the one of 1 bar ago then -

          Comment


            #20
            Thanks Bertrand!

            I would like to set a strategy solely on the rising or falling of one MACD say 12,26, could you give some more instructions?

            Thanks!

            Comment


              #21
              Just select 'Rising' from Misc on the left side and use it on your MACD, then compare to a bool value of 'true' (also found in misc category) on the right side for your condition.

              Comment


                #22
                compare is "=" right ?

                then what is "!=" ?


                Thanks Bertrand!

                Comment


                  #23
                  Comparing for equailty is == the opposite would be !=

                  One equal sign is an assignment of a value for example -

                  Code:
                   
                  myValue = Close[0];
                  Please also see the attached screenshot for the needed wizard setup.
                  Attached Files

                  Comment


                    #24
                    -Continued previous questions in respect of Rising/Falling macd strategy:

                    if I want to compare rising/falling not to 1 previous data but 2 or 3,

                    what should I set ?

                    Thanks!

                    Comment


                      #25
                      Then you can use just compare the MACD value to the value of for example 20 bars back (barsAgo parameter) -

                      Comment


                        #26
                        Let me make the question clear.

                        I would like to write a MACD strategy:

                        Enter Long: MACD line cross below Diff - OK completed

                        Exit Long: the current MACD line smaller than 5 bars ago, i.e. MACD is declining.

                        Please advise.

                        Comment


                          #27
                          Select the MACD indicator on the left side and then compare (<) to the same MACD indicator value on the right side, but set barsAgo to 5.

                          Comment


                            #28
                            Thanks Bertrand!

                            Comment


                              #29
                              Can I set 2 exits conditions and tell the system to execute whichever condition appear earlier?

                              Comment


                                #30
                                Sure, just define 2 exits, if there's no position to exit from (i.e. other exit triggered first) it would be ignored.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                633 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                364 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                105 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                567 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                568 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X