Saturday, July 7, 2012
Sentiment Zone Oscillator - Pro Real Time Formula
// by Walid Khalil, Stocks & Commodities, June 2012
// variable: r = range, for default, r = 14
// in Pro Real Time you cannot use other ways like" if" or "for" operators.. just this trick
for i = 0 to r
sup = summation[r](close[i]>close[1+i])
sdown = summation[r](close[i]<=close[i+1])
total =sup -sdown
next
//another way is not possible (with instructions if or while or others in Pro Real Time..)
// SP = Sentiment Position
SP = TEMA[r](total)
SZO = SP / r *100
// n = moving average period (simple moving average)
MovAvSZO = ExponentialAverage[n](SZO)
RETURN total as "tot", SZO coloured (255,70,255) as "SZO", MovAvSZO coloured (0, 175,175) as "MovAvSZO"
==> We hoped in a better result. You have to use "escamotage" in Pro Real Time for calculating the differeneces of day.
Even using "adaptive" periods, there are false signal remaining in 25-33% cases in the total.
Enter signals (for long and short positions) are often a bit late (not early, in the spirit of the indicator!!) for good gains.
We tried also to use a sort of simple, primitive version (i.e. the difference of bar ups minus bar downs), but this is not sufficient for giving stable signals when reaching limit zones of -7 and + 7.
Not added to the desk, but a good attempt.
(see below the image of differences - in black- moving average in blue for signal a 0 line and SZO in pink).
Any source
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment