//Schaff indicator Formula
// presented in the site www.enricomalverti.com, also with trading rules
Emas = average[b](close)
Emal = average[l](close)
Macds =Emas-Emal
// from Wikipedia %K = 100* ((Price-L5)/(h5-l5)) where h = high of 5 period, l = low
perck = 100 * (macds – lowest[k](macds))/(highest[k](macds)-lowest[k](macds))
// from Wikipedia, %D is the 3-day moving average of %K (the last 3 values of %K).
percd=average[d](perck)
// PF is %K del %D
PF = 100 * (macds – lowest[k](percd))/(highest[k](percd)-lowest[k](percd))
// %D del PF (PFF)
PFF = average[d](pf)
return pff
/// b, breve periodo – short period, default = 23
// l, long period – default = 50
//k is the period of %k , default = 10
// d for %d is by default = 3
COMMENT : few indications and not always so precise (with many errors) => rejected