コード例 #1
0
 public IndROC(TemporalContextManager manager, string token)
 {
     _manager   = manager;
     _token     = token;
     _period    = 1;
     _out_token = Tokens()[0];
 }
コード例 #2
0
ファイル: IndAO.cs プロジェクト: ensh/AlfaFlow
 public IndAO(TemporalContextManager manager, string token)
 {
     _manager   = manager;
     _token     = token;
     _ns        = _nf = 1;
     _out_token = Tokens()[0];
 }
コード例 #3
0
 public IndStoch(TemporalContextManager manager, string token)
 {
     _manager    = manager;
     _token      = token;
     _nd         = _nk = _ns = 1;
     _out_tokens = Tokens();
 }
コード例 #4
0
            public IndLine(TemporalContextManager manager, string token, int fastPeriod, int slowPeriod, int index)
            {
                m_manager       = manager;
                m_unsubscribers = new IDisposable[2];

                m_indFastEMA = new IndEMA(m_manager, token);
                m_indFastEMA.SetParameters(new IndParameter("Period", fastPeriod));

                m_indSlowEMA = new IndEMA(m_manager, token);
                m_indSlowEMA.SetParameters(new IndParameter("Period", slowPeriod));

                m_token = TemporalContextManager.GetTokenName();

                m_indFastEMA.SetParameters(
                    new IndParameter("Start", true),
                    new IndParameter("Priority", TemporalContextManager.InternalIndicatorPriority + 6),
                    new IndParameter((index == -1) ? "nIndex" : "Index", index));
                m_indSlowEMA.SetParameters(
                    new IndParameter("Start", true),
                    new IndParameter("Priority", TemporalContextManager.InternalIndicatorPriority + 7),
                    new IndParameter((index == -1) ? "nIndex" : "Index", index));

                m_unsubscribers[0] = m_manager.AddTemporalQueueObserver <double>(this, m_indFastEMA.Token, "FastEMA", TemporalContextManager.InternalIndicatorPriority + 4);
                m_unsubscribers[1] = m_manager.AddTemporalQueueObserver <double>(this, m_indSlowEMA.Token, "SlowEMA", TemporalContextManager.InternalIndicatorPriority + 5);
            }
コード例 #5
0
 public IndPSAR(TemporalContextManager manager, string token)
 {
     _manager   = manager;
     _token     = token;
     _step      = _maxstep = 1;
     _out_token = Tokens()[0];
 }
コード例 #6
0
 public IndSMA(TemporalContextManager manager, string token)
 {
     m_period   = 1;
     m_token    = token;
     m_manager  = manager;
     m_window   = new SortedSet <TemporalValue <double> >(new TemporalValueComparer <double>());
     m_restoken = TemporalContextManager.GetTokenName();
 }
コード例 #7
0
 public IndEnvelop(TemporalContextManager manager, string token)
 {
     _n         = 30;
     _k         = 1.5;
     m_token    = token;
     m_manager  = manager;
     m_restoken = TemporalContextManager.GetTokenName();
 }
コード例 #8
0
 public IndMACD(TemporalContextManager manager, string token, int index = 0)
 {
     m_token    = token;
     m_manager  = manager;
     m_ns       = m_nf = m_nsg = 1;
     m_restoken = TemporalContextManager.GetTokenName();
     m_index    = index;
 }
コード例 #9
0
ファイル: IndSlice.cs プロジェクト: ensh/AlfaFlow
 public IndSlice(TemporalContextManager manager, string token)
 {
     m_manager   = manager;
     m_token     = token;
     m_values    = new TemporalValue[0];
     m_columns   = new IndParameter[0];
     m_outTokens = new string[0];
 }
コード例 #10
0
 public IndTemporalAggregator(TemporalContextManager manager, string token)
 {
     m_period   = 1;
     m_token    = token;
     m_start    = m_end = 0;
     m_manager  = manager;
     m_restoken = TemporalContextManager.GetTokenName();
 }
コード例 #11
0
 public IndBollinger(TemporalContextManager manager, string token)
 {
     _manager    = manager;
     _token      = token;
     _n          = 1;
     _k          = 1.0;
     _out_tokens = Tokens();
 }
