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

How can NT scan for stock having entry signal from Trading Strategy recently?

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

    How can NT scan for stock having entry signal from Trading Strategy recently?

    Hi,

    I'm a newbie of NT8. Understand NT has trading strategy which can be applied on stock chart and show the buy and sell signal. Rather than having a stock to start the strategy first, is there any way NT can allow us to scan from a list of stocks and identify those stocks which have an entry signal recently (say today or last few days) for a given strategy?
    In other words, we are scanning for stock having entry signal for a given strategy without knowing which are the candidates?

    Much Appreciate your inputs!

    MC

    #2
    Hello mikechan883,

    Thanks for your post.

    I think this would be best accomplished by creating the strategy and running a basket test in the Strategy Analyzer to see which instruments have made recent entries. You could also consider programming the strategy to look for trades within the last few days by adding something like the following to the strategy logic which will compare the bar time stamp to the current PC clock time minus 5 days.

    Code:
    if (Time[0] > DateTime.Now.AddDays(-5))
        return;
    Basket tests - https://ninjatrader.com/support/help...asket_test.htm

    Basket tests require an Instrument List. You can build your own or use a pre-existing instrument list. (Control Center > Tools > Instrument Lists)

    Instrument Lists - https://ninjatrader.com/support/help...ment_lists.htm

    Once you have run your basket test, you can review which symbols you may wish to trade and you can enable the strategy on those symbols.

    Running NinjaScript strateg9ies from the Control Center - https://ninjatrader.com/support/help...t_strateg2.htm

    We look forward to assisting.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hi Jim,

      Thanks so much for your speedy reply. Some further questions need your help
      (1) Shall I select backtest type = "BackTest" for the basket test?
      (2) Is the strategy analyzer supposed to run a strategy for a list of stocks and see overall results if one/more trades were executed? For my case, I would like to see which stocks have entry signal recently. I don't know how to spot those with entry signal from the analyzer result window.... If I spot by performance, it's not fair as the performance already came from multiple past trades

      Thanks

      MC

      Comment


        #4
        Hello mikechan883,

        Yes, you can run a Backtest on an instrument which will backtest those symbols and see if trade signals are generated for those backtests.

        You could add a condition like I mention in post #2 to your strategy so only trades from the last X number of days are calculated, or you can adjust the Start/End Dates and the BarsRequiredToTrade property to only look for recent trades.

        Once the test completes, you can check each symbol's Trades Display and look for trades entered with your entry signal.

        We look forward to assisting.
        JimNinjaTrader Customer Service

        Comment


          #5
          Thank Jim.

          May I also seek your help on my below queries
          1) Any way to click a trade from strategy analyzer result list (1st photo) and directly open corresponding chart for the instrument in the chart window?
          scroll through list to generate chart
          2) As I at first won't consider integrate NT with broker, is there anyway I can easily see a list of trade action (buy/sell/close position) from a strategy given in a list / summary? And may I clarify sell and close in the chart? does close mean close out open buy/sell trade and sell means short sell trade?
          3) is there any easily way to scroll through an instrument list by up down arrow button to display the chart of the instrument?

          Cheers

          MC
          Last edited by mikechan883; 12-30-2020, 01:20 AM.

          Comment


            #6
            Hello mikechan883,

            1) Any way to click a trade from strategy analyzer result list (1st photo) and directly open corresponding chart for the instrument in the chart window?
            scroll through list to generate chart
            You can switch Display to Trades (upper left underneath Results grid,) and then right click on a Trade in the grid and select Chart to bring up a chart showing where that trade took place.

            2) As I at first won't consider integrate NT with broker, is there anyway I can easily see a list of trade action (buy/sell/close position) from a strategy given in a list / summary? And may I clarify sell and close in the chart? does close mean close out open buy/sell trade and sell means short sell trade?
            You can look at the Orders, Executions, and Trades Displays to further break down Trades. The Orders tab will tell you the specific orders submitted by the strategy as well as the signal name given to the order and the type of order submission.

            3) is there any easily way to scroll through an instrument list by up down arrow button to display the chart of the instrument?
            You can open a Chart Display and select an instrument in the Results grid after running the basket test. From there, you can use the up and down arrow keys to switch instruments quickly. This may be useful for shorter backtests to look at the last actions for that strategy on that data series.

            We look forward to assisting.
            JimNinjaTrader Customer Service

            Comment


              #7
              Thanks Jim! Great!

              Just one more question, why each chart always have a "Exit on Session Close" signal at the end of the chart?

              Comment


                #8
                Hello mikechan883,

                Thanks for your reply.

                The strategy analyzer has an option to turn off "Exit on Session Close" and this is located in the "Order handling" section. This will prevent exits on the close of a session until the last bar of the data series.

                The Strategy analyzer will always use exit on close for the very last trade if it is not completed by the last bar of the data series, so that the results don't leave an open order.

                Paul H.NinjaTrader Customer Service

                Comment


                  #9
                  got it thanks Paul

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by wzgy0920, 04-20-2024, 06:09 PM
                  2 responses
                  27 views
                  0 likes
                  Last Post wzgy0920  
                  Started by wzgy0920, 02-22-2024, 01:11 AM
                  5 responses
                  32 views
                  0 likes
                  Last Post wzgy0920  
                  Started by wzgy0920, 04-23-2024, 09:53 PM
                  2 responses
                  49 views
                  0 likes
                  Last Post wzgy0920  
                  Started by Kensonprib, 04-28-2021, 10:11 AM
                  5 responses
                  193 views
                  0 likes
                  Last Post Hasadafa  
                  Started by GussJ, 03-04-2020, 03:11 PM
                  11 responses
                  3,235 views
                  0 likes
                  Last Post xiinteractive  
                  Working...
                  X