Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Excel , Ninjascript

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

    Excel , Ninjascript

    I would like to automate a strategy and have some basic questions regarding approach.

    If strategy signal is generated in Excel, Which method should it be sent to Ninja? I am thinking via the ATI DLL (ATM Strategy)?

    Then same ATM strategy executed via excel needs to be managed only in Ninja, can this be done in Ninjascript ( havent used this before)

    #2
    - you can manage ATM strategies by the ATI DLL interface
    - you also can manage an ATM strategy by NinjaScript, but only as you started such ATM strategy by a NinjaScript strategy
    - managing an ATI DLL places ATM strategy via NinjaScript will not work

    Comment


      #3
      Thank you for that info.
      I am wanting to use price data from Neoticker to send orders to Ninjatrader via Excel.
      Am looking for help on the code that would take data from a cell and transmit and order.
      Tried this below after registering the ninjatrader client in excel I can see the objects and didnt do anything.
      Code:
      'Declare and instantiate object
      Dim myClient As NinjaTrader_Client.Client
      Set myClient = New NinjaTrader_Client.Client
      
      'Place a buy market order for MSFT (Microsoft)
      result = myClient.Command("PLACE", "", "MSFT", "BUY", 100, "MARKET", 0, 
      0, "", "", "", "", "")
      What I require help on is if for example cell E4 in excel equals 1
      Then submit a market order above which is referenced
      so for example
      Code:
      if E4=1 then
      result = myClient.Command("A1", "A2", "A3", "A4", A5, "A6", 0, 
      0, "", "", "", "", "")
      Where A1-A6 are all contained in the cells so A1= PLACE, A2=Account etc..
      And retrieve the position data from Ninja. Have no idea how to do this, any help or direction appreciated.


      Thanks

      Comment


        #4
        Unfortunately we are unable to support actual coding ATI integration for third party software due bandwidth reasons. NinjaScript consultants are available to help program your ATI integration to e.g. Excel or to help our users throughout their learning curve. Additional information is located here: http://www.ninjatrader.com/webnew/pa...injaScript.htm

        Comment


          #5
          Ok understood. Could you give me an idea if I could call the Com functions from Visual Basic for Applications like in Excel, or do I need to go down the full blown VB 6.0 path?
          Does it make a difference on how to reference the dll?

          Comment


            #6
            - we never have tested the COM interface on Excel. It should work though
            - sorry I don't know how to call a DLL in Excel. Browsing the web probably could provide you an idea how it works.

            Speculating. VB for applications should be the same as VB, but I'm not sure...

            Comment


              #7
              Excel VBA

              I am using Neotickers RTD service and seems to be going well.

              I want to place an order to Ninjatrader directly. Code i currently have returns an error of 80070002. Which says file not found.
              Ninjatrader client is registered in the object browser.
              I am using XP with .Net 2.0 Ninjatrader 6 and Excel 2002.
              Does anyone know how to do this? Is this problem taken care of in office
              2007.

              Code below

              Code:
              Private Declare Function 
              Command Lib "C:\Program Files\Trading\NinjaTrader 6\bin\NTDirect.dll" _
              (ByVal hwnd As String, _
                 ByVal nIDEvent As String, _
                 ByVal uElapse As String, _
                 ByVal lpTimerFunc As String, _
                 ByVal lpTimerFunc As Double, _
                 ByVal lpTimerFunc1 As String, _
                 ByVal lpTimerFunc2 As Double, _
                 ByVal lpTimerFunc3 As Double, _
                 ByVal lpTimerFunc4 As String, _
                 ByVal lpTimerFunc5 As String, _
                 ByVal lpTimerFunc6 As String, _
                 ByVal lpTimerFunc7 As String, _
                 ByVal lpTimerFunc8 As String) As Long
                
              
              
              
              Private Sub CommandButton1_Click()
                      'Place a buy market order for MSFT (Microsoft)
                      Dim result As Integer
              Set obj = CreateObject("NinjaTrader.Client.Client")
                     result = obj.Command("PLACE", "", "MSFT", "BUY", 100, "MARKET", 0, 0, "", "", "", "", "")
              End Sub

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by pmachiraju, 11-01-2023, 04:46 AM
              8 responses
              148 views
              0 likes
              Last Post rehmans
              by rehmans
               
              Started by mattbsea, Today, 05:44 PM
              0 responses
              5 views
              0 likes
              Last Post mattbsea  
              Started by RideMe, 04-07-2024, 04:54 PM
              6 responses
              33 views
              0 likes
              Last Post RideMe
              by RideMe
               
              Started by tkaboris, Today, 05:13 PM
              0 responses
              5 views
              0 likes
              Last Post tkaboris  
              Started by GussJ, 03-04-2020, 03:11 PM
              16 responses
              3,283 views
              0 likes
              Last Post Leafcutter  
              Working...
              X