Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Signal does not tally with Plots

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

    Signal does not tally with Plots

    Hello Support,

    While trying out DoubleMA in a strategy, I notice Signal (not plotted in DoubleMA but available as output) most of the time tally with the Rising and Falling plots, but sometimes it does not. If you open the DoubleMA code, it is very simple:

    if (rising)
    { RisingPlot.Set(1, val2); RisingPlot.Set (0,val1); Signal.Set(1); }
    else if (falling)
    { FallingPlot.Set(1,val2); FallingPlot.Set(0,val1); Signal.Set(-1); }
    else
    { NeutralPlot.Set(1, val2); NeutralPlot.Set(0,val1); Signal.Set(-1); }

    So I would expect when FallingPlot is plotted (from previous bar to current bar) Signal is -1, but when I test it in a cript sometimes Signal is still 1. This results in an incorrect entry filtering. Vice versa for the RisingPlot.

    I also do a test on DoubleMA(...).FallingPlot.ContainsValue(0), sometimes it returns false, while FallingPlot is plotted to current bar. (ie. when Signal is incorrect 1).

    This behaviour is annoying. What is going on? How to fix it ?

    Thanks.

    Best Regards.

    EdwardK.

    #2
    Correction, for NeutralPlot, Signal.Set(0).

    Rgds.

    Comment


      #3
      Hi Edward Kunafi,

      You can try using Print() statement to identify what's going on within the code.
      More info at - http://www.ninjatrader.com/support/f...ead.php?t=3418

      Aside from that, you will need to contact the creator for more information.
      TimNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      669 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      378 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      111 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      575 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      580 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X