I am using this code that plots the PM high/lows, it works awesome on mobile. I would like to however show the range for the first 15min of the trading day (not PM). I tried the ORB codes but they wont show up on mobile.
15min low - red line
15min high - green line
15min low - red line
15min high - green line
Code:
# OvernightHiLowLines_mobius_jq
# GlobeX or Overnight High / Low without Fibonacci Values
# Based on code by Mobius # V01.2012
# cosmetic alterations by Johnny Quotron
# 1. removal of fib lines
# 2. paint ONL bubble below the line
# 3. addition of other comments
# 4. addition of bubbles in the expansion area if desired
#
# Restrictions: Hi / Low lines are not drawn for non-traded indicies such as VIX or TNX..JQ
declare hide_on_daily;
input PlotOverNightExtremes = yes;
input DisplayPriceBubbleOnHiLowBar = yes;
input DisplayPriceBubbleOnRightEdge = yes; #Haven't figured this out yet..JQ
def o = open;
def h = high;
def l = low;
def c = close;
def v = volume;
def bar = BarNumber();
def GlobeX = GetTime() < RegularTradingStart(GetYYYYMMDD());
def vol = if GlobeX and !GlobeX[1]
then v
else if GlobeX
then vol[1] + v
else Double.NaN;
def GlobeX_Volume = vol;
def ONhigh = if GlobeX and !GlobeX[1]
then h
else if GlobeX and
h > ONhigh[1]
then h
else ONhigh[1];
def ONhighBar = if GlobeX and h == ONhigh
then bar
else Double.NaN;
def ONlow = if GlobeX and !GlobeX[1]
then l
else if GlobeX and
l < ONlow[1]
then l
else ONlow[1];
def ONlowBar = if GlobeX and l == ONlow
then bar
else Double.NaN;
def OverNightHigh = if BarNumber() == HighestAll(ONhighBar)
then ONhigh
else OverNightHigh[1];
def OverNightLow = if BarNumber() == HighestAll(ONlowBar)
then ONlow
else OverNightLow[1];
#
plot ONH = if OverNightHigh > 0
then OverNightHigh
else Double.NaN;
ONH.SetHiding(!PlotOverNightExtremes);
ONH.SetPaintingStrategy(PaintingStrategy.SQUARES);
ONH.SetDefaultColor(Color.BLUE);
ONH.HideBubble();
ONH.HideTitle();
#
plot ONL = if OverNightLow > 0
then OverNightLow
else Double.NaN;
ONL.SetHiding(!PlotOverNightExtremes);
ONL.SetPaintingStrategy(PaintingStrategy.SQUARES);
ONL.SetDefaultColor(Color.LIGHT_GRAY);
ONL.HideBubble();
ONL.HideTitle();
# Bubble code
AddChartBubble(bar == ONhighBar and PlotOverNightExtremes and DisplayPriceBubbleOnHiLowBar, ONH, "ONH: " + ONH, createColor(204,204,255));
AddChartBubble(bar == ONlowBar and PlotOverNightExtremes and DisplayPriceBubbleOnHiLowBar, ONL, "ONL: " + ONL, createColor(204,204,255),no); #designated that the bubble be painted below the ONL line. 2018-04-07 JQ
AddChartBubble(barNumber() == highestAll(barnumber()) and PlotOverNightExtremes and DisplayPriceBubbleOnRightEdge, ONH, "ONH: " + ONH, createColor(204,204,255));
AddChartBubble(barNumber() == highestAll(barnumber()) and PlotOverNightExtremes and DisplayPriceBubbleOnRightEdge, ONL, "ONL: " + ONL, createColor(204,204,255),no);
# End Code GlobeX or Overnight High / Low without Fibonacci Values
Last edited by a moderator: