// Variables to store session highs and lows var float asiaHigh = na var float asiaLow = na var float londonHigh = na var float londonLow = na var float usHigh = na var float usLow = na
// Update session highs and lows asiaHigh := (time >= asiaStart and time < asiaEnd) ? math.max(asiaHigh, high) : asiaHigh asiaLow := (time >= asiaStart and time < asiaEnd) ? math.min(asiaLow, low) : asiaLow
londonHigh := (time >= londonStart and time < londonEnd) ? math.max(londonHigh, high) : londonHigh londonLow := (time >= londonStart and time < londonEnd) ? math.min(londonLow, low) : londonLow
usHigh := (time >= usStart and time < usEnd) ? math.max(usHigh, high) : usHigh usLow := (time >= usStart and time < usEnd) ? math.min(usLow, low) : usLow