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.
// calcCallValue = close < callTriggerValue ? topPivot : math.avg(centralPivot, callNearStrikeSource)
calcCallValue = close > tS1 and close < bottomPivot and close > pivotTFLow and (time(timeframe.period, "1015-1415")) ? math.avg(topPivot, callNearStrikeSource) : close > tS1 and close < bottomPivot and close < pivotTFLow and (time(timeframe.period, "1015-1415"))? topPivot : close < tS1 and close < bottomPivot and close < pivotTFLow and (time(timeframe.period, "1015-1415"))? bottomPivot : na
callStrikeValue = spreadValueCalc(calcCallValue, spreadValue, 'Call')
// callStrikeValue = calcCallValue
callStrikeValue2 = callStrikeValue + spreadValue2
// calcPutValue = close > putTriggerValue ? bottomPivot : math.avg(centralPivot, putNearStrikeSource)
calcPutValue = close < tR1 and close > topPivot and close < pivotTFHigh and (time(timeframe.period, "1015-1415"))? math.avg(bottomPivot, putNearStrikeSource) : close < tR1 and close > topPivot and close > pivotTFHigh and (time(timeframe.period, "1015-1415"))? bottomPivot : close > tR1 and close > topPivot and close > pivotTFHigh and (time(timeframe.period, "1015-1415"))? 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
