Add Sector

Pejman

Well-known member
Joined
May 22, 2019
Posts
82
Likes
17
Hi All

Do you know how can we add sector as bulk? i am going to add sector to all 2000 instrument not one by one. in format that MW provided there is not any sector just :
SYMBOL,EXCHANGE,TYPE,CURRENCY,MINTICK,TITLE

1665186842517.png
 
Interesting question, @Pejman, so it got me curious. Always eager to learn more about MW :cool:

I fiddled around in some MW-config files and this is what I discovered:

  1. When I go to MW's menu > Configure > Repository I can establish where my 'config files' will be stored
  2. In that folder, conveniently called 'config', I see a subfolder 'config'
  3. In that subfolder a .csv-file called 'instruments.csv'
  4. That folder has many many columns (too much for my spreadsheet-program to load, so I got an error when opening it), so I needed to figure out which one holds the info for 'sector'
  5. So I went to MW > Menu > Configure > Instruments and added a sector for the very first instrument in the list. I chose 'energy' :)
  6. I closed MW (so the changed 'instruments.csv' is written to disk) and reopened that .csv in my spreadsheet. A simple 'find' showed me 'ENERGY' in column T, in the row of the first instrument. Aha !
So I would advise you (in MW) to attribute the different sectors to the first few instruments in your list and close the MW platform. Then open that .csv in a spreadsheet program and in the beginning of the sheet, in column T you will find the correct sector-names & spelling (seems they are all caps).
Do some Excell-kungfu to assign the correct sectors to the correct instruments (filter + copy/paste!) and reopen MW.
You should be good then ;)

EDIT: you will probably find a spreadsheet with all the Instruments listed per sector somewhere on the www. Or perhaps your broker has one ? That should facilitate the Excell-kungfu ;)
 
Last edited:
@Spin
Have you ever been told you are GENIUS , if not I tell you (y)(y);)

But there is an issue , if we select sector in Edit Instrument in MW , it is added to instrument.CSV file but its opposit it is not working . I mean i added sector to instrument.csv (some Excell-kungfu ;) ) but MW does not bring them in software and also after opening software column T get cleared. i think although not sure software can only write in that file

1665279510259.png


Many thanks
 
Last edited:
Hmmm, I'm sorry to hear that @Pejman ?

I re-tested and it works on my end.

Are you 100% sure your MW was closed when changing the .csv-file ? Because MW will write to it whenever it needs ...

Again, my workflow:
  1. make sure MW is closed
  2. open the config/config/instruments.csv file in a spreadsheet-program
  3. change values like so: (for the screenshot below, I hid the columns G-S)

    LkaI3K.jpg
  4. Make sure to save the file (perhaps check the 'last modified'-data in a file explorer)
  5. open MW and go to Menu > Configure > Instruments and lookup one of the instruments that you changed.
    'Sector'-value should have changed:
    1665346186513.png
Please try again ... ?‍♂️
 
Thanks Spin

i have done what you said , but when i add in T column (i did not touch anything else just add secor in a few cell in Excel) and then open MW all instruments diappear.
i had more than 2500 instrument there but now alll gone.

1665399144871.png
 
OK, this can only make sense if there is something different between my setup and yours :)

So let's try to find out what is going on here.

A couple of friendly questions:
  1. What version of MW are you running ?
  2. Where is your config-folder located ? (the full path on your HD, please)
  3. Where does MW say that your config folder is located ? (screenshot of Menu > Configure > Repository would be nice)
  4. Does the list of instruments in MW (your screenshot from the previous post) correspond to what is visible in the .csv ?
Let's start there, and tackle this annoying issue ;)
 
1- is ultimate edition with last update 6.6.9
2- C:\Users\pejma\AppData\Roaming\MotiveWave\workspaces\ASX\config
3-
1665473424602.png

4- 1665473700725.png


Thanks for your time
 
'morning @Pejman ;)

Thank you for that information. One thing that immediately strikes me (and that is different between our setups) is that you have 'Use local database' ticked as repository.
I unselected that when I created this particular workspace, and have my repository somewhere in a cloud, so that when I move between locations (home, office, a nice park in the sun, ...), my charts + analysis + orders + ... travel with me.

Perhaps this is why this excell-kungfu is not working on your end ?

I would suggest a test where you create a new MW-workspace (first window on launch > options > workspaces > New Workspace) and set the repository to a non-standard folder (doesn't have to be in a cloud, just drop it somewhere on your HD, like in your 'Documents'-folder or so) and try again. You would then obviously change the .csv in this new 'config'-folder and add the sectors there.
If it works there, you could move your analysis to this workspace (it's a subfolder you can copy), so you don't lose any work :)

I would give that a try ! Good luck
 
Hi Spin

May i ask how do you save that instrument.csv file after adding sector to T column? i asked MW team why you could but i could not and they said :

When you start editing/saving the .CSV files, you are likely corrupting them and they are no longer readable by MotiveWave. This is why they disappear within the platform.
You may want to ask the user what program they are using to edit the .CSVs and how exactly they are being saved.
 
I am sorry to hear that you still have not been succesful, @Pejman ?

I am on Linux, so I use a 'non-agressive' program to edit that .csv-file, namely 'LibreOffice Calc'. Currently I am at version 7.0.4.2.
It is open-source, so also available for Windows / MacOS: https://www.libreoffice.org/download/download-libreoffice/

I would not discard the possibility that Microsoft Excell or the likes slightly alters the .csv when you save it (rendering it 'corrupt' like MW crew hints), so I would suggest testing your luck with LibreOffice.
And I add once again that I save my MW-database in a non-standard location, a major difference between our two setups:
One thing that immediately strikes me (and that is different between our setups) is that you have 'Use local database' ticked as repository.
I unselected that when I created this particular workspace, and have my repository somewhere in a cloud, so that when I move between locations (home, office, a nice park in the sun, ...), my charts + analysis + orders + ... travel with me.

Perhaps this is why this excell-kungfu is not working on your end ?

I would suggest a test where you create a new MW-workspace (first window on launch > options > workspaces > New Workspace) and set the repository to a non-standard folder (doesn't have to be in a cloud, just drop it somewhere on your HD, like in your 'Documents'-folder or so) and try again. You would then obviously change the .csv in this new 'config'-folder and add the sectors there.
If it works there, you could move your analysis to this workspace (it's a subfolder you can copy), so you don't lose any work :)
 
Top