Rango de Apertura de 5 Minutos THINKORSWIM
# 5-Min Rango de Apertura # Trading con David - Youtube # 6/20/2023 #First 5 Min Opening Range # input limitFiveOpen = 935; input limitFiveClose = 1600; def limitFive = if SecondsTillTime(limitFiveOpen) <= 0 and SecondsTillTime(limitFiveClose) >= 0 then 1 else 0; input FiveStartTime = 930; input FiveEndTime = 935; input FiveEntryStartTime = 930; input FiveEntryEndTime = 934; def FiveRange = if SecondsTillTime(FiveEntryStartTime) <= 0 and SecondsTillTime(FiveEntryEndTime) >= 0 then 1 else 0; def tradeFiveEntryRange = if SecondsTillTime(FiveStartTime) <= 0 and SecondsTillTime(FiveEndTime) >= 0 then 1 else 0; def FiveHigh = if SecondsTillTime(FiveStartTime) == 0 then high else if FiveRange and high > FiveHigh[1] then high else FiveHigh[1]; def FiveLow = if SecondsTillTime(FiveStartTime) == 0 then low else if FiveRange and low < FiveLow[1] then low else FiveLow[1]; plot highFiveCloud = if FiveRange then FiveHigh else Double.NaN; plot lowFiveCloud = if FiveRange then FiveLow else Double.NaN; highFiveCloud.SetDefaultColor(Color.orange); lowFiveCloud.SetDefaultColor(Color.orange); #AddCloud(lowFiveCloud, highFiveCloud, Color.orange, Color.orange); plot FiveHighLine = if limitFive then FiveHigh else Double.nan; FiveHighLine.setPaintingStrategy(PaintingStrategy.Horizontal); FiveHighLine.setDefaultColor(color.orange); FiveHighLine.setStyle(Curve.short_dash); plot FiveLowLine = if limitFive then FiveLow else Double.nan; FiveLowLine.setPaintingStrategy(PaintingStrategy.Horizontal); FiveLowLine.setDefaultColor(color.orange); FiveLowLine.setStyle(Curve.short_dash);