Skip to main content

Psychological Index for Metastock

chsmcp about 16 years ago Metastock

  • Rating:
    4 / 5 (Votes 3)
  • Tags:
    oscillator, metastock

{Futures Magazine, Vol.29 No.6, June 2000, P.48}

Overbought/oversold indicator described in the June 2000 Futures Magazine called the Psychological Index.

Indicator / Formula

Copy & Paste Friendly
{Futures Magazine, Vol.29 No.6, June 2000, P.48}
LookBack:= Input("Number of lookback periods", 2, 100, 12);
UThreshold:= Input("Upper threshold (%)", 0, 100, 75);
LThreshold:= Input("Lower threshold (%)", 0, 100, 25);
UpDay:= If(CLOSE > Ref(CLOSE,-1), 1, 0);
PsychIndex:= Sum(UpDay,LookBack) / LookBack * 100;
PsychIndex;
UThreshold;
LThreshold

3 comments

about 9 years ago

Anyone please help me what is the formula for this index. I want to code it in Amibroker.

If you have already coded it in Amibroker, please help to share.

Br,

over 7 years ago
//{Futures Magazine, Vol.29 No.6, June 2000, P.48}

function StochTransform(array, period) 
{
   return 100*(array-LLV(array,period))/(HHV(array,period)-LLV(array,period));
}

LookBack= Param("Number of lookback periods", 2, 1, 100);
UThreshold= Param("Upper threshold (%)", 0, 75, 100);
LThreshold= Param("Lower threshold (%)", 0, 25, 100);
UpDay= IIf((H==L),0, IIf(C > Ref(C,-1),1,0));
PsychIndex= Sum(UpDay,LookBack) / LookBack;

Per = ParamOptimize("Periods", 1, 1, 252, 1 );
system = StochTransform(PsychIndex,Per)
Plot(system ,"Psychological Index",colorRed,styleline,Null,Null,0,0,2);
3. dominhy
almost 5 years ago

Error:

Per = ParamOptimize("Periods", 1, 1, 252, 1 );
system = StochTransform(PsychIndex,Per)

==>

Per = Optimize("Periods", 12,1,252,1);
system = StochTransform(PsychIndex,Per);

Leave Comment

Please login here to leave a comment.