title: How to use timeframe between along with checking the condition of last candle close price
body: <p>I am trying to build a condition where during 10:15 to 14:15, the closing prise of last candle is greater than plotted CPR range.</p>
  <pre><code>// calcCallValue = close &lt; callTriggerValue ? topPivot : math.avg(centralPivot, callNearStrikeSource)
  calcCallValue = close &gt; tS1 and close &lt; bottomPivot and close &gt; pivotTFLow   and (time(timeframe.period, &quot;1015-1415&quot;)) ?  math.avg(topPivot, callNearStrikeSource) : close &gt; tS1 and close &lt; bottomPivot and close &lt; pivotTFLow   and (time(timeframe.period, &quot;1015-1415&quot;))? topPivot : close &lt; tS1 and close &lt; bottomPivot and close &lt; pivotTFLow   and (time(timeframe.period, &quot;1015-1415&quot;))? bottomPivot : na
  callStrikeValue = spreadValueCalc(calcCallValue, spreadValue, 'Call')
  // callStrikeValue = calcCallValue
  callStrikeValue2 = callStrikeValue + spreadValue2
  // calcPutValue =  close &gt; putTriggerValue ? bottomPivot : math.avg(centralPivot, putNearStrikeSource)
  calcPutValue = close &lt; tR1 and close &gt; topPivot and close &lt; pivotTFHigh   and (time(timeframe.period, &quot;1015-1415&quot;))? math.avg(bottomPivot, putNearStrikeSource) : close &lt; tR1 and close &gt; topPivot and close &gt; pivotTFHigh   and (time(timeframe.period, &quot;1015-1415&quot;))? bottomPivot : close &gt; tR1 and close &gt; topPivot and close &gt; pivotTFHigh   and (time(timeframe.period, &quot;1015-1415&quot;))? topPivot : na
  putStrikeValue =  spreadValueCalc(calcPutValue, spreadValue, 'Put')
  // putStrikeValue =  calcPutValue
  putStrikeValue2 = putStrikeValue - spreadValue2
  icCallStrikeValue = spreadValueCalc(centralPivot,spreadValue, 'Call')
  // icCallStrikeValue = centralPivot
  icCallStrikeValue2 = icCallStrikeValue
  icPutStrikeValue = spreadValueCalc(centralPivot, spreadValue, 'Put')
  // icPutStrikeValue = centralPivot
  icPutStrikeValue2 = icPutStrikeValue
  
  </code></pre>
  <p><a href="https://i.stack.imgur.com/q0iN3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q0iN3.jpg" alt="enter image description here" /></a></p>