• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BitfFinex - Add On

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

  • kujista
    started a topic BitfFinex - Add On

    BitfFinex - Add On

    Hello,
    I am going to create Add On, which enables BitFinex markets in NinjaTrader 8 using api -
    https://www.bitfinex.com/.

    I want to ask, if there is a tutorial / code snippets on how to :
    1) Create custom Insturment List
    2) Create Instruments in this List
    3) Store data to local disk and
    4) Show them in chart.

    Can anyone please guide me, where can I get further informations?
    Yours sincerely

    Pavel Kujal

  • 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:

Latest Posts

Collapse

Topics Statistics Last Post
Started by victorsmith, Today, 12:43 PM
1 response
16 views
0 likes
Last Post NinjaTrader_SergeyS  
Started by PN720, Today, 12:29 PM
2 responses
13 views
0 likes
Last Post PN720
by PN720
 
Started by traderpards, Today, 11:25 AM
1 response
6 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by bebbus, Today, 10:26 AM
7 responses
31 views
0 likes
Last Post NinjaTrader_PatrickG  
Started by GregoryBaskin, Today, 10:25 AM
1 response
6 views
0 likes
Last Post NinjaTrader_ChelseaB  
Working...
X