This article is a continuation of the article on how to set up a strategy with time filters, where we saw how to filter time periods using the time filter and fixed time elements.
In this article, we are going to see how weekly calendar works, to be able to configure a strategy that closes in the weekend.
We start with a strategy with entry rules based on the average crossover and exit rules of benefits and loses pips:
This strategy is going to open and close orders if the conditions are given, no matter the day or the hour.
If the strategy is, for example, in forex 5 minutes, it is possible that we want to avoid the risk in the weekend gap, closing operations in the weekend.
In this sense, we want to have an operation working 24 hours from Monday to Thursday, meanwhile on Friday we will have a special schedule.
Set the calendar #
To do this, we’ll need to duplicate our entry rule, using the same elements, and adding the daily calendar element to the end of each one.
That way, we will now have a rule, adding a daily calendar for Monday, Tuesday, Wednesday and Thursday. And from the other hand, we will configure a specific calendar for Friday.
To end up, in our entry rules configuration, we should indicate a schedule for Friday. Having into account that tradEAsy schedule is GMT + 0, so we must have clear the GMT hour of our broker so we can adjust the parameter in the right way.
With that, we will have our entry rule configured.
Set the weekend closure #
We are now going to the close tule part. In this screen, we will add a new independent close rule setting the Friday closure at the time we want to close our operations before the market closure.
That way, we should have an exit rule that on Friday at last minute (or what is considered last minute) closes all the orders. The reading type of this rule should be to the tick in order to have the precision of validating it at the exact minute you have said. If you let it close with the candle, and you work in a timeframe of, for example, one hour, the reading will not be done in the minute you have set but in the exact hour.
With these actions, we will have already implemented a strategy with the weekend closure. To sum up:
We have added to our rule condition an entry rule applying only from Monday to Thursday and our duplicated condition to operate on Fridays until a determined hour.
In the exit rules part, we have added a new rule so that on Fridays after opening orders, it closes all the orders before the weekend.
If you’d like to learn more about us, be sure to visit our YouTube channel.
And if you have any questions, you can write to us here.