Whatever stock market values are observed, they do not follow a normal distribution.

normal distribution. To convince ourselves of this, we can simply note that :

– there is no fixed arithmetic mean

– values rise for a time, then fall for another, unless they oscillate in a range.

oscillate within a range.

Nevertheless, it is possible to calculate a sliding average and standard deviation over a given period.

Finally, for each price value, we can calculate a deviation from the mean expressed as a number of standard deviations.

of standard deviations. You can then draw a control chart and see how it behaves.

Please find attached a PDF file with a the complete description in French.

code :

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
//------------------------------------------------------------------------------------------------------------- // 3-Sigma Chart // G. GOUSSET // 13 Février 2024 //------------------------------------------------------------------------------------------------------------ // Périodes : mieux vaut les placer en variables externes TLongPer = 180 LongPer = 60 ShortPer = 20 //------------------------------------------------------------------------------- // centrage réduction des données a = (close - Average[TLongPer](close))/STD[TLongPer](close) b = (close - Average[LongPer](close))/STD[LongPer](close) c = (close - Average[ShortPer](close))/STD[ShortPer](close) //------------------------------------------------------------------------------ // lissage r = 4 s = 3 u = 2 ValTLong =average[u](average[s](average[r](a))) ValLong =average[u](average[s](average[r](b))) ValShort =average[u](average[s](average[r](c))) //------------------------------------------------------------------------------ // niveaux intéressants à repérer zero = 0 un = 1 deux = 2 trois = 3 mun = -1 mdeux = -2 mtrois=-3 quatre = 4 mquatre = -4 // ----------------------------------------------------------------------------- // graphes Return ValTLong coloured (132,46,27,300) as "Sig Très Long", ValLong coloured (0,0,255) as "Sig Long", ValShort coloured (255,255,255,250) as "Sig Short", zero coloured (18,13,22) as "ligne zéro",deux coloured (1,49,180) as "2", trois coloured (1,49,180) as "3", mdeux coloured (1,49,180) as "-2", mtrois coloured (1,49,180) as "-3", un coloured (206,206,206) as "1", mun coloured (206,206,206) as "-1",quatre coloured (1,49,180) as "4",mquatre coloured (1,49,180) as "-4" |

### Share this

**Risk disclosure:**

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

**ProRealTime ITF files and other attachments :**

**Filename :**download the ITF files

*How to import ITF files into ProRealTime platform?*

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

Fgats• 63 days ago #https://www.prorealcode.com/topic/indicateur-3-sigma-documentation/

lien pour la documentation en Français (link French description)

link

DELBERT• 58 days ago #Bonjour , merci pour le partage et la traduction , je vais essayer d’assimiler ce nouvelle indicateur qui me semble intéressent pour mon trading court terme . Bonne journée .