In-Development TradeDangerous: power-user trade optimizer

What's the entry in tradedangerous.prices have for this station? I think I've had it in the past where only one price in the station was that old.
 
from above it looks like the import of LHS 3447/Dalton Gateway is 2days old and the import did not go in. What am i doing wrong?

You are not doing anything wrong. If you get no feedback, the import has been accepted.

I believe that the age is the oldest of the update from the place you are buying from (in your case a couple of minutes) and where you are selling to (in your case 2 days)

See https://bitbucket.org/kfsone/tradedangerous/issue/113/the-age-displayed-next-to-the-item-we-are

Apparently downloading 6.3.1 will give different, less confusing data about the age. Both the age of the buying price AND selling price will be displayed.
 
Last edited:
Well, I feel like an idjit now - it was of course the hops and/or the use of --via, and the fact that a station along the route had no data entered for it as well, hence the error message (nice segue to your new messaging which is much appreciated). I also had been making my life difficult by not using the scripts, but now I have bash and git installed and it's just like old times.

I also should have put the snippets in a clean db and tried it before posting, boy am I rusty. I did figure it was likely something stupid I was doing though. Sorry to waste your time, but thanks for the detailed response. I will continue to poke around and see if I can break anything... ;-)



So I did the following:


...

However if you were to ask it to try and do two hops in this configuration, it would fail, because there's only one profitable trade (from Johnson to Fleming).

I'm making some changes to the output given when a route doesn't work, including dumping the best route it found at the last hop it could make.
 
Follow instructions , trade.py wont start via command line , reminds me of getting python to work for morrowind , hated those days too !, nice idea , but if it wont work out of the box , not for me

Sorry, Sutex :( That's part of why I keep it tucked away in this particular forum and titled as "power-user". I'd be really grateful if you had a moment to post the actual error you got so I can improve the documentation.

-Oliver

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

How do i check if import has worked? should there be a message that station was updated?
First i f10 LHS 3447/Dalton Gateway commodities
then use EliteOCR i export to EDDN (no idea why, is it in use yet) then i export to a import.prices file
then run
trade.py import "C:\Program Files Games\Frontier\eliteOCR\OCRSystemData\import.prices" <-ignore the space FD forum layout does this
trade.py run -vv --from "lhs 3447/dalton" --ly-per 10.1 --jumps-per 1 --capacity 8 --credits 1000 --insurance 0 --margin 0.02 --hops 1

LHS 3447/Dalton Gateway -> YAKABUGAI/Levi-Montalcini City:
Load from LHS 3447/Dalton Gateway:
8 x Grain 105cr each, 840cr total (2days) <-------------------------------------2days? is this how old data is for system/station
Jump LHS 3447 -> YAKABUGAI
Unload at YAKABUGAI/Levi-Montalcini City (509ls) => Gain 1,600cr (200cr/ton) => 2,600cr
----------------------------------------------------------------------------
Finish at YAKABUGAI/Levi-Montalcini City gaining 1,600cr => est 2,600cr total
from above it looks like the import of LHS 3447/Dalton Gateway is 2days old and the import did not go in. What am i doing wrong?

This was a confusing display issue that was fixed a few days ago (you need to update the code). There are two stations involved in the trade, if you know the source is up to date, then it was telling you that the destination (the selling price) is 2 days old
 
I also should have put the snippets in a clean db and tried it before posting, boy am I rusty. I did figure it was likely something stupid I was doing though. Sorry to waste your time, but thanks for the detailed response. I will continue to poke around and see if I can break anything... ;-)

Well, don't be feeling rusty, that's a legitimate issue - barrier to entry - and TD trips over itself, it's why there isn't a good mock data set for unit tests etc. *sheepish grin*
 
Aaaah, unit tests and mock data... I remember them well. Programming is so much more fun when it is not one's day job. It would have helped if I had RTFM as well, although in all fairness I had one quick read of the wiki at the same time i was using the tool, during long supercruises, and only delved into it further when I created my own problem. Tricky to wrestle with a CLI and output while flying and reading the manual also. I've started to spec out a possible n-tier UI, I have a few ideas and most of the "standard" use cases jotted down, if I manage to type them up I'll send them along to you for your thoughts. Trying to keep JSON and possible new database logic in mind as well so n-tier will work well for that. Thinking about trying to mock up something simple with Jython Swing for fun, have never used it and it looks cool.
 
