In-Development TradeDangerous: power-user trade optimizer

Is there a way we can tell when maddavo's files are updated?

The prices and stations are updated whenever someone uploads their .prices file. At the moment this happens a couple of times an hour. Most people download a fresh .prices file and Station.csv when they start an ED session and then upload their .prices file when they finish their ED session. That seems to work well.

The systems file is updated every couple of days whenever RedWizzard adds more verified system coordinates to his reference json file.

BTW Everyone: I've programmed in a corrections filter now so "Chi Hub" gets mapped to "Chu Hub" - this was a particular problem recently when some bad data was uploaded. If you find any other incorrect names of Stations/Items then pls let me know so I can add to the corrections.
 
The prices and stations are updated whenever someone uploads their .prices file. At the moment this happens a couple of times an hour. Most people download a fresh .prices file and Station.csv when they start an ED session and then upload their .prices file when they finish their ED session. That seems to work well.

The systems file is updated every couple of days whenever RedWizzard adds more verified system coordinates to his reference json file.

BTW Everyone: I've programmed in a corrections filter now so "Chi Hub" gets mapped to "Chu Hub" - this was a particular problem recently when some bad data was uploaded. If you find any other incorrect names of Stations/Items then pls let me know so I can add to the corrections.


Is this the same prices file that we download?

As in.. we dL the TradeDangerous.prices file from maddavo's site..

During the game we use TD's "update" command to add/change data.
This will change our local TradeDangerous.prices file??

Then we can upload this same file to maddavo's site??
 

wolverine2710

Tutorial & Guide Writer
Might be slight OT but its related to TD and the ppl using it, so I abuse this thread a bit ;-(

@maddavo. Just visited your website and used the "TradeDangerous" button. Function: This function creates a TradeDangerous.prices file (v5) from the shared database, all categories and commodities are sorted as per the market in ED for easy updating.
Note. I'm using using TD 5.0.1

At first I got an error but tried again and after that I could download it. After that I wanted to merge my virgin file with your .prices file. I uploaded my virgin.prices file. I get the following error:
System: "ACIHAUT", Station: "Cuffey Plant"unknown item "Hydrogen Fuels" - ignoring

Microsoft VBScript runtime error '800a000d'

Type mismatch: '[string: "demand 35304L2"]'

/td/processdata.asp, line 156
Do you perhaps know what is going wrong. As in I'm doing something wrong or perhaps the site is having an issue?
 
Here's a little bug.

Code:
trade.py -vv run --sh cobra --ins 33000 --ly 9.24 --margin 0.1 --hops 5 --ju 4 --cap 36 --cr 383962 --fr "ORI"
trade.py: Station lookup: "ORI" could match either "Fujimori Hub" or "Cori Terminal"

TD definitely knows about 'ORI Alexeyev Depot' because it told me to come here in the first place. :)
 

wolverine2710

Tutorial & Guide Writer
The following might be of interest for TD. The thread "[TOOL][IDEA] Sharing market data?...and beyond, with DHT" by commander mlow. I suggested the file tradedangerous.prices as a possible usage for it. If ED-DHT is installed and a merge program exists for it it would be possible to merge the .prices files of all commanders in one go. I believe Maddavo already has a merge program. It might be interesting to check if this all is a viable solution. It surely seems to be a very exiting and innovative use of DHT.
 
Might be slight OT but its related to TD and the ppl using it, so I abuse this thread a bit ;-(

@maddavo. Just visited your website and used the "TradeDangerous" button. Function: This function creates a TradeDangerous.prices file (v5) from the shared database, all categories and commodities are sorted as per the market in ED for easy updating.
Note. I'm using using TD 5.0.1

At first I got an error but tried again and after that I could download it. After that I wanted to merge my virgin file with your .prices file. I uploaded my virgin.prices file. I get the following error:
System: "ACIHAUT", Station: "Cuffey Plant"unknown item "Hydrogen Fuels" - ignoring

Microsoft VBScript runtime error '800a000d'

Type mismatch: '[string: "demand 35304L2"]'

/td/processdata.asp, line 156
Do you perhaps know what is going wrong. As in I'm doing something wrong or perhaps the site is having an issue?

There is not much error checking in the upload/download of the .prices file as it assumes TD is doing that.

Does TD accept your virgin.prices file? Try using it first with TD and then upload the resultant (converted) .prices file to merge the data. I think your virgin.prices file must contain old data in an old format.

The item in TD is "Hydrogen Fuel" not "Hydrogen Fuels" - this changed at some stage, possibly around v5. I have added this to the corrections filter so it should convert that for you.

The "demand 35304L2" indicates that your virgin.prices file is in old format. There should not be any "demand" (the word) on every line anymore and the demand level would be "35304M" not "35304L2".
 
Last edited:
Here's a little bug.

Code:
trade.py -vv run --sh cobra --ins 33000 --ly 9.24 --margin 0.1 --hops 5 --ju 4 --cap 36 --cr 383962 --fr "ORI"
trade.py: Station lookup: "ORI" could match either "Fujimori Hub" or "Cori Terminal"

TD definitely knows about 'ORI Alexeyev Depot' because it told me to come here in the first place. :)

