Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Export to excel

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

    Export to excel

    When you run a strategy over multiple instruments, is it possible to export all trades against all securities without having to export each one individually.

    id like to be able to see the results sequence of trades against securities

    #2
    fiddy, unfortunately a cumulative export would not be possible. We have this on our feedback lists though for consideration, I will make sure to count your request in.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by fiddy View Post
      When you run a strategy over multiple instruments, is it possible to export all trades against all securities without having to export each one individually.

      id like to be able to see the results sequence of trades against securities
      Hey fiddy

      I do a lot of testing of Ninja strategies in Excel, via printing to the output window. This has proven extremely effective.

      I've never worked with multiple instruments, but there should be no problems at all. It may depend on how advanced you are with Excel...

      Say you're testing the ES and AAPL. Do your print statements something like this (if it's the ES, say)

      Print ("ES");
      Print ("Trade open = " + TradeOpen);
      etc.,

      Copy the output window results into Excel, next to a numbered column, and use the LOOKUP functions in Excel to differentiate between the different instruments. This will enable you to get one column for the ES results and another for AAPL.

      Comment


        #4
        thanks Arbuthnot

        Is it possible to get print each trade data
        what I would like is something like
        Print ( Instrument name , Open Date , Open Price, Quantity, Close Date , Close Price)

        Bertrand: are you able to assist if this is possible and where within the code this would need to be place

        Comment


          #5
          Fiddy, I would suggest taking a look at the Performance class for that idea.

          You can for example add this snippet in your OnBarUpdate() for testing out accessing those stat collections.

          Code:
          if (Performance.AllTrades.Count > 0)
          	{
          		Trade lastTrade = Performance.AllTrades[Performance.AllTrades.Count - 1];
          		
          		Print(Instrument.FullName + " " + lastTrade.EntryExecution.Time + " " + lastTrade.EntryExecution.Price + " " + lastTrade.ExitExecution.Time + 
          		" " + lastTrade.ExitExecution.Price + " " + lastTrade.Quantity);
          	}
          BertrandNinjaTrader Customer Service

          Comment


            #6
            Thanks Bertrand and Arbuthnot for your assistance

            I added a tradeno check to the code you provided so each trade only gets printed once in the output. This should be sufficient for other users until a cumulative export is provided



            if (Performance.AllTrades.Count > 0
            && TradeNo != Performance.AllTrades.Count )
            {
            Trade lastTrade = Performance.AllTrades[Performance.AllTrades.Count -
            1];
            TradeNo = TradeNo+
            1;

            Print(Instrument.FullName +
            " - " + lastTrade.EntryExecution.Time + " - " + lastTrade.EntryExecution.Price + " - " + lastTrade.ExitExecution.Time +
            " - " + lastTrade.ExitExecution.Price + " - " + lastTrade.Quantity);
            }

            Comment


              #7
              I would also vote for improved exporting of results from NinjaTrader.
              It is very often used feature and current support for practical exporting is completely insuffiecient.

              We also spend much time by iterating over all tabs of backtest result,
              exporting each one, then merging them together. because such fundamental
              thing for exporting whole backtest is not implemented.

              Exporting backtest is really important feature for daily use, when one needs to transfer backtest
              result a show/send it to another person.

              Comment


                #8
                Hello,

                I will put in a feature request for NinjaTrader 8 to look into further advancing export options in the analyzer and DataGrid's.

                Thank you for bringing this thread to attention so it can be reported.

                I look forward to being of further assistance.
                JesseNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by funk10101, Today, 12:02 AM
                0 responses
                3 views
                0 likes
                Last Post funk10101  
                Started by gravdigaz6, Yesterday, 11:40 PM
                1 response
                7 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by MarianApalaghiei, Yesterday, 10:49 PM
                3 responses
                10 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by XXtrader, Yesterday, 11:30 PM
                0 responses
                4 views
                0 likes
                Last Post XXtrader  
                Started by love2code2trade, 04-17-2024, 01:45 PM
                4 responses
                28 views
                0 likes
                Last Post love2code2trade  
                Working...
                X