How do you enter system or station names that have spaces in them?

For example say I want to go to HIP 100035.

If I add the command
"--to HIP" it isn't going to know which HIP i want and naturally returns the following
"System/Station lookup: "HILL" could match HIP 100035, HIP 10046, HIP 100063,..."

If I add the full name
"--to HIP 100035" then it returns
"ERROR: unrecognized arguments: 100035"
 
How do you enter system or station names that have spaces in them?

For example say I want to go to HIP 100035.

If I add the command
"--to HIP" it isn't going to know which HIP i want and naturally returns the following
"System/Station lookup: "HILL" could match HIP 100035, HIP 10046, HIP 100063,..."

If I add the full name
"--to HIP 100035" then it returns
"ERROR: unrecognized arguments: 100035"

Enclose the system/station in quotation marks. (In your example maybe just 100035 may have worked without being proceeded by 'HIP')
 
Last edited:
I always just do

--to hip/100035

or even shorter

--to hi/035

As short as possible, assuming it doesn't start to find other matches. In short, replace spaces with... nothing. No quotation marks needed :)
 
@Epicenter
Use single or double quotes around the full name
--to 'HIP 100035'

@kfsone
How do you want to handle locations with apostrophes? @MIKUNN/Spassky's Inheritance
I just took out the apostrophe when I updated Stations.csv locally, but having the name incorrect will make it not function right if you try to interop with other tools.
 
Thanks tried various things but never thought of using quotes, and must be double (") not (') quotes.

And is there a way to ignore prohibited items?
 
Not sure if this is the right place, but i found a system with a wrong name in maddavos system.csv

'Pantaa Cezisa' does not exist in the galaxy map. I think it should be 'Geoge Pantazis' according to the coordinates.
 
Support for rare goods

I wonder how difficult it would be to hack TradeDangerous to support rare goods.

What I'm looking for is a route, where I load up rare goods at every stop and sell some at the same time. But try to sell at the maximum price (which is about 150ly away).

So, what I'm thinking is, create a special TradeDangerous.prices file which
  1. has only stations that sell rare goods
  2. has only entries for rare goods - no other trade data
  3. have the available stock hard coded
  4. have the station selling price hard coded
  5. have the station buying price approximated by the distance to the selling system


1-4 can be extracted from the spreadsheet here: https://docs.google.com/spreadsheets/d/1haUVaFIxFq5IPqZugJ8cfCEqBrZvFFzcA-uXB4pTfW4/edit#gid=0
5 can be calculated by this formula: https://forums.frontier.co.uk/showthread.php?t=66538.

Further infos on rare goods can be found here: https://forums.frontier.co.uk/showthread.php?t=63119


Now the big question, would that work with TradeDangerous?
 
To begin your quest, if you edit station.csv to contain only stations that sell rare goods, it would be a start.

Ok. Add that to the bullet list. Probably also editing Item.csv

But the big question is, is it worth it? Or is the algorithm in TradeDangerous not capable of e.g. dealing with such large distances?
 
Check out the readme.txt file. But yeah, there's a --avoid option you can pass a comma separated list to.
--avoid slaves,tobacco,etc

Thanks I looked through it but apparently completely overlook the lines about avoid, guess I concentrating on looking for prohibited or illegal and simply didn't notice.
 
Not sure if this is the right place, but i found a system with a wrong name in maddavos system.csv

'Pantaa Cezisa' does not exist in the galaxy map. I think it should be 'Geoge Pantazis' according to the coordinates.

Yes, this is annoying, as I keep removing the damn thing and everytime I update it re-appears.

Code:
aaa@BOOTCAMP-MBP /c/frontier/td (master)
$ ./trade.py local georgepantazis
./trade.py: ERROR: Unrecognized system: georgepantazis
 
FYI: I only learned about rares today, so I've been off implementing them. I'm glad to see the thread had gone the same way itself.

v6.4.0 Jan 01 2015
. (kfsone) Added RareItem table,
. (kfsone) Imported systems from EDStarCoord,
. (kfsone) Added a LOT of stations,
. (kfsone) Converted all SYSTEM names to upper case in the database,

Happy new year.
 
Back
Top Bottom