@JayRogers, How do we filter by day of the week? Only want to execute trades on tue+wed but I can't see any documentation about how to get these values. The link is broken (at least for me)
Objredline
⋅
@worthy7, Link is broken. Did you ever figure out how to filter the backtest on a period in the past? Especially if that period is outside of Tradingview's ~8000 bar hard cap?
worthy7
⋅
@Objredline, I took a quick look at some of my old code, found this line:
`tradingallowed = (not na(k) and not na(d) and (dayofweek==3 or dayofweek==4 or dayofweek==5)) and (getTakeProfitInTicks(tradedirection)/10 > MinimumPredictedProfitPerTrade)`
Objredline
⋅
@worthy7, Thank you! is tradingallowed a TV built in function? Thanks again.
worthy7
⋅
@Objredline, no just part of my code, the important point is dayofweek==3, which I think is a Tuesday.
eg for binary options 5mins expiry