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

Dionysus New Year Present – Ninja & Excel

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

    #61
    Can someone help me on saving a profit on an excel file at the same time? I have two strategies running and the share the same xls file for the saving of the profit but when the trades of the two strategy closes on the same time then also the profit of strategy B will save on the excel file while the profit of strategy A will not be save on the excel file.

    Here is my code on saving it to the excel file:

    if(book != null)
    {
    row = sheet.Table.Rows.Add();
    row.Cells.Add(new WorksheetCell(Profit.ToString()));
    book.Save(Performancepath);
    }

    Thanks in advace.

    Comment


      #62
      Originally posted by DionysusToast View Post
      Hi

      I think the install is putting them in the same place regardless of the destination directory.

      Try C:\windows\assembly - that's where mine are on Windows 7. If they are there you can just copy to the Ninja folder.

      Let me know how it works.

      Pete
      Yes it in that directory but I can copy it and paste it to Ninja directory. Help please where can I have that dll file or someone could just give.

      Comment


        #63
        Originally posted by edward_bell View Post
        Yes it in that directory but I can copy it and paste it to Ninja directory. Help please where can I have that dll file or someone could just give.
        Are you just needing the dll files, the excel interop? I made a thread on BMT a while back, with an excel tool I created, and I pasted those dlls there. I can look for them if that's what you need.

        Is that what you need?

        Comment


          #64
          Originally posted by forrestang View Post
          Are you just needing the dll files, the excel interop? I made a thread on BMT a while back, with an excel tool I created, and I pasted those dlls there. I can look for them if that's what you need.

          Is that what you need?
          Kindly give me those files please so that I can have it also. Thank you so much my friend forrestang . Kindly email it to me please [email protected].

          Comment


            #65
            Originally posted by edward_bell View Post
            Kindly give me those files please so that I can have it also. Thank you so much my friend forrestang . Kindly email it to me please [email protected].
            The ones that I emailed you are for office 2010 (don't know which version you have). The others can be located here:

            Office 2010 PIA

            Office 2007 PIA

            Office 2003 PIA

            Comment


              #66
              Balance in my demo account

              I lost all the fake money and re install a new demo but I can't get the balance up to 100,000 like I had it. what can I do to get the demo money back to its previous balance?

              Thanks,
              Alan

              Comment


                #67
                You will need to reset your simulator under Tools--> Options--> Simulator tab--> select "reset"
                MatthewNinjaTrader Product Management

                Comment


                  #68
                  Originally posted by forrestang View Post
                  The ones that I emailed you are for office 2010 (don't know which version you have). The others can be located here:

                  Office 2010 PIA

                  Office 2007 PIA

                  Office 2003 PIA
                  I got the file. Thank you so much my forrestang ^_^

                  Comment


                    #69
                    However when I tried to bring up Indicator tab on the chart it got an error that it could load the excel.interop assembly file. I already install the PIA on my MS excel 2007 and added the assemble file to the reference of ninja folder. I have the image on the error.
                    Attached Files

                    Comment


                      #70
                      Read data from IB TwsDde.xls

                      In the Market Analyzer (MA) I would like to see the positions I currently hold in Interactive Brokers TWS - no matter how the positions have been entered into IB TWS. As far as I know NT7 will only reflect orders that have been entered via NT7. For this reason I decided to hook up to IB TWS via TwsDde.xls that IB provides - i.e. install TwsDde.xls open it and subscribe to the data in the various tab (e.g. also the 'Account' tab that allows me to read the current account value). From NT I then read the information from TwsDde.xls that I need. I have attached the code.

                      Currently the code only reads the values once (then I have to right click and reload NinjaScript to get latest values). I would like to make the script as fast and online as possible (alternatively timer based) - but even when I read the values only once, I feel that the code runs slow. Does anybody have any ideas to how the script can be made faster/smarter/better?

                      / Saxo
                      Attached Files

                      Comment


                        #71
                        I managed to solve the performance problem by moving the opening of Excel to OnStartUp()' and the closing and releasing of Excel to 'OnTermination()'. Furthermore I have realized that I (of course) already can control the 'online-ness' via the bar settings on the indicator.

                        Attached is an updated version of the script.

                        / S.
                        Attached Files
                        Last edited by Saxo_; 02-25-2013, 01:34 AM.

                        Comment


                          #72
                          Hi, in Microsoft Office 2010 Primary Interop Assemblie there is no Microsoft.Office.Interop.Excel.dll. So how I can connect ninja to excel?
                          (and in my machine it doesn't let me install 2007 Interop Assemblie, because I have microsoft office 2010).
                          Thank you in advance for any help.

                          Comment


                            #73
                            I tried both methods of incorporating the .dll and each time i get this...



                            any thoughts?

                            Comment


                              #74
                              Originally posted by DionysusToast View Post
                              Bauregard

                              You should be able to manually unzip the .exe install file from microsoft.

                              Then - you take the file, drop it in your <My Documents>\NinjaTrader 7\bin\Custom directory & follow the instructions.

                              If not - PM me an email address and I'll get the file to you.

                              Cheers

                              Pete
                              I have MS Office 2013 will this open in it, when i tried bigmike excel to import it to ninja it gives me an error saying interop required , i have found that excell interop DLL in my system , copied the same put them in ninja7 bin custom folder

                              Yet it is not inporting. Can you help me in this..

                              Thanks and Regards
                              Aloakdutt

                              Comment


                                #75
                                i can't find the interop.excel.dll

                                I tryed to install the interop.excel.dll file from microsoft. everything went ok but i can't find the file to move it to the location you say... Any sugestion to proceed im using Office 2010.
                                Thank you

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by andrewtrades, Today, 04:57 PM
                                1 response
                                8 views
                                0 likes
                                Last Post NinjaTrader_Manfred  
                                Started by chbruno, Today, 04:10 PM
                                0 responses
                                6 views
                                0 likes
                                Last Post chbruno
                                by chbruno
                                 
                                Started by josh18955, 03-25-2023, 11:16 AM
                                6 responses
                                436 views
                                0 likes
                                Last Post Delerium  
                                Started by FAQtrader, Today, 03:35 PM
                                0 responses
                                7 views
                                0 likes
                                Last Post FAQtrader  
                                Started by rocketman7, Today, 09:41 AM
                                5 responses
                                19 views
                                0 likes
                                Last Post NinjaTrader_Jesse  
                                Working...
                                X