NexusFi: Find Your Edge


Home Menu

 





Excel to Ninjatrader DDE Data feed


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one trader159 with 3 posts (0 thanks)
    2. looks_two rleplae with 3 posts (0 thanks)
    3. looks_3 NTDeveloper with 2 posts (1 thanks)
    4. looks_4 rlygangesh with 1 posts (0 thanks)
    1. trending_up 3,678 views
    2. thumb_up 1 thanks given
    3. group 5 followers
    1. forum 8 posts
    2. attach_file 0 attachments




 
Search this Thread

Excel to Ninjatrader DDE Data feed

  #1 (permalink)
trader159
NewYork+US
 
Posts: 3 since Jun 2018
Thanks Given: 0
Thanks Received: 0

Hi, my share terminal has RTD to excel connection. & I made a DDE data feeding connection with that excel to Multichart.

But is it possible to do the same kind of data feed from my Excel sheet to Ninjatrader? If anyone please share the code for the dll making which will create an external connection for Ninjatrader, I'll be really thankful to you.

Here is my excel file, from where I would like to send data to Ninjatrader.
xxx.dropbox.com/s/ps3a7wntpm25xsg/PiRtd%202.xlsm?dl=0

[Not able to post the link, xxx stands for www]

Thank you.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
About a successful futures trader who didnt know anythin …
Psychology and Money Management
Trade idea based off three indicators.
Traders Hideout
How to apply profiles
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
What broker to use for trading palladium futures
Commodities
 
  #3 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863


There are several catches to your question.

1. It is not possible (without a bit more heavy lifting) to have NT read multiple datastreams simultaneously, you are able to open two connections, but if only one of them will provide datafeed to NT. I know this because a long time ago i wanted to create an additional datafeed, only to find out that it was not possible (a way around that constraint is to have NT talk to one component, using one of the built-in data feeds, and externally make a kind of traffic agent that interacts with several datasources (including your excell source) making it look to NT as a single source)

2. Depending on what you want to do and where your data comes from, the extra pass through Excell may not be needed, can you share more on that ?

3. There is a DLL in NT that allows you to inject little amounts of data, the DLL has been discussed in other threads already and is mentioned in the NT help also

https://ninjatrader.com/support/helpGuides/nt7/?automated_trading_interface_at.htm

You may want to look at the following calls in the DLL

 
Code
int Ask(string instrument, double price, int size)

Sets the ask price and size for the specified instrument. A return value of 0 indicates success and -1 indicates an error.

 

int AskPlayback(string instrument, double price, int size, string timestamp)

Sets the ask price and size for the specified instrument for use when synchronizing NinjaTrader playback with an external application playback. A return value of 0 indicates success and -1 indicates an error. The timestamp parameter format is "yyyyMMddhhmmss".

 

int Bid(string instrument, double price, int size)

Sets the bid price and size for the specified instrument. A return value of 0 indicates success and -1 indicates an error.

 

int BidPlayback(string instrument, double price, int size, string timestamp)

Sets the bid price and size for the specified instrument for use when synchronizing NinjaTrader playback with an external application playback. A return value of 0 indicates success and -1 indicates an error. The timestamp parameter format is "yyyyMMddhhmmss".

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #4 (permalink)
trader159
NewYork+US
 
Posts: 3 since Jun 2018
Thanks Given: 0
Thanks Received: 0


rleplae View Post
There are several catches to your question.

1. It is not possible (without a bit more heavy lifting) to have NT read multiple datastreams simultaneously, you are able to open two connections, but if only one of them will provide datafeed to NT. I know this because a long time ago i wanted to create an additional datafeed, only to find out that it was not possible (a way around that constraint is to have NT talk to one component, using one of the built-in data feeds, and externally make a kind of traffic agent that interacts with several datasources (including your excell source) making it look to NT as a single source)

2. Depending on what you want to do and where your data comes from, the extra pass through Excell may not be needed, can you share more on that ?

3. There is a DLL in NT that allows you to inject little amounts of data, the DLL has been discussed in other threads already and is mentioned in the NT help also

You may want to look at the following calls in the DLL

 
Code
int Ask(string instrument, double price, int size)

