Hello, if I want to trade the breakout of the range of the past week or the past month … how do I define the high and the low of the past week or the past month?
Use TIMEFRAME instruction to get the last closed candlestick High and Low, example with weekly timeframe:
TIMEFRAME(weekly, updateonclose)
weekhigh = high
weeklow = low
Oh, timeframe weekly works? And then weekhigh (1) is the past week?
Yes, TIMEFRAME(Weekly) works finely.
weekhigh is the high price of the last closed weekly bar. That value will be valid Sunday through Friday next week.