Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy with plot that has N/A values as signal

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

    Strategy with plot that has N/A values as signal

    hi - not sure if this is the right forum group so apologies in advance if this is the wrong place.

    I have developed an indicator with Ninja Script that produces produces two plots - LongSignal and ShortSignal. When these plots have a non N/A value, I have a visual mark on the chart for entries.

    Now, I want to use these plots to create an automated strategy. So, basically, whenever the plot is not N/A, I'd like to enter a position.

    My questions are:

    1. In terms of the relationship between Indicators and Strategies, is this the right approach? I mean, using the plot values in an indicator to generate trade signals in a strategy.

    2. Can I create a strategy that has a constraint based on N/A values in the dataseries with the Strategy wizard or is that only possible by coding the strategy with Ninja Script.

    thanks in advance for any help you may offer
    Onn

    #2
    Hi Onn, why would you attempt to access the N/A plots? Because the multipart coloring approach from 6.5 times is used in the signal indicator?

    The easier way would be updating the script to NT7's PlotColor approach and then you would only deal with comparisons involving one plot - http://www.ninjatrader.com/support/h...plotcolors.htm

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Hi Onn, why would you attempt to access the N/A plots? Because the multipart coloring approach from 6.5 times is used in the signal indicator?

      The easier way would be updating the script to NT7's PlotColor approach and then you would only deal with comparisons involving one plot - http://www.ninjatrader.com/support/h...plotcolors.htm

      Hi and thanks for the response. Perhaps I did not explain myself good enough. I have an indicator. That indicator has logic in it that produces trading signals. I plot these signals on the chart. So for this plot, I have indexes in which the value is not set and indexes where the value is set. Where it is set, it is set to the price at which the signal is displayed on the chart - right?

      Now, I want to overlay trading based on these signals. This plot line is "exposed" from the indicator. So I can effectively create a condition that when the value is set, enter a trade. Going back to my original post and questions: 1. Is this the right approach and 2. In the strategy wizard, when I select the plot as my condition, is there a way to create a condition that says: if the plot value is set (i.e., not N/A).

      I hope that this is more clear now.

      Onn

      Comment


        #4
        You can unfortunately not check for an N/A plot in the wizard Onn, hence my suggestion to change the indicator logic to make it more easily workable in a custom strategy.

        Yes, you can generally use the indicator plots to create trading signals, their values are exposed and accessible.

        Comment


          #5
          Yes, You can use the plot values in an indicator to generate trade signals in a strategy.
          In strategy you can evaluate plot value by ContainsValue(barsAgo). If ContainsValue(barsAgo) return false, the plot value is N/A.

          Cheers!

          Originally posted by onnb1 View Post
          hi - not sure if this is the right forum group so apologies in advance if this is the wrong place.

          I have developed an indicator with Ninja Script that produces produces two plots - LongSignal and ShortSignal. When these plots have a non N/A value, I have a visual mark on the chart for entries.

          Now, I want to use these plots to create an automated strategy. So, basically, whenever the plot is not N/A, I'd like to enter a position.

          My questions are:

          1. In terms of the relationship between Indicators and Strategies, is this the right approach? I mean, using the plot values in an indicator to generate trade signals in a strategy.

          2. Can I create a strategy that has a constraint based on N/A values in the dataseries with the Strategy wizard or is that only possible by coding the strategy with Ninja Script.

          thanks in advance for any help you may offer
          Onn

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          649 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          370 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          109 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          573 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          576 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X