Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,19 @@
|
|||
Procedure.d SMA(Number, Period=0)
|
||||
Static P
|
||||
Static NewList L()
|
||||
Protected Sum=0
|
||||
If Period<>0
|
||||
P=Period
|
||||
EndIf
|
||||
LastElement(L())
|
||||
AddElement(L())
|
||||
L()=Number
|
||||
While ListSize(L())>P
|
||||
FirstElement(L())
|
||||
DeleteElement(L(),1)
|
||||
Wend
|
||||
ForEach L()
|
||||
sum+L()
|
||||
Next
|
||||
ProcedureReturn sum/ListSize(L())
|
||||
EndProcedure
|
||||
Loading…
Add table
Add a link
Reference in a new issue