Your Station.csv file contains at least two stations in the ORI system. TD needs a unique departure station and destination station (if given). You can do 1 of 2 things:

1. Delete the non-market stations from your Station.csv - then the "--fr ORI" argument will only find one station as the departure station. (I only keep market stations in my Stations.csv as others don't interest me in TD).
2. Change your argument to "--fr alexeyevd" to explicitly identify from which station to depart.
 
Last edited:

wolverine2710

Tutorial & Guide Writer
There is not much error checking in the upload/download of the .prices file as it assumes TD is doing that.

Does TD accept your virgin.prices file? Try using it first with TD and then upload the resultant (converted) .prices file to merge the data. I think your virgin.prices file must contain old data in an old format.

The item in TD is "Hydrogen Fuel" not "Hydrogen Fuels" - this changed at some stage, possibly around v5. I have added this to the corrections filter so it should convert that for you.

The "demand 35304L2" indicates that your virgin.prices file is in old format. There should not be any "demand" (the word) on every line anymore and the demand level would be "35304M" not "35304L2".

Not sure what is going on. Except for in the comment lines I don't have demand lines in my virgin file. The one I download from your website can be found here. I do have 311 cases of "Hydrogen Fuel" in my virgin file. Not a single "Hydrogen Fuels"

With the virgin .prices file TD does NOT work. I get the following error.
wolverine@WOLVERINE-PC /c/Data/Games/Elite Dangerous/TD_bitbucket-repository (master)
$ trade.py --detail run --credits 1000
./trade.py: data\TradeDangerous.prices:242 Unrecognized STAR/Station, '36 URSAE MAJORIS/LIWEI OUTPOST'.
I've run it again with the --debug flag. The output can be found here. TD doesn't seem to find some .csv files. Perhaps I did something wrong (with sourcetree) but I thought I'm running 5.0.1. Would it be possible for you to have a look at the debug logs?

Edit: Just cloned TD again with sourcetree. When running got the missing .prices message. Copied your virgin .prices file to the data directory. Ran TD again and getting the same error.
 
Last edited:
Here's a little bug.

Code:
trade.py -vv run --sh cobra --ins 33000 --ly 9.24 --margin 0.1 --hops 5 --ju 4 --cap 36 --cr 383962 --fr "ORI"
trade.py: Station lookup: "ORI" could match either "Fujimori Hub" or "Cori Terminal"

TD definitely knows about 'ORI Alexeyev Depot' because it told me to come here in the first place. :)

"ORI" is the system name, "--from" wants a station name.

Station lookup: "ORI" could match either "Fujimori Hub" or "Cori Terminal"

try

"--fr alexy" or "--fr alexeydep" would resolve the ambiguity.

-Oliver

- - - - - Additional Content Posted / Auto Merge - - - - -

