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 charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          56 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          143 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          160 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          96 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          276 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X