コード例 #12
0
 public IndMomentum(TemporalContextManager manager, string token, int index = 0)
 {
     m_manager = manager;
     m_token   = token;
     m_window  = new SortedSet <TemporalValue>(new TemporalValueComparer());
     m_period  = 1;
     m_tokens  = TemporalContextManager.GetTokenName();
     m_index   = index;
 }
コード例 #13
0
ファイル: CandleAggregator.cs プロジェクト: ensh/AlfaFlow
 public CandleAggregator(TemporalContextManager manager, string token_in, string token_out, long timeframe)
 {
     m_manager   = manager;
     m_token_in  = token_in;
     m_token_out = token_out;
     m_timeframe = timeframe;
     m_nexttime  = 0;
     m_values    = new double[TemporalContextManager.CandleArraySize];
 }
コード例 #14
0
ファイル: IndMFI.cs プロジェクト: ensh/AlfaFlow
 //TemporalSync _sync_values;
 public IndMFI(TemporalContextManager manager, string[] tokens)
 {
     _manager         = manager;
     _tokens          = tokens;
     _tp              = _psum = _nsum = 0;
     _pos_flow_window = new double[1];
     _neg_flow_window = new double[1];
     _out_token       = Tokens()[0];
 }
コード例 #15
0
ファイル: IndEMA.cs プロジェクト: ensh/AlfaFlow
 public IndEMA(TemporalContextManager manager, string token)
 {
     m_period   = 1;
     m_token    = token;
     m_manager  = manager;
     m_KC       = (double)2 / (m_period + 1);
     m_KE       = 1 - m_KC;
     m_restoken = TemporalContextManager.GetTokenName();
     m_next     = false;
 }
コード例 #16
0
ファイル: IndWMA.cs プロジェクト: ensh/AlfaFlow
 public IndWMA(TemporalContextManager manager, string token)
 {
     m_wma       = 0;
     m_period    = 1;
     m_token     = token;
     m_manager   = manager;
     m_sumWeight = 0; for (int i = 1; i <= m_period; i++)
     {
         m_sumWeight += i;
     }
     m_window   = new SortedSet <TemporalValue <double> >(new TemporalValueComparer <double>());
     m_restoken = TemporalContextManager.GetTokenName();
 }
コード例 #17
0
            public IndSignal(TemporalContextManager manager, string token, int signalPeriod)
            {
                m_manager       = manager;
                m_unsubscribers = new IDisposable[2];

                m_token = TemporalContextManager.GetTokenName();

                m_indSignalEMA = new IndEMA(m_manager, token);
                m_indSignalEMA.SetParameters(new IndParameter("Period", signalPeriod));

                m_unsubscribers[0] = m_manager.AddTemporalQueueObserver <double>(this, m_indSignalEMA.Token, "SignalEMA",
                                                                                 TemporalContextManager.InternalIndicatorPriority + 3);
                m_unsubscribers[1] = m_manager.AddTemporalQueueObserver <double>(this, token, "Line",
                                                                                 TemporalContextManager.InternalIndicatorPriority + 2);

                m_manager.AddTemporalQueue <double[]>(m_token, "Line&Signal");

                m_indSignalEMA.SetParameters(
                    new IndParameter("Start", true),
                    new IndParameter("Priority", TemporalContextManager.InternalIndicatorPriority + 1));
            }
コード例 #18
0
 public TemporalContextHelper(TemporalContext <T> context, TemporalContextManager manager)
 {
     m_context = context;
     m_manager = manager;
     m_manager.AddTemporalValue("Contexts", new TemporalValue <object>(DateTime.Now.Ticks, m_context));
 }
コード例 #19
0
 public TemporalLinkedContextHelper(TemporalLinkedContext context, TemporalContextManager manager, int index)
 {
     m_index = index; m_context = context; m_manager = manager;
     m_manager.AddTemporalValue("Contexts", new TemporalValue <object>(DateTime.Now.Ticks, m_context));
 }
コード例 #20
0
 public IndOhlcAggregator(TemporalContextManager manager, string token)
 {
     m_token    = token;
     m_restoken = TemporalContextManager.GetTokenName();
     m_manager  = manager;
 }