Sets the ask price and size for the specified instrument. A return value of 0 indicates success and -1 indicates an error.

 

int AskPlayback(string instrument, double price, int size, string timestamp)

Sets the ask price and size for the specified instrument for use when synchronizing NinjaTrader playback with an external application playback. A return value of 0 indicates success and -1 indicates an error. The timestamp parameter format is "yyyyMMddhhmmss".

 

int Bid(string instrument, double price, int size)

Sets the bid price and size for the specified instrument. A return value of 0 indicates success and -1 indicates an error.

 

int BidPlayback(string instrument, double price, int size, string timestamp)

Sets the bid price and size for the specified instrument for use when synchronizing NinjaTrader playback with an external application playback. A return value of 0 indicates success and -1 indicates an error. The timestamp parameter format is "yyyyMMddhhmmss".

I'm looking for only data feeding not the trading solution from NT. I have seen earlier that some people using dedicated dll extension application to data feed in NT. So, logically the idea is same, I just need the dll extension for my Excel sheet. Though DDE is old technology but still very much useful for many cases like mine.

Reply With Quote
  #5 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863


trader159 View Post
I'm looking for only data feeding not the trading solution from NT. I have seen earlier that some people using dedicated dll extension application to data feed in NT. So, logically the idea is same, I just need the dll extension for my Excel sheet. Though DDE is old technology but still very much useful for many cases like mine.

There is no DDE support in ninjatrader.

What I explained is to create a module outside Ninjatrader that does support DDE.
That module would then talk to you Excel.
On the other side the module would talk to Ninjatrader using the library i mentioned.

There are two other options in increasing degree of difficulty
1. make the same module talk to the TCP/IP port of the ATI (default 36973)
2. make a full connector (see my comment on only one connector working at a time for market feed)

Alternatively you can make a socket connection from your XLS sheet in visual basic
see this example, you would then talk to the ATI port

https://www.example-code.com/excel/socket_connect.asp


Hope this clarifies

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #6 (permalink)
trader159
NewYork+US
 
Posts: 3 since Jun 2018
Thanks Given: 0
Thanks Received: 0

If anyone please help me to give the proper file for my mentioned excel file, which will do the work then it would be really helpful. because I still can't figure out how do I implement it.

Thank you.

Reply With Quote
  #7 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863


trader159 View Post
If anyone please help me to give the proper file for my mentioned excel file, which will do the work then it would be really helpful. because I still can't figure out how do I implement it.

Thank you.

Ready-made, i have not seen such a solution,
i was replying to a question in the 'ninjatrader programmming' section of the forum
means it needs to be developed, no click and clack solution available to my knowledge

I'm still not convinced that DDE or Excel is a must with regards to datafeed

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #8 (permalink)
 rlygangesh 
NEW PANVEL
 
Experience: Beginner
Platform: ninja trader
Trading: future
Posts: 12 since Oct 2015
Thanks Given: 1
Thanks Received: 10

i have almost same problem

my brokers give API connection for data feed(web socket) as well as for placing order.
API .net dll already available as open source , link to excel already provided free of cost with user guide & videos.

i need bridge between API with NT.

so want to hire some programmer
i am ready to pay his cost

Reply With Quote
  #9 (permalink)
Darsh
Mumbai India
 
Posts: 4 since Nov 2016
Thanks Given: 0
Thanks Received: 1


rlygangesh View Post
i have almost same problem

my brokers give API connection for data feed(web socket) as well as for placing order.
API .net dll already available as open source , link to excel already provided free of cost with user guide & videos.

i need bridge between API with NT.

so want to hire some programmer
i am ready to pay his cost

Even though this post is old, i would like to know if anyone has found the solution?

My broker too provide APIs for both data and trading. I have a very limited knowledge of programming. So I cant develop my own app. Also, I'm not a regular day trader now due to my job timings. I m mostly into swing trades based on EOD so never bothered much about RT feed in ninja.

Considering you are from India, you should contact Joydeep for the same. But since he developed his own Ninja (Arthachitra) , he is unlikely to help out with NT.

Regards,...

Reply With Quote




Last Updated on October 30, 2019


© 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