NexusFi: Find Your Edge


Home Menu

 





Import/Export


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Eloy with 4 posts (6 thanks)
    2. looks_two tom_c with 2 posts (0 thanks)
    3. looks_3 wh with 1 posts (0 thanks)
    4. looks_4 sam028 with 1 posts (0 thanks)
    1. trending_up 4,106 views
    2. thumb_up 6 thanks given
    3. group 5 followers
    1. forum 7 posts
    2. attach_file 3 attachments




 
Search this Thread

Import/Export

  #1 (permalink)
tom_c
Los Angeles
 
Posts: 23 since Dec 2009
Thanks Given: 0
Thanks Received: 14

Hi,

Not sure if this is the place to ask the following question or not but here it goes: I want to know if there is anyway of importing NT tick data into MS Excel or not?

Any help on this would be much appreciated.

Thanks

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
How to apply profiles
Traders Hideout
Exit Strategy
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
30 thanks
Spoo-nalysis ES e-mini futures S&P 500
28 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
16 thanks
  #2 (permalink)
Eloy
Moscow
 
Posts: 12 since Jan 2010
Thanks Given: 1
Thanks Received: 8

For import historical ticks:
NT - Control Center - Tools - Historical Data - Export - result will be in txt format file wich you can open from Excel.

For import realtime ticks:
There is no standart functionality but maybe somebody can write an indicator or a strategy wich can export realtime tick value into an Excel application. Or you can write a macro in Excel to receive tick data throw NT COM API.

Reply With Quote
  #3 (permalink)
tom_c
Los Angeles
 
Posts: 23 since Dec 2009
Thanks Given: 0
Thanks Received: 14


Thanks for the reply and input. Yeah, I was in a trading room a while ago and remember someone mentioning that they were able to import real time tick data from ninja into excel. i think he wrote an api for it.

anyway, thanks for the feedback. i'm sure one of these days someone is going to be generous enough to share their code with the rest of the community

stay sharp

Reply With Quote
  #4 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629

I'm not sure it can help, but you can the code inside this indicator.

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
  #5 (permalink)
Eloy
Moscow
 
Posts: 12 since Jan 2010
Thanks Given: 1
Thanks Received: 8

This VBA code works! Open a code module in the workbook in which you want to use the function then go to Tools > References to open the References dialog where you will see a list of all the libraries and other objects to which you can set a reference. Select NinjaTrader Client and press the "OK" button.
Then inset a new module and copy a code below.
 
Code
                            
Public Function GetTick(instrument As String) As Double
    
'Declare and instantiate object
    Dim myClient As NinjaTrader_Client.Client
    Dim result As Long
    Set myClient = New NinjaTrader_Client.Client '
GetObject("NinjaTrader_Client""IClient")
    
result myClient.SubscribeMarketData(instrument)
    If 
result 0 Then
        GetTick 
myClient.MarketData(instrument0)
    
End If
    
result myClient.UnsubscribeMarketData(instrument)
    
Set myClient Nothing
End 
Function 
Using example: in formula field type: "=GetTick("ES 03-10")".

Attached Files
Elite Membership required to download: NTTick.zip
Reply With Quote
Thanked by:
  #6 (permalink)
 
wh's Avatar
 wh 
Neubrandenburg, Germany
 
Experience: Advanced
Platform: R
Trading: Stocks
Posts: 538 since Jun 2009
Thanks Given: 298
Thanks Received: 512


Eloy View Post
This VBA code works! Open a code module in the workbook in which you want to use the function then go to Tools > References to open the References dialog where you will see a list of all the libraries and other objects to which you can set a reference. Select NinjaTrader Client and press the "OK" button.
Then inset a new module and copy a code below.
 
Code
                            
Public Function GetTick(instrument As String) As Double
    
'Declare and instantiate object
    Dim myClient As NinjaTrader_Client.Client
    Dim result As Long
    Set myClient = New NinjaTrader_Client.Client '
GetObject("NinjaTrader_Client""IClient")
    
result myClient.SubscribeMarketData(instrument)
    If 
result 0 Then
        GetTick 
myClient.MarketData(instrument0)
    
End If
    
result myClient.UnsubscribeMarketData(instrument)
    
Set myClient Nothing
End 
Function 
Using example: in formula field type: "=GetTick("ES 03-10")".

please can you downgrate to 2003. i can not import and vba is long time ago.
thanx and best regards

Causality is the relationship between an event (the cause) and a second event (the effect), where the second event is a consequence of the first.
Reply With Quote
  #7 (permalink)
Eloy
Moscow
 
Posts: 12 since Jan 2010
Thanks Given: 1
Thanks Received: 8

MS Excel 2003 format. It's just an example. I think one can write something more useful)

Attached Files
Elite Membership required to download: NTTick2003.zip
Reply With Quote
Thanked by:
  #8 (permalink)
Eloy
Moscow
 
Posts: 12 since Jan 2010
Thanks Given: 1
Thanks Received: 8

Here is a new dynamic version. (Excel 2003 format)

Attached Files
Elite Membership required to download: NTTick.zip
Reply With Quote
Thanked by:




Last Updated on January 21, 2010


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts