Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Price close widen from moving average

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

    Price close widen from moving average

    anyone have formula to find price close that widen from from moving average let say,


    Close widen by 10% from MA
    Attached Files

    #2
    Not sure what you mean by widen. If you mean 10% higher then the moving average then the code would be something like this:
    Code:
    if (Close[0] >= EMA(10)[0] * 1.10)
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Are you looking for something like a moving average envelope ?

      TW

      Originally posted by mydet View Post
      anyone have formula to find price close that widen from from moving average let say,


      Close widen by 10% from MA

      Comment


        #4
        it just like price is move far away from moving average. it not like band/envelope

        if close > MA

        * just close above

        what i want close is widen by let say 10, 20 or 30 % from MA(look picture) + sample from other program
        Attached Files

        Comment


          #5
          mydet,

          We are not sure by what you mean "widen". You are going to need to describe it. If it is simply 10% above the MA then the code I provided you earlier will do that.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            thank for the code just need to modified a bit, it work now

            if (Close[0] >= EMA(200)[0]* 1.01)
            BarColor = Color.Green;

            just 1 more question, how to prevent the arrow from being move.


            Attached Files

            Comment


              #7
              >> just 1 more question, how to prevent the arrow from being move
              Is this on replay? If so, the is a limitation which can't be overcome for now. We have this on our list for NT7 though.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              576 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              334 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              101 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              553 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              551 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X