int price = getPrice(symbol); double signal = exp(...) * ((double)price); if (signal > threshold) { buy(symbol); }