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

BitfFinex - Add On

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

  • Serialcoder
    replied
    Originally posted by NinjaTrader_Jim View Post
    Hello kujista,

    There is not a supported way to add instruments or instrument lists through NinjaScripts.
    This does the job

    Code:
      foreach (string instrumentEntry in symbols)
                    {                   
                        string text = instrumentEntry.ToUpper().Trim();
                        MasterInstrument masterInstrument = MasterInstrument.DbGet(text, (InstrumentType) 1);
                        bool flag3 = masterInstrument == null;
                        if (flag3)
                        {
                            masterInstrument = new MasterInstrument
                            {
                                Currency = (Currency) 7,
                                Description = "Bitfinex " + text,
                                Exchanges =
                                {
                                    Exchange.Default
                                },
                                InstrumentType = InstrumentType.Stock,
                                Name = text,
                                PointValue = 1.0,
                                TickSize = 0.001,
                                TradingHours = TradingHours.Get("Default 24 x 7")
                            };
                            masterInstrument.DbAdd(true);
                        }
                    }

    Leave a comment:


  • robje737
    replied
    ok thanks .

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello Rob,

    This third party AddOn is not supported by NinjaTrader and we could not offer any direct assistance for its usage.

    For support inquiries involving third party vendor products, I recommend reaching out to that particular vendor.

    If there is another matter involving the NinjaTrader platform that you would like to address, please feel free to open a new thread.

    Leave a comment:


  • robje737
    replied
    no data

    Hi,

    i have issues getting data from Bitfinex;

    addon succesfully imported
    bitfinex connection shows
    all instruments show ( @BTCUSD / @ETHUSD etc etc.)

    BUT no data appears in chart.

    Already working in another thread ( http://www.ninjatrader.com/support/f...7&goto=newpost )
    but appreciate any help!

    Regards,

    Rob

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello Subhash,

    Welcome to the forums!

    While the DLL interface would be the route forward, we do not have any examples to provide and we would not support any external implementation using the DLL interface. It is simply provided as-is.

    If someone else on the forums would like to share their experiences, they are welcome to provide further input.

    Leave a comment:


  • badjaya
    replied
    hello, Continuing this thread.
    Can you please let me know how to configure a connection to "kraken" and get the data feed. can we do the configuration and connection/setup through ATI DLL methods like setuphost. If there are any samples of doing this, please let me know.
    Thanks,
    Subhash

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello kujista,

    You would connect to the External Data Feed like other providers on the platform. (Control Center > Connections)

    I would agree with your flowchart. I believe you are understanding correctly.

    Leave a comment:


  • kujista
    replied
    NinjaTrader gets its data from the data providers it connects to. The External Data Feed that you wish to develop would need to translate this data into what can be usable through the DLL Interface API.
    - well how do I define "data provider" (in my case it is bitfinex) to which will NT connect?

    i also attach image, to make sure, that I understand this principle...
    Attached Files

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello kujista,

    - how do I tell NT to connect to instrument and how do I specify in what format ( for me: [ 2, 236.62, 9.0029, 236.88, 7.1138, -1.02, 0, 236.52, 5191.36754297, 250.01, 220.05 ])
    This will be done whenever NinjaTrader opens a chart or uses part of the platform that requests for data. It will be handled for you and there would not be a way to specify the format. It would have to be provided by the data feed.

    If you are looking for an example on how to connect to an instrument from an AddOn window to subscribe to market data, please refer to the AddOn Framework example.

    - and how do I tell, from what url and using what protocol to download it?
    NinjaTrader gets its data from the data providers it connects to. The External Data Feed that you wish to develop would need to translate this data into what can be usable through the DLL Interface API.

    Please let me know if I can be of further assistance.

    Leave a comment:


  • kujista
    replied
    Another big thanks.. I would like to reffer to part:
    "When NinjaTrader connects to an instrument, it performs a BarsRequest and downloads historical data for that instrument and stores it in "Documents\NinjaTrader 8\db"."

    - how do I tell NT to connect to instrument and how do I specify in what format ( for me: [ 2, 236.62, 9.0029, 236.88, 7.1138, -1.02, 0, 236.52, 5191.36754297, 250.01, 220.05 ])

    - and how do I tell, from what url and using what protocol to download it?

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello kujista,

    If you create your own External data feed and add the definitions for your instrument, you should be able to pull that data up through any part of the platform and NinjaTrader will handle the rest.

    When NinjaTrader connects to an instrument, it performs a BarsRequest and downloads historical data for that instrument and stores it in "Documents\NinjaTrader 8\db". It then proceeds to show the Realtime data from the moment the chart was opened. Whenever a chart or other part of the platform needs to access this historical data, it will fetch it from local storage if it is there. NinjaTrader handles all of this internally, and there would not be an example I could share. We also do not have any examples for creating your own External Data Feed.

    As mentioned, support for creating your own External Data Feed will be extremely limited. The API reference from post #7 will be the best resource available for developing it.

    Historical data reference: https://ninjatrader.com/support/help...AndDataFormats

    If there is anything else I can clear up for what can and should be done in NinjaTrader via NinjaScript, please let me know.

    Leave a comment:


  • kujista
    replied
    Thanks for reply,

    you tell me that if I create my custom Instrument and my AddOn will recieve data in format - [ 2, 236.62, 9.0029, 236.88, 7.1138, -1.02, 0, 236.52, 5191.36754297, 250.01, 220.05 ] (https://docs.bitfinex.com/v1/reference#ws-public-ticker), it is possible to store it into NT platform and it takes care of everything else? Could you kindly provide snippet, which adds data to NT from Data Feed -> to store it to db on Hard drive and to show on chart with selected custom instrument?

    Thanks a lot
    Paul

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello kujista,

    The External Data Feed would allow you to pull in data so it can be used natively throughout the platform. You shouldn't need to develop an AddOn to handle realtime or historical data so it can be used in a chart. Once the data enters the platform with the External Data Feed, it should be treated like any other provider's data.

    The only resource we can provide for creating a your own External Data Feed is the API documentation found here: https://ninjatrader.com/support/help.../functions.htm

    For oder placement from an AddOn window, you can review the AddOn Framework example in my previous post. As mentioned with data, the platform should handle orders natively, and the External Data Feed should handle the other end going from NinjaTrader to the provider.

    If you have any other specific questions on creating part of an AddOn window or another NinjaScript item, I will happy to be of further assistance.

    Leave a comment:


  • kujista
    replied
    Hi,
    External Data Feed is exactly what I want to do. I have access to market data (https://docs.bitfinex.com/v1/reference#symbols) and when I create my Instrument, I need AddOn to read data in real time (and store for historical purposes) and to show them in charts like oher NT Instruments...

    In other step, I also need to be able to send orders to provider to update orders and account.
    Is it now clear what I need?

    Thanks for response
    Pavel

    Leave a comment:


  • NinjaTrader_Jim
    replied
    Hello kujista,

    If you are trying to feed your own data into NinjaTrader to create a custom data series, creating your own External Data Feed would be the way to go.

    If this information is available from your provider, it would be recommended to add this instrument to NinjaTrader so it can be used natively. (It is currently not possible to add instruments to the NinjaTrader database through NinjaScript.)

    An indicator would let you hide the contents on a chart and draw your own bars (or anything) in place of the original data series. This would be synchronized with the primary data series of a chart and not the data series you would want to display, however.

    From what it sounds like, you will need to add the instrument you would like to the platform.

    If this does not clear things up, could you provide further detail on the AddOn you wish to develop so I could elaborate on what would or would not be possible as well as any resources I can share?
    Last edited by NinjaTrader_Jim; 12-11-2017, 05:14 PM.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by maybeimnotrader, Today, 05:46 PM
0 responses
5 views
0 likes
Last Post maybeimnotrader  
Started by quantismo, Today, 05:13 PM
0 responses
6 views
0 likes
Last Post quantismo  
Started by AttiM, 02-14-2024, 05:20 PM
8 responses
166 views
0 likes
Last Post jeronymite  
Started by cre8able, Today, 04:22 PM
0 responses
8 views
0 likes
Last Post cre8able  
Started by RichStudent, Today, 04:21 PM
0 responses
5 views
0 likes
Last Post RichStudent  
Working...
X