You can use the MTF (Multiple, or Multi, Time Frame) support that enables you to use more than one timeframe. In this case you need to write the code you want to be executed only once per day just below the DAILY Timeframe,the rest must be written is the DEFAULT Timeframe which must be no higher than 1-hour to match the time used (220000) and must be the timeframe used in your chart:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Timeframe(Daily,UpdateOnClose)
.
.
.
.
Timeframe(Default)
//Set Buy- and SellTime
BuyTime=0
SellTime=0
//Set Entry date
IF(date=20210113)and(time=220000)Then
BuyTime=1
ENDIF
IF(date=20210118)and(time=220000)Then
SellTime=1
ENDIF
you can learn more about MTF, searching MTF in this forum; you will be returned tens of links to examples, articles, blogs and code snippets.
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.Ok