Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How can I include "flat" MA conditions in strategy?

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

    #16
    Sorry I don't follow you - if the slope is a consideration for an entry signal, then it would automatically not take any trades in your designated MA flat area, as simple no condition for entry would evaluate to 'true' and thus trigger an entry into the market by your strategy. You don't have to tell it not to enter, it would not enter if none of the conditions triggered.

    Comment


      #17
      Hi Bertrand,

      The flat ma slope conditions are not entry signals, they are the opposite. They are signals not to trade:

      Entry signal:
      if (ZeroLagTEMA(ZLTEMA).ZeroTEMA[0] >ZeroLagHATEMA(ZLHATEMA).ZeroHATEMA[0]
      && Position.MarketPosition == MarketPosition.Flat
      && (Rising(anap)
      && Close[0] > ZeroLagHATEMA(ZLHATEMA).ZeroHATEMA[0]))

      GoLong();

      Signal NOT to trade:
      if (Slope(anaHoltEMA(80, 20).HoltEMA, 5, 0) < 0.00091
      && Slope(anaHoltEMA(80, 20).HoltEMA, 2, 0) > -0.003)

      Comment


        #18
        Shadowshorter, you would need to include your Slope condition in the entry, otherwise it would not work as filter, a signal not to take a trade is no signal...

        if (Slope(anaHoltEMA(80, 20).HoltEMA, 5, 0) < 0.00091
        && Slope(anaHoltEMA(80, 20).HoltEMA, 2, 0) > -0.003)

        Change the thresholds / comparisons for the slope so you filter for the slope conditions that would allow an entry then, so inverse basically of your current logic.

        Comment


          #19
          Hi Bertrand,

          I was trying this but I can't seem to find the opposite settings to my ma flat conditions.

          Will keep trying, thanks for all your time, you've been very helpful

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          634 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