No worries
So, first of all, you want to set the maximum speed, i.e. a "constant" value. This is done in the prototype: you need to create a new entity, and a new item for this entity. To do so, you need to clone an existing train. Don't hesitate to look into existing mods (Mine, or others). If you take mine, be aware that there are libraries required. You can find them in the directory "libs" (If you are not sure, just copy the directory "libs", maybe the file "datalibs.lua" shall be enough. Don't forget to refer it in your file data.lua).
Then, you will see that the original entity has an attribute speed (or max speed). Just change it, and here you go!
For more information, check the wiki and other forum on how to create a mod (I cannot explain you all of this here!).
Frankly speaking, it is not very hard, and you don't need to know how to program to do so, so don't worry!
Niko