Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Negative offset

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

    Negative offset

    As discussed in strategy class on weekend, I want to write a negative offset (like a lower Bollinger band but exponential moving average). I wrote this successfully for the upper average as Close[0]==[EMA(10][0]*[1+.75] but for the lower it must be same but the +.75 becomes -.75. I can’t get this to work in the NT strategy editor as it always starts with a positive value. I would appreciate any ideas on the best way to do this.

    #2
    Have you tried entering into the "Offset" parameter

    -0.75

    ?
    RayNinjaTrader Customer Service

    Comment


      #3
      If you're going to use this in a strategy, I'd recommend encapsulating that logic in an indicator so you can easily put it on a chart.

      I don't quite understand the logic you are going for. What is the .75 supposed to be exactly?

      Comment


        #4
        Yes, but it comes out +-.75, and does not plot.

        Comment


          #5
          Right, that is correct.

          - What are you expecting to plot? If you are using a BollingerBand and you have "Plot on chart" enabled, it will plot the BollingerBand indicator itself.
          RayNinjaTrader Customer Service

          Comment


            #6
            In Metastock code I can plot this as "
            C>(Mov(C,10,E)+(.75*(Std(C,8))" The reason I do not use the NT Bollinger is that it only plots as a simple MA and is not adjustable to EMA or whatever. The longside of this plots well using the offest tool as in my orginal post. However, it always defaults to the long side, and does not anticipate a negative offest which is the equivalent of a band below the market.

            Comment


              #7
              So we are on the same page -

              When you say "plotting" you are referring to the EMA on the right side of the condition builder, correct?

              If yes, its plotting the EMA(10) *without* the offset. Offsets are not used to determine plotting but just used to create the condition.
              RayNinjaTrader Customer Service

              Comment


                #8
                It plotted on my chart correctly when I ticked the plot on chart box.

                Comment


                  #9
                  I can assure you that it will *only* plot the EMA(10) and not EMA(10) with an offset.
                  RayNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by charlesugo_1, 05-26-2026, 05:03 PM
                  0 responses
                  51 views
                  0 likes
                  Last Post charlesugo_1  
                  Started by DannyP96, 05-18-2026, 02:38 PM
                  1 response
                  142 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
                  275 views
                  0 likes
                  Last Post Hwop38
                  by Hwop38
                   
                  Working...
                  X