Might be slight OT but its related to TD and the ppl using it, so I abuse this thread a bit ;-(

@maddavo. Just visited your website and used the "TradeDangerous" button. Function: This function creates a TradeDangerous.prices file (v5) from the shared database, all categories and commodities are sorted as per the market in ED for easy updating.
Note. I'm using using TD 5.0.1

At first I got an error but tried again and after that I could download it. After that I wanted to merge my virgin file with your .prices file. I uploaded my virgin.prices file. I get the following error:
System: "ACIHAUT", Station: "Cuffey Plant"unknown item "Hydrogen Fuels" - ignoring

Microsoft VBScript runtime error '800a000d'

Type mismatch: '[string: "demand 35304L2"]'

/td/processdata.asp, line 156
Do you perhaps know what is going wrong. As in I'm doing something wrong or perhaps the site is having an issue?

You appear to be using a fairly old version of TD. The .prices format has been cleaned up to look a LOT more like the in-game UI

Code:
# TradeDangerous prices for ALL Systems/Stations

# REMOVE ITEMS THAT DON'T APPEAR IN THE UI
# ORDER IS REMEMBERED: Move items around within categories to match the game UI

# File syntax:
# <item name> <sell> <buy> [ <demand units><level> <stock units><level> [<timestamp>] ]
#   '?' or 'unk' indicates unknown values (don't care),
#   '-' or 'n/a' indicates 'not available' item,
#   Level can be '?', 'L', 'M' or 'H'
# If you omit the timestamp, the current time will be used when the file is loaded.

#     Item Name               Sell Cr  Buy Cr    Demand    Stock  Timestamp

@ 10 CANUM VENATICORUM/Janifer Port
   + Chemicals
      Explosives                  175     188         ?   54860?  2014-11-01 10:59:47
      Hydrogen Fuel               100     102         ?  367963?  2014-11-01 10:59:47
      Mineral Oil                 252       0         ?        -  2014-11-01 10:59:47
      Pesticides                  112     122         ?  766601?  2014-11-01 10:59:47
   + Consumer Items
      Clothing                    324       0         ?        -  2014-11-01 10:59:47
   + Foods
      Animal Meat                1614       0         ?        -  2014-11-01 11:09:47
      Coffee                     1551       0         ?        -  2014-11-01 11:09:47
      Fish                        784       0         ?        -  2014-11-01 11:09:47
      Food Cartridges             219       0         ?        -  2014-11-01 11:09:47
...

timestamp moved to the right side of the file, so leaving it out means "now",
L1, L2 and L3 become L, M and H
L0 becomes - or "unk"
L-1 becomes ? or "unk"

If you see just "?" it means "unknown units, unknown level". If you see just "-" it means "not available".
 
Last edited:
Your Station.csv file contains at least two stations in the ORI system. TD needs a unique departure station and destination station (if given). You can do 1 of 2 things:

1. Delete the non-market stations from your Station.csv - then the "--fr ORI" argument will only find one station as the departure station. (I only keep market stations in my Stations.csv as others don't interest me in TD).
2. Change your argument to "--fr alexeyevd" to explicitly identify from which station to depart.

1. The issue though is that I am inputting ORI as a system to allow TD to decide which station within the system to use as a starting point (which is how the input parameter is described in the TD readme), but TD is assuming that ORI refers to a station. And ORI appears as a string in two station names. I get the same error if I use "ORI/" as an argument to try and force TD to use ORI as a system.
2. Yep. Got that thanks. But for systems that have more than one station that trades commodities I don't want to be forced down specifying the station myself.

In the ORI case, a moot point really as there is only one station that trades, but still a bug IMO. The error message should include ORI/Alexyev Depot in the error message at the very least.
 
What do you mean by "virgin"? TradeDangerous doesn't (hasn't for a while) come with a .prices file of it's own. So you must be getting that file from somewhere.
 
"ORI" is the system name, "--from" wants a station name.



try

"--fr alexy" or "--fr alexeydep" would resolve the ambiguity.

-Oliver

Yep those strings resolve the specific issue, but the README says:

Code:
RUN sub-command:

  This command provides the primary trade run calculator functionality (it provides
  the functionality of the older TradeDangerous versions prior to 3.1)

   Route options:
     --from <station or system>
       Lets you specify the starting station
       e.g.
         --from Dahan
         --from Gateway

So I accept that 'ORI' is not unique enough as a from starting point as a --fr system or station, but the error message could be clearer by mentioning the matching system name as well as the individual station names. I'd like to think that for systems that contain more than 1 trading station, that I can type in the system name and let TD decide the station, rather than choosing the station myself.
 
Last edited:
where can I find a list of TD commands?

Im unsure of all of the subcommands (-- xyz) and their shortcuts.

example.. --cap --ship (or --sh)
etc
etc

a list somewhere?
 
where can I find a list of TD commands?

Im unsure of all of the subcommands (-- xyz) and their shortcuts.

example.. --cap --ship (or --sh)
etc
etc

a list somewhere?

I think what you are looking for is in the 'Read Me'. About a third of the down in it. Look for COMMAND LINE OPTIONS.
 
So I accept that 'ORI' is not unique enough as a from starting point as a --fr system or station, but the error message could be clearer by mentioning the matching system name as well as the individual station names. I'd like to think that for systems that contain more than 1 trading station, that I can type in the system name and let TD decide the station, rather than choosing the station myself.

https://bitbucket.org/kfsone/tradedangerous/issue/52/resolve-system-station-when-only-one

"--from" and "--to" expect a station but will fallback to trying to resolve a station from a system. Changing that is a bit swings and roundabouts. Throwing system and station names into the same search will just mean there are more names to collide; staggering the search -- e.g. searching station names for word matches, then systems, then stations for partials, then systems -- would just make it complicated and difficult to predict given the name pool we h
 
where can I find a list of TD commands?

Im unsure of all of the subcommands (-- xyz) and their shortcuts.

example.. --cap --ship (or --sh)
etc
etc

a list somewhere?

For a given argument, e.g. "--ship" or "--may-experience-turbulence-and-then-explode", you can abbreviate down to the fewest characters that remain unambiguous between options.

E.g. "trade.py update --supply --sublime" you can abbreviate to "trade.py update --sup --sub". You can't use "--su" because it could match either "supply" or "sublime".

Some arguments also have single letter abbreivations that take a single dash, e.g. "-S" for "--supply"; you can actually put these together in a single parameter:

trade.py update --detail --detail --detail --supply --force-na --timestamps --sublime

can be shortened:

trade.py update -vvvS0T --sub

Use "trade.py <cmd> -h" for command specific help which includes the one-dash versions

output from: ./trade.py update -h
Code:
./trade.py: TradeDangerous help

usage: trade.py update [--editor EDITOR] [--supply] [--timestamps]
                       [--force-na] [--sublime | --notepad | --npp | --vim]
                       [-h] [--debug] [--detail] [--quiet] [--db DBFILENAME]
                       [--cwd CWD] [--link-ly LINKLY]
                       origin

Required Arguments:
  origin                Name of the station to update.

Optional Switches:
  --editor EDITOR       Generates a text file containing the prices for the
                        station and loads it into the specified editor for
                        you.
  --supply, -S          Includes demand and stock (supply) values in the
                        update.
[spoiler]
  --timestamps, -T      Includes timestamps in the update.
  --force-na, -0        Forces 'unk' supply to become 'n/a' by default
  --sublime             Like --editor but uses Sublime Text (2 or 3), which is
                        nice.
  --notepad             Like --editor but uses Notepad.
  --npp                 Like --editor but uses Notepad++.
  --vim                 Like --editor but uses vim.

Common Switches:
  -h, --help            Show this help message and exit.
  --debug, -w           Enable diagnostic output.
  --detail, -v          Increase level of detail in output.
  --quiet, -q           Reduce level of detail in output.
  --db DBFILENAME       Specify location of the SQLite database.
  --cwd CWD, -C CWD     Change the working directory file accesses are made
                        from.
  --link-ly LINKLY, -L LINKLY
                        Maximum lightyears between systems to be considered
                        linked.

Generates a human-readable version of the price list for a given station and
opens it in the specified text editor. The format is intended to closely
resemble the presentation of the market in-game. If you change the order items
are listed in, the order will be kept for future edits, making it easier to
quickly check for changes.
[/spoiler]

they're also listed in the README.

For the abbreviations, though, you just have to experiment with being lazy typing the full versions ;)
 

wolverine2710

Tutorial & Guide Writer
Perhaps interesting for getting more and more up to date price information. "EDDN - Elite Dangerous Data Network. Trading tools sharing info in an unified way". Basically EMDN by Andreas but then filled with data NOT gathered by scraping the ED program/protocols. Hence data gathered in a legal way. In this case data entered manually in trading tools. I've PM-ed trading tools authors. Since I wrote the thread already someone PM-ed me to say he's very interested in creating EDDN on an Azure platform. I hope the TT authors respond and are positive about the idea. Fingers crossed.
 
https://bitbucket.org/kfsone/tradedangerous/issue/52/resolve-system-station-when-only-one

"--from" and "--to" expect a station but will fallback to trying to resolve a station from a system. Changing that is a bit swings and roundabouts. Throwing system and station names into the same search will just mean there are more names to collide; staggering the search -- e.g. searching station names for word matches, then systems, then stations for partials, then systems -- would just make it complicated and difficult to predict given the name pool we h

OK Confusious ;) Doesn't make a fantastic tool unusable, thought I would flag it if it was fixable, understand why it would cause inefficiencies.
 
Back
Top Bottom