Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

development issues

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

    development issues

    Hi Ninjatrader experts

    query 1
    I have defined 2 indicators for myself: ema(21) and sma(89), now I want to check whether ema(21) is above sma(89). how should i do that?

    query 2
    I use my custom indicator as a filtre in the market analyzer. (using kinetick daily data - nasdaq100, sp500). I don't see why some charts are of "normal" length, while others return just 59 days worth of data (i see only 59 candles).

    query3
    is there a way of adding more US stocks to the Market Analyzer free of charge - more than just sp500, nasdaq100, dow30 - maybe using Kinetick's EOD data or other feeds? what is the best way of doing that (for free)?

    you help is much appreciated

    Jonas

    #2
    Hi Jonas, thanks for the post:

    1. Is this question referring to setting this up without custom coding in the Market Analyzer?

    2. I don't fully follow you here - have you tried reloading historical data for your 'issue' symbols on the charts directly? You could do this via a right click > Reload Historical data.

    3. You can definitely custom add symbols to your database, please see this info here - http://www.ninjatrader.com/support/h...e_database.htm

    For batch adding multiple symbols, this would be best - http://www.ninjatrader.com/support/h...stock_symb.htm

    For supporting symbols and mappings, you can check into this search - https://www.kinetick.com/support#Symbol-Search

    Comment


      #3
      Hi Bertrand,

      Than you very much for your insightful reply. It is really helpful.

      So with regards to Query 3 - all sorted, great! Thank you.

      Query 2
      as you said, I right clicked > Reload Historical data. it worked! Thank you. Now I see a complete picture (much more candles) and all my averages represented. My question here: how can I force it to show everything properly (without having to rightclick). maybe I should change comething in my custom indicator's code?

      Query 1.
      If I got you right, then No - everything is coded in the custom indicator, not market analyzer. I then use this custom indicator as a filter in the m.a. If all the conditions are met, then 1 is returned. That's how I do stock screening.
      I would like to add two new conditions:
      if ema(21) is above sma(89)
      and
      if the Height between ema(21) and sma(89) i less than X
      and
      if it happened during the last Y days
      Then Return 1.

      If you could teach me how could I achieve this, that would be wonderful.

      Query 4. where can I read more about custom coding in the market analyzer.

      Thank you

      Jonas

      Comment


        #4
        Hello,

        2. There is no way to force the reload from the script. Under tools--> options--> data tab do you have 'get data from server' checked? This should ensure all historical data is downloaded when you open a market analyzer.

        1. You would need to expose a data series or a plot that can be used in the market analyzer and display a value of 1 for example

        Please see our Reference Sample on Exposing indicator values that are not plots:

        MatthewNinjaTrader Product Management

        Comment


          #5
          Hi Matthew,

          Thanks for your post.
          I have checked the scripts of both indicator and strategy that you sent me. I wonder if there is an easier way to achieve:
          if ema(21) is above sma(89)
          and
          if the Height between ema(21) and sma(89) i less than X
          and
          if it happened during the last Y days
          Then Return 1.
          You see, my custom indicator is already checking for higher highs and higher lows. If this happens, then 1 is returned. I wonder why can't I just embed these additional conditions above in some easy way to the same indicator. I am just the beginner and your method is a bit too complex to me. Surely, if there's no alternatives, I'll try to implement it as per your suggestion.
          Please advise if you think there's no alternative way to the one you suggested.

          Thanks

          Comment


            #6
            It should be pretty straight forward to check for the first two conditions, see the pesudo code below:

            //if ema(21) is above sma(89)
            Code:
            EMA(21)[0] > SMA(89)[0];
            //if the Height between ema(21) and sma(89) i less than X
            Code:
            double height = EMA(21)[0] - EMA(89)[0];
            height < X
            Once you have these conditions, you can use MRO (Most Recent Occurence ) to check that it happened within Y days:



            Code:
            		int ago = MRO(delegate {return EMA(21)[0] > SMA(89)[0] && height < X;}, 1, Y);
            			if(ago > -1)
            			
                        Plot0.Set(1);
            I hope this helps get you started.
            MatthewNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

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