How can I do to program a closing time of a trade ?

 

In other words, one trade is open and I would like to program that it closes automatically next monday (=date) at 9:30 (=time).

The helpdesk of MetaTrader told me that I should write a script but I do not have any experience of scripts.

Many thanks in advance,

Michel

 

Try this script. It closes one trae on particular symbol at desired time. You can specify time and place it on chart where you want to close a trade. It will wait and close the position and selfremove.

Set UseLocalTime to TRUE to use your PC local time, otherwise script uses server time.

Files:
 
hasayama:

Try this script. It closes one trae on particular symbol at desired time. You can specify time and place it on chart where you want to close a trade. It will wait and close the position and selfremove.

Set UseLocalTime to TRUE to use your PC local time, otherwise script uses server time.


Many thanks

I will try it this week-end (I have first to understand how to load it on the platform).

Have a nice week-end,

Michel

hasayama:

Try this script. It closes one trae on particular symbol at desired time. You can specify time and place it on chart where you want to close a trade. It will wait and close the position and selfremove.

Set UseLocalTime to TRUE to use your PC local time, otherwise script uses server time.