Posted By: danatrader
Indicator coding - 03/16/20 19:32
hi alltogether,
still I am a noob, so excuse...
I try to calculate a simple indicator.
Workshop 4a is already nice, but a bit for a beginner.
May someone assist?
Indicator formula is rather primitive, it is called "Psychology Line".
PSL=UpMovementsinthelastPeriodsn/Periodsn×100
I only got some Sierra Chart code
still I am a noob, so excuse...
I try to calculate a simple indicator.
Workshop 4a is already nice, but a bit for a beginner.
May someone assist?
Indicator formula is rather primitive, it is called "Psychology Line".
PSL=UpMovementsinthelastPeriodsn/Periodsn×100
I only got some Sierra Chart code
Code
float Count = 0; if (sc.GetBarHasClosedStatus(sc.Index) == BHCS_BAR_HAS_CLOSED) { for (int ictr = 1; ictr <= (perioda); ictr++) { if (sc.Close[sc.Index] > sc.Close[sc.Index-ictr]) { Count++; } } PSL[sc.Index] = (Count / (perioda)) *100.0f; } else { PSL[sc.Index] = PSL[sc.Index-1]; }