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

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
    BertrandNinjaTrader Customer Service

    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.
        BertrandNinjaTrader Customer Service

        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 Haiasi, 04-25-2024, 06:53 PM
          5 responses
          76 views
          0 likes
          Last Post alancurry  
          Started by ZeroKuhl, Today, 04:31 PM
          0 responses
          16 views
          0 likes
          Last Post ZeroKuhl  
          Started by Vulgoth_t_Destroyer, 05-09-2022, 04:45 PM
          54 responses
          5,337 views
          0 likes
          Last Post Gaterz
          by Gaterz
           
          Started by ETFVoyageur, 05-07-2024, 07:05 PM
          11 responses
          76 views
          0 likes
          Last Post -=Edge=-  
          Started by _Zero_, 04-10-2020, 03:21 PM
          145 responses
          7,902 views
          6 likes
          Last Post johng2
          by johng2
           
          Working...
          X