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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      67 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      36 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      60 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      62 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X