Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 helpwanted, Today, 03:06 AM
              1 response
              10 views
              0 likes
              Last Post sarafuenonly123  
              Started by Brevo, Today, 01:45 AM
              0 responses
              8 views
              0 likes
              Last Post Brevo
              by Brevo
               
              Started by aussugardefender, Today, 01:07 AM
              0 responses
              5 views
              0 likes
              Last Post aussugardefender  
              Started by pvincent, 06-23-2022, 12:53 PM
              14 responses
              242 views
              0 likes
              Last Post Nyman
              by Nyman
               
              Started by TraderG23, 12-08-2023, 07:56 AM
              9 responses
              386 views
              1 like
              Last Post Gavini
              by Gavini
               
              Working...
              X