Skip to content

DNA usage ​

Let's say you found a good DNA and now you want to use it in your strategy. Go ahead and copy the DNA string that is displayed in the "evolving" dashboard. It should be a weird-looking string such as t4. Copy it from within the dashboard:

dna-example

Then, define a method called dna inside your strategy that returns the DNA string:

py
def dna(self):
    return 't4'

Now if you run the SMACrossover strategy, these new values will be used instead of the default ones that we defined earlier. For example slow_sma_period will be 159 and fast_sma_period will be 28.

We do NOT guarantee profitable trading results in anyways. USE THE SOFTWARE AT YOUR OWN RISK. THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR TRADING RESULTS. Do not risk money which you are afraid to lose. There might be bugs in the code - this software DOES NOT come with ANY warranty. All investments carry risk! Past performance is no guarantee of future results! Be aware of overfitting!