|
David
2021-08-19 18:01:49
|
|
Hi
I am exporting the "Realized Trades" data from a simulation to LibreOffice Calc.
I have added trade metrics via the AddTradeMetric method, but this only allows adding a number, is there any way to add a string?
What I would like is to have a column called "Sector", under which the symbols sector can be added.
Currently I'm creating a new column for each sector i.e.
pos.AddTradeMetric("" + Data.GetSymbolInfo(pos.Symbol).Sector + "",1);
It would be so much cleaner if I could do something like
pos.AddTradeMetric("Sector",Data.GetSymbolInfo(pos.Symbol).Sector);
Main reason is when using a pivot table, it is alot easier to work with one field than many.
I guess I could get around this by using a switch statement based on the sector, and assigning a number to each sector, but just before I do that, I'm I missing something here?
Thanks
|
|