cygnus_stalker
New member
@XeoNoX I did it!
run52H/L
runDayH/L
Thanks again for all your help. You've been a lifesaver
run52H/L
Code:
#IMPORTANT set the column (set it to YEAR aggregation)
#on a scale of 1 to 100 (lowest yearly price to highest yearly price)
#by XeoNoX via usethinkscript.com, customized by cygnus_stalker
def priceHigh = high;
def pricelow = low;
def YearHigh = Highest(priceHigh, 1) ;
def YearLow = Lowest(priceLow, 1) ;
def range = Yearhigh-Yearlow;
def closing_value = close - Yearlow;
def percent = (closing_value/range)*100;
plot scan = percent;
def var = percent==100;
def barUpCount = CompoundValue(1, if var then barUpCount[1] + 1 else 0, 0);
AddLabel (yes, " " + barUpCount );
runDayH/L
Code:
#IMPORTANT set the column (set it to DAY aggregation)
#on a scale of 1 to 100 (lowest yearly price to highest yearly price)
#by XeoNoX via usethinkscript.com, customized by cygnus_stalker
def priceHigh = high;
def pricelow = low;
def YearHigh = Highest(priceHigh, 1) ;
def YearLow = Lowest(priceLow, 1) ;
def range = Yearhigh-Yearlow;
def closing_value = close - Yearlow;
def percent = (closing_value/range)*100;
plot scan = percent;
def var = percent==100;
def barUpCount = CompoundValue(1, if var then barUpCount[1] + 1 else 0, 0);
AddLabel (yes, " " + barUpCount );
Thanks again for all your help. You've been a lifesaver