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

Statergy Development

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

    Statergy Development

    Hi

    I want to write a code to display the stocks of an exchange (nasdaq etc.) satisfying the criteria
    1. the price action consisting the Series Of Higher Highs Last 2 or 3 Bars and Series Of lower lows of last 2 or 3 bars for both monthly and weekly data.
    2. Price action consisting the series of Lower highs and lower lows for both monthly and weekly data

    can you please let me know how and where should i write the code. It would be helpful if you can give me the code

    Thanks
    Praveen

    #2
    Hello,

    Thank you for your writing in.

    While we will not develop the indicactor for you, I will provide a complete answer of my findings.

    Thanks for your patience.
    Last edited by NinjaTrader_Jim; 12-29-2016, 10:01 AM.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hello praveenramadurai,

      I have reviewed your inquiry and have devised a plan of action.

      You may perform this task with a custom indicator applied to the Market Analyzer.

      The custom indicator must have logic to fulfill your checks. I would use MAX() and MIN(). We must also make this value accessible from outside the indicator, so I would recommend creating this indicator with a Plot that we may set within this logic. We suggest to generate the indicator with the Indicator Builder when using Plots. This is accessible by right-clicking the indicators folder within a NinjaScript Editor window.

      Once the condition is met you may set the Plot indicating that you want the stock to be viewed in the Market Analyzer.
      Code:
      MyPlot[0] = 1; // Set this when your logic becomes true
      MyPlot[0] = 0; // Set this when your logic is false, or within an else statement
      Next, we must add all of the stock instruments we would like to view from NASDAQ to a Market Analyzer.
      • Open a new Market Analyzer from the Control Center by clicking New>Market Analyzer
      • From the Market Analyzer Window, right-click and select Add Instruments...>NASDAQ 100>Select All. You may add other instruments by Search menu item, or add your desired instruments individually.


      Finally, the Market Analyzer can use filter conditions based on the indicator's Plot value if it should be listed or not.
      • From the Market Analyzer window, right click and select Columns...
      • Double-click Indicator from the Available column in the top left
      • Select the added Indicator column to be shown in the lower left, and select your custom indicator from the pulldown menu form the Properties column
      • At the bottom of the Properties column, we may click Add condition next to the Filter option.
      • From the Filter window, we may add a condition that checks if the indicator is plotting, and we may hide these rows from the Market Analyzer if the Plot value is a 0 or 1.


      Please see here for more information on using conditions in the Market Analyzer: http://ninjatrader.com/support/helpG...lter_condi.htm

      If you have any other questions, please don't hesitate to ask.
      JimNinjaTrader Customer Service

      Comment


        #4
        code to display the list of stocks

        Hi Thanks for reply

        I am more interested in displaying the stocks which has hit my conditions like "stocks hitting 52 week high, stock hitting 52 week low, stocks hitting 4 week high etc." I would like display the list of stocks for my further analysis.

        One such scenario is to display the list of stocks which is continuously exceeding previous high for last 2 or 3 months and vice versa for previously low.

        Can you please help. please let me know for further queries.

        Thanks
        Praveen

        Comment


          #5
          Hello Praveen,

          Thanks for writing back.

          The technique outlined will only display stocks in your Market Analyzer when the indicator's conditions allow them to be displayed. The idea is to add instruments to the Market Analyzer that might be listed. All potential instruments must be added so the indicator can analyze them and trigger a filter condition in the Market Analyzer that will allow the instrument to be listed.

          For example, when a stock is continuously exceeding previous high for last 2 or 3 months, and your indicator logic sets a plot based on this condition, the Market Analyzer will register that the indicator has a plot value, and a filter condition will allow it to be displayed. If the condition in the indicator is false, the Market Analyzer will register a plot value that indicates that the stock should not be listed.

          Please let me know if I may be of further assistance.
          JimNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Option Whisperer, Today, 09:55 AM
          1 response
          11 views
          0 likes
          Last Post bltdavid  
          Started by port119, Today, 02:43 PM
          0 responses
          1 view
          0 likes
          Last Post port119
          by port119
           
          Started by Philippe56140, Today, 02:35 PM
          0 responses
          3 views
          0 likes
          Last Post Philippe56140  
          Started by 00nevest, Today, 02:27 PM
          0 responses
          1 view
          0 likes
          Last Post 00nevest  
          Started by Jonafare, 12-06-2012, 03:48 PM
          5 responses
          3,986 views
          0 likes
          Last Post rene69851  
          Working...
          X