I have updated the work: it involves turning a Pinescript strategy into a study with buy and sell alerts. In addition, I would need 2 switches to decide the time of market entry, independent of the alert signal. Example: at 5am I enter the market in the direction of the existing signal. The 2 switches must have the possibility to be deactivated - on/off.
The alerts must do the signalling and the switch will decide when to enter the market based on the signal/alert active at that time. As for the closures, they will be done by hand. Thanks