Избранное трейдера Tulyak
> list.files(«E:/syst/lib»)
[1] "_algo_ algotrading.pdf"
[2] "_algo_ IntroductionToAlgorithmicTradingStrategies.pdf"
[3] "_algo_ stan.pdf"
[4] "_bayes_ applied bayesian modelling.pdf"
[5] "_bayes_ bajesovskie seti… logiko-veroyatnostnyj podxod.djvu"
[6] "_bayes_ bayesian statistical modelling.pdf"
[7] "_bayes_ BayesNets.pdf"
[8] "_bayes_ байесовские методы маш обуч.pdf"
[9] "_bayes_ введение в методы байесовского статистического вывода.djvu"
[10] "_caus_ Application of adaptive nonlinear Granger causality.pdf"
[11] "_caus_ Causalities of the Taiwan Stock Market.pdf"
[12] "_caus_ granger causality — theory and applicts.pdf"
[13] "_caus_ grangercausality.pdf"
[14] "_caus_ sugihara-causality-science.pdf"
[15] "_caus_ Причинный анализ в статистических исследованиях.djvu"
[16] "_change_ adaptive filtering and change detection.djvu"
[17] "_change_ detection of abrupt changes.pdf"
[18] "_change_ Efficient Multivariate Analysis of Change Points.pdf"
[19] "_change_ nikiforov_i_v_posledovatelnoe_obnaruzhenie_izmeneniya_svoist.djvu"
[20] "_change_ zhiglyavskii_a_a_kraskovskii_a_e_obnaruzhenie_razladki_sluch.djvu"
[21] "_change_ адаптивный метод обнаружения нарушений закономерностей по наблюдениям.pdf"
[22] "_change_ Момент разладки Чернова.pdf"
[23] "_change_ обнаружение изменения свойств сигналов и динамических систем.djvu"
[24] "_change_ обнаружение моментов разладки случайной последовательности.pdf"
[25] "_change_ обнаружение нарушений закономерностей по наблюдениям при наличии помех.pdf"
Settings = { Name = "xBollinger_LinReg", period = 40, deviation=2, line= { { Name = "xBollinger_LinReg", Color = RGB(0, 0, 255), Type = TYPE_LINE, Width = 2 }, { Name = "xBollinger_LinReg", Color = RGB(192, 0, 0), Type = TYPE_LINE, Width = 2 }, { Name = "xBollinger_LinReg", Color = RGB(0, 128, 0), Type = TYPE_LINE, Width = 6 } } } function c_FF() local AMA={} local CC={} return function(ind, _p,_ddd) local period = _p local index = ind local vol = 0 local sigma = 0 local sigma2 = 0 local aav = 0 local bb = 0 local ZZZ = 0 if index == 1 then AMA={} CC={} CC[index]=(C(index)+H(index)+L(index))/3 AMA[index]=(C(index)+O(index))/2 return nil end ------------------------------ AMA[index]=AMA[index-1] CC[index]=(C(index)+H(index)+L(index))/3 if index < (_p) then return nil end period =_p if index < period then period = index end --------------- sigma=0 sigma2=0 aav=0 ZZZ=0 for i = 0, period-1 do ZZZ=CC[index+i-period+1] aav=aav+ZZZ sigma=sigma+ZZZ*(-(period-1)/2+i) sigma2=sigma2+(-(period-1)/2+i)^2 end bb=sigma/sigma2 aav=aav/period AMA[index]=aav+bb*((period-1)/2) sigma=0 sigma2=0 sigma3 = 0 for i = 0, period-1 do ZZZ=CC[index+i-period+1] sigma2=aav+bb*(-(period-1)/2+i) sigma=sigma+(ZZZ-sigma2)^2 end sigma=(sigma/period)^(1/2) return AMA[index]-sigma*_ddd,AMA[index]+sigma*_ddd, AMA[index] end end function Init() myFF = c_FF() return 3 end function OnCalculate(index) return myFF(index, Settings.period,Settings.deviation) end