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

Help with libraries (and calculating beta)

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

    Help with libraries (and calculating beta)

    Two part question from someone who is brand new to NT (but with a little C# experience from working in Wealth Lab Pro)...

    I want to use some basic math functions that I don't think are available in the System.Math library. For instance, I want to custom compute a symbol's beta by comparing its historical prices to a market index over the past few hundred days. I'd love it if this was a method already coded that I could just access, but if not I'd like to build out of the usual Covar(x,m) / Var(m) approach. This leads me to wonder how I can get a covar and var method rather than having to develop those as well. So....

    (1) are there any libraries that have useful higher level functions like beta() or mid level ones like covar() that I could use?
    (2) if so (or even if not) how do I add libraries to my NT environment (such as these http://msdn.microsoft.com/en-us/libr...(v=VS.80).aspx) so that I can do some of these things? There are projects like MathNet and I'm sure many others that would cover anything I could possibly need, but I'm kind of lost on where to start to be able to access the methods from NT code.

    Thanks!

    #2
    Hello sf631,

    This is more C# related and unfortunately outside our scope of support. Perhaps another community member can offer input on additional C# libraries you can add.

    You can add reference to a library by right clicking within the compiler > References > Add > Browsing to a file.

    After making any new references you will also have to restart NT. You then add a Using statement for any script that needs access to this library.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Wow, that was a quick response - thanks!

      I'll locate a good library with the functions I need and then add using the process you suggest. Assuming this means that none of the functions I mention (covar, var, beta) are built in to any of the included libraries

      Any other forum visitors have an opinion about financial or math libraries - preferably open-source?

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by arvidvanstaey, Today, 02:19 PM
      2 responses
      7 views
      0 likes
      Last Post arvidvanstaey  
      Started by jordanq2, Today, 03:10 PM
      0 responses
      2 views
      0 likes
      Last Post jordanq2  
      Started by traderqz, Today, 12:06 AM
      10 responses
      18 views
      0 likes
      Last Post traderqz  
      Started by algospoke, 04-17-2024, 06:40 PM
      5 responses
      46 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by mmckinnm, Today, 01:34 PM
      3 responses
      6 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X