Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 joselube001, 05-10-2024, 12:17 PM
      6 responses
      25 views
      0 likes
      Last Post joselube001  
      Started by bigc0220, 09-18-2018, 09:16 AM
      6 responses
      2,579 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by lorem, 04-25-2024, 09:18 AM
      18 responses
      77 views
      0 likes
      Last Post lorem
      by lorem
       
      Started by DawnTreader, 05-08-2024, 05:58 PM
      21 responses
      81 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by doihaveto13, Today, 12:46 PM
      2 responses
      4 views
      0 likes
      Last Post doihaveto13  
      Working...
      X