Hi Pete,
I am looking for to add the user defined OHLC into this code? Can you please help?
Thank you.
input aggregationPeriod = AggregationPeriod.DAY;
def highValue = high(period = aggregationPeriod)[1];
def lowValue = low(period = aggregationPeriod)[1];
def closeValue = close(period = aggregationPeriod)[1];
def range = highValue – lowValue;
plot ProfitTarget2R5 = (highValue / lowValue) * closeValue;
plot LBreakOrRBreakoutR4 = closeValue + range * (1.1) / 2;
plot GoShortR3 = closeValue + range * (1.1) / 4;
plot R2 = closeValue + range * (1.1) / 6;
plot R1 = closeValue + range * (1.1) / 12;
plot HH = highValue;
plot PP = (HIGHValue+ LOWValue + CLOSEValue)/3;
plot LL = LOWValue;
plot S1 = closeValue – range * (1.1) / 12;
plot S2 = closeValue – range * (1.1) / 6;
plot GoLongS3 = closeValue – range * (1.1) / 4;
plot SupportBreakoutS4 = closeValue – range * (1.1) / 2;
plot ProfitTarget2S5 = (closeValue – (ProfitTarget2R5 – closeValue));
Like this:
Like Loading...