Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

closing trade prematurely

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

    #16
    Hello ionaz,

    Thank you for your response.

    Either add each line of code for each bar series for entry and exit using BarsInProgress, Closes, BarsArray, etc.

    Or build the strategy as designed for only the primary series. Remove all the additional instruments and bar series in the code and build the strategy as if it would be running on one instrument. Then once you are complete, just enable the strategy in the Strategies tab for each of the instruments. This way each instance of the strategy is focusing on one instrument and there is no need to add several lines of duplicating code.

    Please let me know if you have any questions.

    Comment


      #17
      Or build the strategy as designed for only the primary series. Remove all the additional instruments and bar series in the code and build the strategy as if it would be running on one instrument.
      • Patrick, just for me to understand, what did you mean by "bar series"? I understood your "additional instruments" are what I add using Add() statements, but unclear about "bar series". Please clarify.
      • I'm very interested in you proposed slimmer solution, however, what is of key importance for me is a single excel list of all trades that I can generate thanks to all those Add() statements. Please correct me if I'm wrong, but your solution with primary series only would mean that I would have to loose the ability to easily generate a single list of all trades for all instruments, correct? The reason why I started adding every single instrument via Add is because I wanted to easily download the described list and not to click on separate instruments to retrieve list for every different instrument.



      Either add each line of code for each bar series for entry and exit using BarsInProgress, Closes, BarsArray, etc.
      • Patrick, I'd highly appreciate if you could send me a brief example of this, I'm afraid I didn't quite follow what you meant.

      Thank you!

      Comment


        #18
        Hello ionaz,

        Thank you for your response.

        A BarSeries is any additional data series added to the script for an instrument. Whether that is an additional time frame or an additional instrument as in your code. Each added instrument is it's own bar series. I recommend reviewing the information at the following link for more details: http://www.ninjatrader.com/support/h...nstruments.htm

        If you are using multiple strategies you can run the performance report from the Account Performance tab to grab all instruments, trades, and executions. Please visit the following link for information on the Account Performance tab and generating reports: http://www.ninjatrader.com/support/h...rmance_tab.htm

        Unfortunately, providing such code would be lengthy and but a very basic example is available in NinjaTrader under Tools > Edit NinjaScript > Strategy > SampleMultiinstrument.

        Comment


          #19
          Hello Patrick

          Further to your earlier post and trying to use it to get a list of trades I want:
          Or build the strategy as designed for only the primary series. Remove all the additional instruments and bar series in the code and build the strategy as if it would be running on one instrument. Then once you are complete, just enable the strategy in the Strategies tab for each of the instruments. This way each instance of the strategy is focusing on one instrument and there is no need to add several lines of duplicating code.
          OK, I reverted back to a strategy designed for only the primary series. Then added a strategy in the strategy tab...


          If you are using multiple strategies you can run the performance report from the Account Performance tab to grab all instruments, trades, and executions. Please visit the following link for information on the Account Performance tab and generating reports:http://www.ninjatrader.com/support/h...rmance_tab.htm
          • Patrick, what did you mean by multiple strategies? ... I'm using a startegy as per your advice (with primary series only).
          'Account Performance' tab looks great, I just haven't seen it working yet. The most critical to me is a SINGLE list of all trades in all instruments and looks like 'Trades' tab is where I'd get them, correct?
          OK, then what am I missing?
          1. added a strategy in the strategy tab, selected instrument list = nastaq100 via properties
          2. enabled all the instruments
          3. wend into 'Account performance' tab, pressed 'Generate' >> it reports nothing
          Last edited by ionaz; 09-27-2014, 04:19 PM.

          Comment


            #20
            Hello ionaz,

            Thank you for your response.

            The Account Performance tab will show all the trades made to the accounts. It will not show backtests or historical strategy performance. Only the trades that were actually made to the account(s).

            Comment

            Latest Posts

            Collapse

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