Count Days.
-
Hello Everyone.
Can anyone please suggest how to count the number of days left for expiry if we trade futures. And what blocks need to be use into it ? -
@Mani13 Do you mean closing a trade as soon as a specific number of days passed?
-
@l-andorrà Thank you for stepping in, No, I dont mean how old the trade is. I just want to count the days from the current date to the future date we add in the inputs.
-
You can use a variable doing that. Like this:
-
For this expiry date you need to get it from the broker, there is no MetaTrader code that can get this. Once you have it you can make the automatically trade end so you are not committed to buy it.