Instructions for using Maddavo data with TradeDangerous
Getting Started:

  1. Download the TradeDangerous zip and unzip it to a desired directory - somewhere you can navigate to easily with the command line.
  2. Download the prices file, System.csv and Station.csv from Maddavo market share. Put them in the TradeDangerous data directory.
  3. Open the command line and navigate to your TradeDangerous directory.
  4. Try a simple trade run with this command:
    trade.py run -v --credits 1000 --capacity 4 --ly-per 6.96 --jumps 5 --hops 2
That should output the best 2-hop trade run for a starting sidewinder.

For more advanced instructions and in-depth information then CLICK HERE.

How to use TradeDangerous and Maddavo Market Share

SUMMARY

When you start playing Elite:Dangerous, also start TradeDangerous in a cmd line. You will want to download the latest price data so you the information that TD generates is relevant. Systems and Stations may have been added since you last played so you may also need to download the latest Station.csv and System.csv files. As you play, you update prices in your file. This can be done in several ways. When you finish your game session, be sure to share your updated prices file by submitting it at Maddavo market share. You can of course upload prices at any time during your session too.

OBTAINING DATA

There are three prices files. The 'full' price file has a complete dump of all prices in the database and is generated daily. The '2d' price file has the last two days worth of prices and is generated every two hours. The '3h' price file has the last 3hrs worth of prices and is generated whenever new data is received. Together, all three files represent all the prices in the database. TradeDangerous has an import plugin that connects to Maddavo Market Share. Depending on how long it has been since your last import, the plugin will select the appropriate prices file to download. To download prices, use the following command:

trade.py import --plug maddavo

Secondly, the prices belong to stations and stations belong to systems. Systems have coordinates. Coordinates are used for navigation. So, we also have a database of Stations and Systems. We get this data into TradeDangerous using System.csv and Station.csv files. The System.csv file is fairly static as all systems with stations are known (well, the vast majority) because we were given a list by Michael Brookes. The Station.csv file however is very fluid as data is crowdsourced for stations regularly. The plugin that imports prices can also import systems and stations. To import stations, use the following:

trade.py import --plug maddavo --opt stations

To import stations and systems use the following:

trade.py import --plug maddavo --opt stations --opt systems

The systems option is less likely to be needed - probably once a week is enough. The stations option is probably needed regularly and I'd suggest you may want to use it always.

EDSC is the authoritative source for new system data. To obtain new systems from EDSC, use the edscupdate command:

edscupdate --cmdr <your-cmdr-name> <your-system-location>

UPDATING DATA

When you visit a station, you will want to capture the latest prices at the commodities market for that station and record them into the TradeDangerous database. Entering and updating prices in TradeDangerous is a manual process (because there is no way to get the data directly from the game at the moment. BUT there is an EXCELLENT tool called EliteOCR which processes screenshots you take of the commodities market and creates a "import.prices" file which you can then upload and/or import into TradeDangerous.

Using TradeDangerous to update prices is via the 'update command. It can be via a GUI or via a text editor. See the TradeDangerous help documentation for instructions.

Using EliteOCR to update prices is easier for those who don't like manual input. When you have used EliteOCR to obtain data and use the 'export to TradeDangerous' funciton, it will create an import.prices file. You can then use this command to import the EliteOCR prices into your TradeDangerous database:

trade.py import import.prices

SHARING DATA

Once you have updated your local data, you can also share that data by uploading it back to Maddavo Market Share. This keeps the data relevant for other users and assists the crowdsourcing effort. If you update your data using the TradeDangerous update command, then it will create an updated.prices file that can be uploaded using the following command:

python -m misc.madupload updated.prices

If you update your data using EliteOCR, there is a function 'send to EDDN'. That function will transmit the prices to a service called Elite Dangerous Data Network. Maddavo Market Share subscribes to EDDN and will get your price updates. Other trading tools and data repositories also subscribe to EDDN so it is a common price sharing method between all the tools.

If you add or edit stations in your local database then you can also share them. First you need to export the data into a Station.csv file, then you upload the file with the following commands:

trade.py export --table Station
python -m misc.madupload data/Station.csv

OTHER COMMENTS

PRICE is not the only consideration when trading - the time it takes to complete a trade is also important. Most of the time spent will be in supercruise, travelling to a station so you don't want the stations to be too far from the star. There are some stations that are hundreds of thousands of light-seconds from their system star which translates to 20min-30min travelling in some cases. There is even a station I have seen that is 0.22Ly (that's nearly 7 million light-seconds) from the star - that is about an 80min trip! So when you are entering prices for a station, be sure it is worth the trouble. I generally only enter prices for stations that are within about 1000Ls from the star. You can use the --avoid parameter to ignore distant stations and avoid the long trips. Later versions of TradeDangerous take the distance into account and give a penalty to distant stations so this issue is somewhat mitigated.
Entering data for a NEW Station or System
So you're visiting a new Station, great! We need more data. A "new" station is one that we don't have prices for. The update command in TradeDangerous can only enter/update prices for known stations so you need to work out if the station is 'known' or not and if it is not then you need to make it 'known'.

How to work out if a station is 'known':
Try updating it using the TradeDangerous update command. If you spelled it correctly and you still get an error then it isn't known.

Alternatively, you can search the shared database for the system and see if the station is in the list - HERE.

How to make a new station 'known'.
You need to edit your Station.csv and enter the system and station. BUT that may not be all that you need to do. It is possible that the System itself may not be 'known' (unlikely but possible). TradeDangerous has a station command to add/edit/remove stations from the local database. Alternatively, you can use the shared database station editor (HERE again) and then re-download the data using the plugin with the station option.

There IS a way to update prices for a station that is previously unknown without editing the Station.csv or using the TradeDangerous station command. The method is via EliteOCR which may be easier for some. EliteOCR will scan in the prices for the new station, transmit the prices and new station name and system to EDDN. Then Maddavo Market Share will receive the data from EDDN, add the new station to the shared database, add the prices, then regenerate a new Station.csv file and 3h prices file. THEN the new data will be available for import using the Maddavo plugin via:

trade.py import --plug maddavo --opt stations

The time between sending data via EDDN and having data merged and available for import is usually within 3 minutes.

If you need to check if the System is known, look in the System.csv file (you may need to export it from TradeDangerous). If your system is not known, then we have a bit of a problem. If you know what you're doing then you could edit your System.csv file and add the system for yourself (you'll need the 3D coordinates) BUT when you upload your prices file then others won't have the System in their System.csv so when they download prices their TD will break. It is better to visit the crowdsourcing 3D-coordinate-gathering website (EDStarCoordinator) to get the System added to the known system list. The master System.csv on this site is updated regularly from crowdsourced data. TradeDangerous needs the coordinates of the system in order to know where it is relative to other stations/systems and then navigate to it so it is no use just fudging a system name with any random coordinates into the file, they have to be correct.
Working out coordinates of NEW Systems
I gets pretty boring running around known space and if you play Elite:Dangerous enough then eventually you're going to visit a completely new system that no-one else has visited, or at least one that we don't have 3D coordinates for. If the system is not in your System.csv then visit EDStarCoordinator to enter the system and the master System.csv will be updated from that.

Also useful, RedWizzard has written an excellent tool to work out coordinates AND submit them to EDSC - CLICK HERE. Basically you have to be in the system and then enter distances to known systems which you get from the galaxy map. It estimates the coordinates and then calculates the distance back from those known systems. The error should be 0.00 or at least very close to it.

Thanks for reading and safe peddling,
Cmdr Maddavo
Back