Hello,
Can anyone help with this script?
What I'm trying to do is plot the Daily high for the $ADD as the Green Dashed Line on top and the Red line at the Low. The problem I'm having (seen in the attached photo) is that the High and Low is being plotted for the entire time frame that the chart displays. I'm trying to have the High/ Low plots start fresh each day, in other words: still be able to view multiple days at once but have the plots positioned for the High and Low of EACH day.
I really appreciate the help.
Here is my code following the image:
input openingRangeStartTimeEST = 0930;
input openingRangeEndTimeEST = 1600;
input EndTimeEST = 1600;
plot info = open(symbol = "$ADD");
info.SetLineWeight(2);
info.SetPaintingStrategy(PaintingStrategy.LINE);
info.AssignValueColor(if info > info[1] then Color.DARK_GREEN
else if
info < info[1]
then Color.RED
else CreateColor(75, 75, 75));
def ADD = GetSymbol() == "$ADD";
def today = GetDay() != GetDay()[-1];
def percent = Round (info / 2800) * 100;
def high = HighestAll(info);
def low = LowestAll(info);
def openingRange = if SecondsTillTime(openingRangeStartTimeEST) <= 0 and SecondsTillTime(openingRangeEndTimeEST) >= 0 then 1 else 0;
def openingRangeHigh = if SecondsTillTime(openingRangeStartTimeEST) == 0 then high else if openingRange and high > openingRangeHigh[1] then high else openingRangeHigh[1];
def openingRangeLow = if SecondsTillTime(openingRangeStartTimeEST) == 0 then low else if openingRange and low < openingRangeLow[1] then low else openingRangeLow[1];
def StartTimeEST = openingRangeStartTimeEST;
def Range = if SecondsTillTime(StartTimeEST) <= 0 and SecondsTillTime(EndTimeEST) >= 0 then 1 else 0;
plot HighExtension = if Range then openingRangeHigh else Double.NaN;
plot LowExtension = if Range then openingRangeLow else Double.NaN;
HighExtension.SetStyle(Curve.LONG_DASH);
HighExtension.SetLineWeight(1);
HighExtension.AssignValueColor( Color.GREEN);
LowExtension.SetStyle(Curve.LONG_DASH);
LowExtension.SetLineWeight(1);
LowExtension.AssignValueColor( Color.RED);
Can anyone help with this script?
What I'm trying to do is plot the Daily high for the $ADD as the Green Dashed Line on top and the Red line at the Low. The problem I'm having (seen in the attached photo) is that the High and Low is being plotted for the entire time frame that the chart displays. I'm trying to have the High/ Low plots start fresh each day, in other words: still be able to view multiple days at once but have the plots positioned for the High and Low of EACH day.
I really appreciate the help.
Here is my code following the image:
input openingRangeStartTimeEST = 0930;
input openingRangeEndTimeEST = 1600;
input EndTimeEST = 1600;
plot info = open(symbol = "$ADD");
info.SetLineWeight(2);
info.SetPaintingStrategy(PaintingStrategy.LINE);
info.AssignValueColor(if info > info[1] then Color.DARK_GREEN
else if
info < info[1]
then Color.RED
else CreateColor(75, 75, 75));
def ADD = GetSymbol() == "$ADD";
def today = GetDay() != GetDay()[-1];
def percent = Round (info / 2800) * 100;
def high = HighestAll(info);
def low = LowestAll(info);
def openingRange = if SecondsTillTime(openingRangeStartTimeEST) <= 0 and SecondsTillTime(openingRangeEndTimeEST) >= 0 then 1 else 0;
def openingRangeHigh = if SecondsTillTime(openingRangeStartTimeEST) == 0 then high else if openingRange and high > openingRangeHigh[1] then high else openingRangeHigh[1];
def openingRangeLow = if SecondsTillTime(openingRangeStartTimeEST) == 0 then low else if openingRange and low < openingRangeLow[1] then low else openingRangeLow[1];
def StartTimeEST = openingRangeStartTimeEST;
def Range = if SecondsTillTime(StartTimeEST) <= 0 and SecondsTillTime(EndTimeEST) >= 0 then 1 else 0;
plot HighExtension = if Range then openingRangeHigh else Double.NaN;
plot LowExtension = if Range then openingRangeLow else Double.NaN;
HighExtension.SetStyle(Curve.LONG_DASH);
HighExtension.SetLineWeight(1);
HighExtension.AssignValueColor( Color.GREEN);
LowExtension.SetStyle(Curve.LONG_DASH);
LowExtension.SetLineWeight(1);
LowExtension.AssignValueColor( Color.RED);