♥ 0 |
I’m having a hard time trying to get my indicator to show red > 5 % else green, here is my code I hope you can help!
def len = 1; def dayHigh = DailyHighLow(AggregationPeriod.DAY, len, 0, no).DailyHigh; def ADR_highlow = (dayHigh / dayLow + dayHigh[1] / dayLow[1] + dayHigh[2] / dayLow[2] + dayHigh[3] / dayLow[3] + dayHigh[4] / dayLow[4] + dayHigh[5] / dayLow[5] + dayHigh[6] / dayLow[6] + dayHigh[7] / dayLow[7] + dayHigh[8] / dayLow[8] + dayHigh[9] / dayLow[9] + dayHigh[10] / dayLow[10] + dayHigh[11] / dayLow[11] + dayHigh[12] / dayLow[12] + dayHigh[13] / dayLow[13] + dayHigh[14] / dayLow[14] + dayHigh[15] / dayLow[15] + dayHigh[16] / dayLow[16] + dayHigh[17] / dayLow[17] + dayHigh[18] / dayLow[18] + dayHigh[19] / dayLow[19]) / 20; def ADR_perc = (ADR_highlow – 1);
Marked as spam
|
Please log in to post questions.