# How can I optimize 3 variables in order to maximize the end product?

I am in the process of making a cryptocurrency trading bot. Currently, I am doing backtesting over a period of 7 months in which I provide a portion of historical data as if it were in real-life.

By modulating 3 variables: decision threshold, maximum % gain per trade, and stop loss, I want to find the best input values in order to maximize the amount of ending money I have at the end of the backtest.

What would be a good way to go about this? Currently, I'm running each backtest, and changing only 1 variable, but it seems like a slow process and I feel like there has to be a better way to do it. I've heard about neural networks, but I'm not 100% sure this would be a good scenario to apply that here.

This area is known as black-box optimization: you have a function $f(x,y,z)$ where you have the ability to evaluate $f$ on an input of your choice, and you want to find $x,y,z$ that maximizes $f(x,y,z)$. (Here $x$ is the decision threshold, $y$ is the maximum % gain per trade, and $z$ is the stop loss, and $f(x,y,z)$ is the amount of ending money at the end of a backtest with those parameters.)