Real Time Data Now / Nest Trader to Amibroker, Fcharts

TracerBullet

Well-Known Member
unable to open ths sln file of 2 kb. used vs 2010 as well as c++2010.
please advise how to open the solution. many thanks in advance
What error do you get? I am using VC++ 2010 Express. This is my first and only project with VS, so i dont have much experience with it.

Note, for compilation you also need atl/mfc libraries in include path. I got them from another source. I had shared link earlier - josh might have link.
The libs are not part of the express edition but i think they were added in later free editions. I still stick with 2010 as i dont want all extra fluff, only c++

Edit - take the libs from here . Put them in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc
 
Last edited:

boarders

Well-Known Member
What error do you get? I am using VC++ 2010 Express. This is my first and only project with VS, so i dont have much experience with it.

Note, for compilation you also need atl/mfc libraries in include path. I got them from another source. I had shared link earlier - josh might have link.
The libs are not part of the express edition but i think they were added in later free editions. I still stick with 2010 as i dont want all extra fluff, only c++

Edit - take the libs from here . Put them in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc
when the sln file is double clicked it just doesnt open...tried to open using open with c++2010 visual studio express, which then opens but says both rtd =man as well as ab backfill are unavailable...this is happening even after installing atlmfc also...
 

boarders

Well-Known Member
when the sln file is double clicked it just doesnt open...tried to open using open with c++2010 visual studio express, which then opens but says both rtd =man as well as ab backfill are unavailable...this is happening even after installing atlmfc also...
following to my earlier message, I deleted the suo file and then opened the Sln file using c++2010 and it opened normally without throwing any errors and loaded the project. will revert later..many thanks
 

TracerBullet

Well-Known Member
meantime trying to figure out to add bid price/qty and ask price/qty to the ninja feeder so we could use order flow charts in ninja trader 7. pls advise if this can be done...
yes, should be simple as long as Nest/NOW has it in RTD Feed. Verify that in excel. This should also give you some idea on code flow.

1) ninja_trader.cpp/h - Add functions for Bid ask - should be very simple here - just copy paste and also look at Ninja trader dll interface for function Bid/Ask signature

2) ini - In ScripX, Add extra field for Bid/Ask. Parse this in Settings.cpp and setup extra fields.

3) then the main stuff is in worker.cpp/h.
Add fields to enum SCRIP_FIELDS.
Add fields in connect()
Add extra cases for processRTDData() and save state in ScripState
Finally setup bars in amibrokerPoller() and send to NT in pushToNT()

Hopefully, this covers it.

4) If interested - If you can keep code clean ( just similar to existing code ) and if you take some effort to setup git, then we can merge your changes after its stable.

I will also need to learn how this works in git. The workflow is described here.

Edit - There is one problem though - Currently we aggregate the data and only send it to AB/NT once a second. We can change this, but it will need some more work. Instead of aggregate, we can just make array of quotes and send them via tickmode. AB needs some extra work for tickmode to work.
But before that, question is - Is 1 update/second of bid/ask sufficient?

Edit 2 - We can still work with current code - you can just make array of bid/ask price + qty in RTD thread and push them all together in AB thread.
 
Last edited:

boarders

Well-Known Member
yes, should be simple as long as Nest/NOW has it in RTD Feed. Verify that in excel. This should also give you some idea on code flow.

1) ninja_trader.cpp/h - Add functions for Bid ask - should be very simple here - just copy paste and also look at Ninja trader dll interface for function Bid/Ask signature

2) ini - In ScripX, Add extra field for Bid/Ask. Parse this in Settings.cpp and setup extra fields.

3) then the main stuff is in worker.cpp/h.
Add fields to enum SCRIP_FIELDS.
Add fields in connect()
Add extra cases for processRTDData() and save state in ScripState
Finally setup bars in amibrokerPoller() and send to NT in pushToNT()

Hopefully, this covers it.

4) If interested - If you can keep code clean ( just similar to existing code ) and if you take some effort to setup git, then we can merge your changes after its stable.

I will also need to learn how this works in git. The workflow is described here.

Edit - There is one problem though - Currently we aggregate the data and only send it to AB/NT once a second. We can change this, but it will need some more work. Instead of aggregate, we can just make array of quotes and send them via tickmode. AB needs some extra work for tickmode to work.
But before that, question is - Is 1 update/second of bid/ask sufficient?

Edit 2 - We can still work with current code - you can just make array of bid/ask price + qty in RTD thread and push them all together in AB thread.
many many thanks for all your valuable inputs/works.

Nest has bid/ask price and bid/ask qty in excel.
The minimum update frequency in Nest is 1 second but that depends also on whether trades happen every second, if not then will update when the trade happens, but in case more trades happens within one second, then Nest will not show that anyway. but, in spite of this limitation from Nest side, it would be better if we keep the RTD system to work in tick mode instead of every second, i.e. whenever trade happens then we pass that to the charting sw.

I will try to incorporate your suggestions for adding bid/ask data and will revert with the result as well as try to keep the git clean and update here on the progress.

many thanks once again and Kind Regards
 

TracerBullet

Well-Known Member
many many thanks for all your valuable inputs/works.

Nest has bid/ask price and bid/ask qty in excel.
The minimum update frequency in Nest is 1 second but that depends also on whether trades happen every second, if not then will update when the trade happens, but in case more trades happens within one second, then Nest will not show that anyway.
ok, then current state is good enough, you dont need to create any array

but, in spite of this limitation from Nest side, it would be better if we keep the RTD system to work in tick mode instead of every second, i.e. whenever trade happens then we pass that to the charting sw.
Yes, it will be ideal. When i wrote it, i didnt know about TICKMODE. But as it stands, i dont think it impacts trading in any way. Ticks are not lost but aggregated into OHLC. So motivation to change it is less vs other things.

I will get to it later though ...

I will try to incorporate your suggestions for adding bid/ask data and will revert with the result as well as try to keep the git clean and update here on the progress.

many thanks once again and Kind Regards
ok, Create github account and Install git. Its available for windows.

And when you get time read up this and this

It might a bit of work initially, but it will be very helpful in managing merges for RTDMan and for OrderMan (for NEST) instead of doing it manually.

So 1) fork my repo in github, 2) clone your forked repo to your harddrive and then start working on it. We can ignore branches for now i think. 3) Once done you can commit and push changes to your github account and then we will see how to merge.
 

josh1

Well-Known Member
@TB

Sending Tick data to Amibroker is not that difficult. I had found the way.

/********************************************************************************************************************
Data from RTD server comes in pairs of Topic_id and field_id. We have topic _id as row numbers of scrips
from settings.ini. Whereas field_ids are columns.

I have enumerated these field_id in worker.h as LTT=0, VOLUME_TODAY=1, OI=2,LTP=3.
Fortunately RTD Server sends data of each topic_id together and also in order of their ENUM. Hence data pairs come sequentially in the order LTT=0, VOLUME_TODAY=1, OI=2,LTP=3

Index does not have any field other than LTP. Equity will not have OI. However every scrip will have LTP.
Therefore LTP is kept last at no.3
Once LTP is received, bar for that scrip is completed and it can be written to current bar or pushed into an array.
 

Similar threads