Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AI Generate custom indicator?

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

    AI Generate custom indicator?

    Hi,

    Can I use a custom indicator with the AI Generate optimization?
    If so, any direction would be appreciated.

    Thanks,
    Erik

    #2
    Yes, if the custom indicator only uses one data series.

    See the following walk-through, and expand the section How to Run an AI Generate Optimization:

    https://ninjatrader.com/support/help...i-generate.htm
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Hello Erik,

      The AI Generator is not designed to produce indicators. This instead is using a set of pre listed indicators to find combinations of conditions that place orders and lead to a performance result.

      It's not designed to set plot values or draw objects, or do things that indicators do.

      That said, you can copy the logic from a strategy to a new indicator script and remove any order related code.

      Below is a link to a video about copying code from one script to another.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Hi all thanks for the responses.

        I have an indicator called "MyInd".
        I added it her:

        Code:
            public class StrategyGenerator : Optimizer
            {
                private int                        oldKeepBestResults            = -1;
                private    ChartPattern[]            selectedCandleStickPattern;
                private Type[]                    selectedIndicatorTypes;
        
                public    static ChartPattern[]    AvailableCandleStickPattern    = Enum.GetValues(typeof(ChartPattern)).Cast<ChartPattern>().ToArray();
        
                // Subjective selection of indicators which 'make most sense'. The full set of indicators would be used if this selection would not be set
                // The optional tuple defines the range of random comparison values for oscillators (where such range could be defined)
                // Feel free to modify to your liking...
                internal    static Dictionary<Type, Tuple<double, double>> AvailableIndicators = new Dictionary<Type, Tuple<double, double>>()
                                                                {
                                                                    { typeof(Indicators.MyInd),                       null },
                                                                    { typeof(Indicators.ADL),                       null },​
        It shows up when I run AI Generate as an indicator I can select for my AI Optimization.
        When I try to run the AI Generate with "MyInd" selected as one of the indicators to use the application hangs.

        Can anyone give me any ideas on what I may be doing wrong and\or if this is possible to do?

        Thanks,
        Erik

        Comment


          #5
          Hello Erik,

          This appears to be code for a custom optimizer script and not an indicator.

          This would imply you are not using the AI Generate or you have posted the code from the wrong script.

          That said, I would recommend you comment out all of the logic and variables and ensure the issues does not occur, then uncomment (blocks) of variables first, then logic one line at a time, until the behavior returns. There may be issues (such as improper auto setters that get stuck in a loop) causing the behavior.
          Commenting out code will help you zero in on the specific line causing the error.
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by justin74444, Today, 03:50 AM
          0 responses
          2 views
          0 likes
          Last Post justin74444  
          Started by Pabulon, Today, 03:08 AM
          0 responses
          7 views
          0 likes
          Last Post Pabulon
          by Pabulon
           
          Started by sukhob, 05-18-2023, 08:26 PM
          2 responses
          128 views
          0 likes
          Last Post TraderJA  
          Started by timwey, Yesterday, 10:55 AM
          4 responses
          24 views
          0 likes
          Last Post timwey
          by timwey
           
          Started by DJ888, 06-28-2024, 10:18 PM
          3 responses
          39 views
          0 likes
          Last Post AdamDJ8
          by AdamDJ8
           
          Working...
          X