Hi I am printing the High and Low of the first candle when the market open. I am not getting the right values. Can you please let me know what I am doing wrong..
See the picture at
input rangeHighPrice = high;
input rangeLowPrice = low;
def rg = AbsValue(rangeHighPrice - rangeLowPrice);
plot range = rg;
range.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
range.SetDefaultColor(Color.DARK_GREEN);
def NineThirty = SecondsFromTime(930) > 0;
def TwelveOclock = SecondsFromTime(1200) > 0;
def MarketOpen = NineThirty > 0 && NineThirty [1] <= 0;
def LunchTime = TwelveOclock > 0 && TwelveOclock[1] <= 0;
AddVerticalLine(MarketOpen,if MarketOpen then “High:” + high +" Low:" + low else "",if MarketOpen then color.GREEN else color.BLUE);
See the picture at
input rangeHighPrice = high;
input rangeLowPrice = low;
def rg = AbsValue(rangeHighPrice - rangeLowPrice);
plot range = rg;
range.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
range.SetDefaultColor(Color.DARK_GREEN);
def NineThirty = SecondsFromTime(930) > 0;
def TwelveOclock = SecondsFromTime(1200) > 0;
def MarketOpen = NineThirty > 0 && NineThirty [1] <= 0;
def LunchTime = TwelveOclock > 0 && TwelveOclock[1] <= 0;
AddVerticalLine(MarketOpen,if MarketOpen then “High:” + high +" Low:" + low else "",if MarketOpen then color.GREEN else color.BLUE);