Loading strategy parameters from .csv file
Author: daivd_leake
Creation Date: 8/17/2016 9:28 AM
profile picture

daivd_leake

#1
Hi Eugene

I note there are approaches for loading historical trades and prices from .csv files directly into the strategy code. But do you have any suggestions on the easiest way to load in strategy parameters from such an external file?

Ideally the code could recognise the chart symbol and then pull in the corresponding parameters from an external file without any manual changes

Any thoughts on how to achieve this?

Thank you

David
profile picture

Eugene

#2
Hi David,

I do not think that Strategy Parameters as we know them can be loaded from an external file in principle as they are defined in constructor of the Strategy class:

Execute Strategy on a set of different Strap values coming from a file

Fortunately, what you're really looking for is different and of course easily possible. Here's how to pass some data bit from an external file to your Strategy:

My company name from file?

As you're going to see, this example loads a custom string from a specially formatted text file and varies it depending on the chart symbol recognized.

HTH
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).