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 CarlTrading, 03-31-2026, 09:41 PM
              1 response
              152 views
              1 like
              Last Post NinjaTrader_ChelseaB  
              Started by CarlTrading, 04-01-2026, 02:41 AM
              0 responses
              87 views
              1 like
              Last Post CarlTrading  
              Started by CaptainJack, 03-31-2026, 11:44 PM
              0 responses
              131 views
              2 likes
              Last Post CaptainJack  
              Started by CarlTrading, 03-30-2026, 11:51 AM
              0 responses
              127 views
              1 like
              Last Post CarlTrading  
              Started by CarlTrading, 03-30-2026, 11:48 AM
              0 responses
              106 views
              0 likes
              Last Post CarlTrading  
              Working...
              X