Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem showing arrows and sounds on strategy wizards

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

    #16
    Unfortunately I'm not sure from the screenshot what this would be doing. It looks like it is offsetting an indicator value 1 tick. This will have no effect on the position of arrows.

    Please let us know what you expect offset to be doing here.
    Ryan M.NinjaTrader Customer Service

    Comment


      #17
      Offset sar

      Hi Ryan, tied to capture whole screen but as 3 meg and said file was too big to save. So what this screen shows is on offset of the SAR. If I plot this SAR strategy on the chart to replace the offset SAR you see on the image it wont offset but appear one bar over to the right. The triangle will just follow the SAR so not worried about that one. Cheers. DJ.

      Code from SAR strategy. Even though I offset SAR does not show in code from strategy wizard:

      / Condition set 1
      if (CrossBelow(Close, ParabolicSAR(0.015, 0.4, 0.04), 1)
      && Close[0] < EMA(34)[0])
      {
      DrawTriangleDown("My triangle down" + CurrentBar, false, 0, Close[0] + 20 * TickSize, Color.Red);
      PlaySound(@"C:\Program Files\NinjaTrader 7\sounds\Russell SAR Sell signal.wav");
      }

      Comment


        #18
        I think what you are after instead is displacement. The offset only applies to the vertical axis. If you'd like to change the visual position of indicators relative to the bars they're calculated from, this is displacement.

        Displacement can only be set by hard coding this value in the Indicators Initialize() method or setting through the GUI when you add an indicator to your chart.

        Ryan M.NinjaTrader Customer Service

        Comment


          #19
          Hi Ryan, ok, thanks for clarifying. Ok so now I have no put displacement in as per your example but still now working. Actually the code wont compile at all. Says in the error code it needs a name, not sure why the term displacement needs to be defined. Any ideas on this one? Thanks. DJ
          Attached Files

          Comment


            #20
            Displacement cannot be defined in a strategy. It's only defined in an indicator and only affects the visual position of indicators, not calculations.
            Ryan M.NinjaTrader Customer Service

            Comment


              #21
              Sar

              Oh. So is it possible to put the code below in the indicator? If not are you saying it is impossible to dispalce an arrow and sound file based on a displaced SAR indiactor? Thanks

              // Condition set 1
              if (CrossBelow(Close, ParabolicSAR(0.015, 0.4, 0.04), 1)
              && Close[0] < EMA(34)[0])
              {
              DrawTriangleDown("My triangle down" + CurrentBar, false, 0, Close[0] + 20 * TickSize, Color.Red);
              PlaySound(@"C:\Program Files\NinjaTrader 7\sounds\Russell SAR Sell signal.wav");
              }

              // Condition set 2
              if (CrossAbove(Close, ParabolicSAR(0.015, 0.4, 0.04), 1)
              && Close[0] > EMA(34)[0])
              {
              DrawTriangleUp("My triangle up" + CurrentBar, false, 0, Close[0] + -20 * TickSize, Color.Lime);
              PlaySound(@"C:\Program Files\NinjaTrader 7\sounds\Russell SAR Buy signal.wav");

              Comment


                #22
                Hello djkiwi,

                Yes, what you are seeing is hard coded into NinjaTrader and cannot be customized.

                Conditions are evaluated each bar. If there's any action to take when true, then those actions will take place on the next bar following the condition. Actions could be order placement or arrow drawing. There's no way to customize this behavior on an historical basis.

                When running in real-time, you can set CalculateOnBarClose to false to have actions processed on the same bar when true.
                Ryan M.NinjaTrader Customer Service

                Comment


                  #23
                  Market analyzer not showing same as chart indicators

                  Hi Ryan, I have setup market analyzer to action sound alerts when momentum, macd, Dm cross different thresholds. These work fine. The problem though is when I compare the indicators numbers in analyzer v the numbers on the chart they are often materially different. For example analyzer may show 3 for momentum but chart will show 1. I am using Renko 6 charts and calculate=false. All of the parameters are exactly the same as I have triple checked. Now if I edit a column in analzyer and apply then all is ok but then over time the analyzer and the chart drift apart. I am now not sure which one is correct or why the results are different.

                  Any ideas on this one?

                  Cheers
                  DJ

                  Comment


                    #24
                    Update

                    Hi Ryan, charts and market analyzer were showing exactly the same results then at 10.45 EST the chart/anayzer has started to drift off again.

                    Cheers
                    DJ

                    Comment


                      #25
                      Most likely need to double check some settings here.
                      • Market Analyzer is using exact same session template as chart
                      • Indicator on market analyzer is using correct series
                      • Check that the same bars back is loaded as renko charts is heavily dependent on bars loaded.
                      Let us know what you find out.
                      Ryan M.NinjaTrader Customer Service

                      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