You can only achieve your goal with the help of Multi Time Frame support which enables you to use a 30-second TF as default, so that you just need to wait 1 candle after a signal is returned.
This code waits for a condition to be met on a 1-minute TF, but it wants to wait 10 seconds before entering at market. A 1-second default TF must be used to run it:
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.