Reading and compiling scripts from files in OsEngine.

Reading and compiling scripts from files in OsEngine.

The third way of creating robots differs from the previous two. Its essence is as follows: the algorithm code is created and debugged in the main project, and then transferred and stored as text files with the .cs extension in a special directory - OsEngine\project\OsEngine\bin\Debug\Custom\Robots\.

Despite the seeming complexity, this approach provides an additional advantage in the form of the ability to transfer robots to new versions of OsEngine and edit the algorithm code without the need to recompile the program.

This method of connecting robots to the platform should be used when your algorithms are already ready, and you do not require debugging. You simply trade by transferring scripts from one version of OsEngine to another.

The essence of this method is as follows: the algorithm code is created and debugged in the main project, but then it is transferred and stored as text files with the .cs extension in a special directory next to the application’s exe file:

Despite the apparent complexity, this approach provides an additional advantage of being able to transfer robots to new versions of OsEngine and edit the algorithm code without the need to recompile the program.

After this, simply restart the program. In the future, if you wish to move to a new version of the program, you can just repeat this operation for all the necessary bots.

If your bot needs to connect additional libraries, you will need to create an additional subfolder called Dlls in the script folder and place the necessary libraries there.

This is clearly demonstrated with the StochasticTrade robot:

Happy algorithm development!

If you have any difficulties or questions, please write to the support chat. Link