createTrackbar warns that value pointer is deprecated. But is there any other way to set trackbar's initial position?

you don’t have to use globals. you can use the userdata pointer to pass anything into the callback. the pointer just has to stay valid, so if you pass the address of a local variable around, make sure it’s still alive whenever the callback is called.

static void on_trackbar(int pos, void *userdata)
{
    *(double*)userdata = pos / alpha_slider_max;
    // beta is always 1 - alpha, so storing that is pointless
}

main
{
    ...
    const int alpha_slider_max = 100;
    const int alpha_slider_initial = something;
    double alpha; // set from the callback, pointer given to createTrackbar
    ...
    createTrackbar(TrackbarName, WindowName, nullptr, alpha_slider_max, on_trackbar, &alpha);
    setTrackbarPos(TrackbarName, WindowName, alpha_slider_initial);
    ...
    // the event loop using one of the waitKey functions
}