Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Swing Indicator results incorrect when CalculateOnBarClose is false - Solution

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

    Swing Indicator results incorrect when CalculateOnBarClose is false - Solution

    The Swing Indicator produces different results when Live or in Market Replay when CalculateOnBarClose is false compared to COBC true.

    See attachment "NT7 Swing CalculateOnBarClose True vs False..." which demonstrates this bug.

    I have copied Swing Indicator provided by NinjaTrader to the indicator MySwing and corrected the problem.

    See attachment "NT7 MySwing CalculateOnBarClose True vs False..." which demonstrates the bug fix.

    Attached is the full source for MySwing that solves this problem.

    Please be aware that the Indicators CandleStickPattern and CandleStickPatternAll also use the Swing Indicator and will produce incorrect results with CalculateOnBarClose set to false. These can be fixed by coping those indicators and referencing MySwing instead of Swing.
    Attached Files

    #2
    Hello AusTrader,

    Thanks for your post.

    I have confirmed your observations.

    Thanks for your efforts to code and report.

    We will investigate further and will update this thread when we have further information.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hello AusTrader,

      We have completed our review of this and have concluded that we will retain the current functionality of the Swing indicator as is.

      You are welcome to post your solution in the NinjaTrader forums file sharing area.

      Thank-you.
      Paul H.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by kaywai, 09-01-2023, 08:44 PM
      5 responses
      601 views
      0 likes
      Last Post NinjaTrader_Jason  
      Started by xiinteractive, 04-09-2024, 08:08 AM
      6 responses
      22 views
      0 likes
      Last Post xiinteractive  
      Started by Pattontje, Yesterday, 02:10 PM
      2 responses
      19 views
      0 likes
      Last Post Pattontje  
      Started by flybuzz, 04-21-2024, 04:07 PM
      17 responses
      230 views
      0 likes
      Last Post TradingLoss  
      Started by agclub, 04-21-2024, 08:57 PM
      3 responses
      17 views
      0 likes
      Last Post TradingLoss  
      Working...
      X