Comment on Indicators (Part 2)

BOB_THE_TRADER commented on 16 Apr 2017, 03:50 PM

Hello Zeordha,

Can you please create an indicator for the below logic:

x = LTP

y = number of time periods ago

T1 = +1
if x >= x – (y+1) periods
else -1

T2 = +1
if x >= x – (y+2) period
else -1

T3 = +1
if x >= x – (y+3) period
else -1

T4 = +1
if x >= x – (y+4) period
else -1

T5 = +1
if x >= x – (y+5) period
else -1

T6 = +1
if x >= x – (y+6) periods
else -1

T7 = +1
if x >= x – (y+7) period
else -1

T8 = +1
if x >= x – (y+8) period
else -1

T9 = +1
if x >= x – (y+9) period
else -1

T10 = +1
if x >= x – (y+10) period
else -1
Value = SUM(T1:T10)

so the indicator would always swing between +10 to -10

Request you to please please suggest how to code this indicator in PI….

View the full comment thread »