Freedom of choice

Do I have a freedom of choice? Can I select or everything is already predetermined, prescribed, programmed? It seems to me that I am free in my decisions, however not quite conscious of the responsibility. Let's say I have a freedom of will every second, starting from that of choosing the direction in which to release thoughts. So I am a creator of my live and can take those decisions, which consequences will make me happy or unhappy. But sometimes there is an impression that there is no choice. Everything happens on its own and I do not influence thoughts and actions. Like a puppet, I am guided by an invisible hand, and it's only an illusion that I live my life. Actually the scenario had been written long ago, the parts are casted and I simply remain blissfully unaware that I am just a doll. Something made by me I assume as made by my own hands and another I bind with fate, karma or something else. If the book of life exists, and there is no freedom of choice, I am just one of her characters. But if the freedom of choice exists, then I write the book myself and am responsible for everything written. I become the central character. The whole life is under my thumbs and then everything is possible. But it may be a trap: the scenario may contain another story line: suddenly I realized that I decide everything myself and it's beginning to feel like I am the central hero. "One of the book figures decided that he is the main hero..."