Psychology Index to see market sentiment

I would like to have the psychology index as an indicator in SQ4 beta9. It actually is very easy to implement, but the "custom indicators" function in beta8 is broken (or i´m not able to use it...). 



The index is counting bullish and bearish candles over a specified period on a given symbol and timeframe. For each bullish candle, it counts +1 and computes the index by the sum of updays diveded by the total period multiplied by 100 (for normalization). So the index is in the range of 0 to 100. 


Here is the code of the indicator:


#Param "LookBack",12 ' Number of lookback periods



If C > C[1] Then

UpDay=1
Else
UpDay=0
End If

PsychIndex = Sum(UpDay,LookBack) / LookBack * 100

SetScales(0,100)
Plot("Psychology Index",PsychIndex,blue)

Return PsychIndex

Attachments
No attachments
  • Votes +1
  • Project StrategyQuant X
  • Type Feature
  • Status Moved
  • Priority Normal
  • Assignee Mark Fric
  • Milestone Archived (To be done later)

History

T
#1

TANGO

16.03.2018 19:43

Task created

MF
#2

Mark Fric

20.03.2018 10:35

Assignee was changed

it is not a problem to create an indicator like this, I'll make an article about it as an examole. However, I'm not sure we'll be able to make it into Beta 9
MF
#3

Mark Fric

17.04.2018 06:32

Milestone changed from Beta 9 to Beta X

m
#4

mikeyc

17.09.2018 20:05
Would be great to see this as an example custom indicator in a tutorial.
m
#5

mikeyc

17.09.2018 20:05
Voted for this task.
MF
#6

Mark Fric

21.09.2018 14:20
Task moved to project SQ Programming, new link to task: https://sq.projectpanel.com/tasks/sqp_0010

Votes: +1

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please