Tiredoflosing
Member
Hi guys,
I found an Initial Balance indicator that plots the high and low of the initial balance for those who are interested. I'm wondering if someone can help add extensions to the initial Balance?
I'm looking for 50% and 100% extensions on each side of the Initial Balance. Currently, I'm stuck doing it manually, and it's really annoying.
I found an Initial Balance indicator that plots the high and low of the initial balance for those who are interested. I'm wondering if someone can help add extensions to the initial Balance?
I'm looking for 50% and 100% extensions on each side of the Initial Balance. Currently, I'm stuck doing it manually, and it's really annoying.
Code:
input opentime = 0930;
input ORend = 1030;
input opacity = 1;
def na = Double.NaN;
#
# Check if the opening range time is now
#
def ORActive = if GetLastDay() == GetDay() and SecondsFromTime(opentime) >= 0 and SecondsFromTime(ORend) <
0 then 1 else 0;
#
# Track the OR high and low
#
def ORHigh = if ORActive then high else na;
def ORLow = if ORActive then low else na;
#
# Plot the OR high and low
#
plot ORAH = if GetLastDay() != GetDay() or !ORActive then na else HighestAll(ORHigh);
plot ORAL = if GetLastDay() != GetDay() or !ORActive then na else LowestAll(ORLow);
plot ORH = if GetLastDay() != GetDay() or SecondsFromTime(ORend) < 0 then na else HighestAll(ORHigh);
plot ORL = if GetLastDay() != GetDay() or SecondsFromTime(ORend) < 0 then na else LowestAll(ORLow);
#
# Formatting
#
ORAH.SetStyle(Curve.SHORT_DASH);
ORAL.SetStyle(Curve.SHORT_DASH);
ORAH.SetDefaultColor(Color.GREEN);
ORAL.SetDefaultColor(Color.RED);
ORH.SetStyle(Curve.SHORT_DASH);
ORL.SetStyle(Curve.SHORT_DASH);
ORH.SetDefaultColor(Color.GREEN);
ORL.SetDefaultColor(Color.RED);