예제 #1
0
파일: DWT.cs 프로젝트: ifzz/QuantSys
 public DWT(int n, int detailLevel, AbstractIndicator indicator = null) : base(n)
 {
     priceData = new MovingQueue<double>(n);    
     st = new SignalTransform();
     this.detailLevel = detailLevel;
     this.indicator = indicator;
 }
예제 #2
0
파일: RWI.cs 프로젝트: ifzz/QuantSys
 public RWI(int n) : base(n)
 {
     subIndicators.Add("RWHI", new GenericContainer(n));
     subIndicators.Add("RWLO", new GenericContainer(n));
     TR = new MovingQueue<double>(n);
     priceData = new MovingQueue<Tick>(n);
 }
예제 #3
0
 protected AbstractChannel(int n)
 {
     HighData = new MovingQueue<double>(n);
     MiddleData = new MovingQueue<double>(n);
     LowData = new MovingQueue<double>(n);
     Period = n;
 }
예제 #4
0
 public RSI(int n = 14) : base(n)
 {
     UP      = new MovingQueue <double>(n);
     DOWN    = new MovingQueue <double>(n);
     AVGUP   = double.NaN;
     AVGDOWN = double.NaN;
 }
예제 #5
0
 protected AbstractChannel(int n)
 {
     HighData   = new MovingQueue <double>(n);
     MiddleData = new MovingQueue <double>(n);
     LowData    = new MovingQueue <double>(n);
     Period     = n;
 }
예제 #6
0
파일: RSI.cs 프로젝트: ifzz/QuantSys
 public RSI(int n = 14) : base(n)
 {
     UP = new MovingQueue<double>(n);
     DOWN = new MovingQueue<double>(n);
     AVGUP = double.NaN;
     AVGDOWN = double.NaN;
 }
예제 #7
0
 public KirshenbaumBands(int n = 20, int l = 30, double dev = 1.75)
     : base(n)
 {
     EMA      = new EMA(n);
     LRValues = new MovingQueue <double>(l);
     STDEV    = dev;
 }
예제 #8
0
 public RWI(int n) : base(n)
 {
     subIndicators.Add("RWHI", new GenericContainer(n));
     subIndicators.Add("RWLO", new GenericContainer(n));
     TR        = new MovingQueue <double>(n);
     priceData = new MovingQueue <Tick>(n);
 }
예제 #9
0
 public KirshenbaumBands(int n = 20, int l = 30, double dev = 1.75)
     : base(n)
 {
     EMA = new EMA(n);
     LRValues= new MovingQueue<double>(l);
     STDEV = dev;
 }
예제 #10
0
파일: DWT.cs 프로젝트: yuxi214/QuantSys
 public DWT(int n, int detailLevel, AbstractIndicator indicator = null) : base(n)
 {
     priceData        = new MovingQueue <double>(n);
     st               = new SignalTransform();
     this.detailLevel = detailLevel;
     this.indicator   = indicator;
 }
예제 #11
0
파일: RSquared.cs 프로젝트: ifzz/QuantSys
 public RSquared(int n, AbstractIndicator indicator = null) : base(n)
 {
     X = new MovingQueue<double>(n);
     Y = new DenseVector(n);
     int counter = 0;
     for (double i = (double)-Y.Count / 2 + 0.5; i < (double)Y.Count / 2; i++) Y[counter++] = i;
     this.indicator = indicator;
 }
예제 #12
0
 public PercentileRank(int n, AbstractIndicator indicator = null) : base(n)
 {
     data = new MovingQueue <double>(n);
     if (indicator != null)
     {
         this.indicator = indicator;
     }
 }
예제 #13
0
 public Cointegration()
 {
     n = 3000;
     data1 = new MovingQueue<double>(n);
     data2 = new MovingQueue<double>(n);
     TEMA = new TEMA(50);
     AttachIndicator("Container", new GenericContainer(n));
 }
예제 #14
0
파일: QSPolyMA.cs 프로젝트: ifzz/QuantSys
 public QSPolyMA(int N, AbstractIndicator indicator = null)
     : base(N)
 {
     tickdata = new MovingQueue<double>(N);
     this.indicator = indicator;
     X = new double[N];
     for (int i = 0; i < X.Count(); i++) X[i] = i;
 }
예제 #15
0
 public Cointegration()
 {
     n     = 3000;
     data1 = new MovingQueue <double>(n);
     data2 = new MovingQueue <double>(n);
     TEMA  = new TEMA(50);
     AttachIndicator("Container", new GenericContainer(n));
 }
예제 #16
0
 public QSPolyChannel(int n = 20, int l = 30, double dev = 1.5)
     : base(n)
 {
     EMA = new EMA(n);
     LRValues= new MovingQueue<double>(l);
     X = new double[l];
     for (int i = 0; i < X.Count(); i++) X[i] = i;
     STDEV = dev;
 }
예제 #17
0
 public UltimateOscillator(int p1 = 7, int p2 = 14, int p3 = 28) : base(p3)
 {
     prevTick = null;
     BP1      = new MovingQueue <double>(p1);
     TR1      = new MovingQueue <double>(p1);
     BP2      = new MovingQueue <double>(p2);
     TR2      = new MovingQueue <double>(p2);
     BP3      = new MovingQueue <double>(p3);
     TR3      = new MovingQueue <double>(p3);
 }
예제 #18
0
파일: Covariance.cs 프로젝트: ifzz/QuantSys
        public Covariance()
        {
            n = 1000;
            data1 = new MovingQueue<double>(n);
            data2 = new MovingQueue<double>(n);
            data3 = new MovingQueue<double>(n);

            TEMA = new TEMA(50);
            AttachIndicator("Container", new GenericContainer(n));
        }
예제 #19
0
        public Covariance()
        {
            n     = 1000;
            data1 = new MovingQueue <double>(n);
            data2 = new MovingQueue <double>(n);
            data3 = new MovingQueue <double>(n);

            TEMA = new TEMA(50);
            AttachIndicator("Container", new GenericContainer(n));
        }
예제 #20
0
 public QSPolyMA(int N, AbstractIndicator indicator = null)
     : base(N)
 {
     tickdata       = new MovingQueue <double>(N);
     this.indicator = indicator;
     X = new double[N];
     for (int i = 0; i < X.Count(); i++)
     {
         X[i] = i;
     }
 }
예제 #21
0
        public UltimateOscillator(int p1 = 7, int p2 = 14, int p3 = 28):base(p3)
        {
            prevTick = null;
            BP1 = new MovingQueue<double>(p1);
            TR1 = new MovingQueue<double>(p1);
            BP2 = new MovingQueue<double>(p2);
            TR2 = new MovingQueue<double>(p2);
            BP3 = new MovingQueue<double>(p3);
            TR3 = new MovingQueue<double>(p3);

        }
예제 #22
0
        public RSquared(int n, AbstractIndicator indicator = null) : base(n)
        {
            X = new MovingQueue <double>(n);
            Y = new DenseVector(n);
            int counter = 0;

            for (double i = (double)-Y.Count / 2 + 0.5; i < (double)Y.Count / 2; i++)
            {
                Y[counter++] = i;
            }
            this.indicator = indicator;
        }
예제 #23
0
 public QSVWChannel(int n = 20, int l = 30, double dev = 1.5)
     : base(n)
 {
     EMA      = new EMA(n);
     LRValues = new MovingQueue <double>(l);
     X        = new double[l];
     for (int i = 0; i < X.Count(); i++)
     {
         X[i] = i;
     }
     STDEV = dev;
 }
예제 #24
0
    IEnumerator MovingIcon()
    {
        SquirrelIcon.transform.position = LastButton.transform.position + new Vector3(0, ICON_OFFSET, 0);

        FinishedMoveSquirrelIcon = false;
        MovingQueue mq = SquirrelIcon.GetComponent <MovingQueue>();

        mq.moveTo(NewButton.transform.position + new Vector3(0, ICON_OFFSET, 0), 1.0f);

        yield return(new WaitForSeconds(1.1f));

        FinishedMoveSquirrelIcon = true;
    }
    IEnumerator StartTheGamePhase1()
    {
        allLoadingDone = true;
        yield return(new WaitForSeconds(0.5f));

        // MOVE THE CAM
        MovingQueue mq = Camera.main.GetComponent <MovingQueue>();

        camMoveTime = _bubbleBoard.getMapData().MapSizeY * 0.15f;
        mq.moveTo(new Vector3(Camera.main.transform.position.x, 0, Camera.main.transform.position.z), camMoveTime);

        yield return(new WaitForSeconds(camMoveTime));

        startGamePhase1Ended = true;
        StartCoroutine(StartTheGamePhase2());
    }
    IEnumerator StartTheGamePhase2()
    {
        MovingQueue mq = Camera.main.GetComponent <MovingQueue>();

        mq.StopAllCoroutines();
        float newMoveTime = (camMoveTime - mq.TimeMoved) / 2.5f;

        mq.moveTo(new Vector3(Camera.main.transform.position.x, 0, Camera.main.transform.position.z), newMoveTime);
        yield return(new WaitForSeconds(newMoveTime));

        // READY-GO
        ReadyGoText.animation.Play("ReadyGoAppear");
        AudioHelper.CreatePlayAudioObject(BaseManager.GetInstance().sfxReadyGo);
        // =========
        yield return(new WaitForSeconds(0.5f));

        gameStarted = true;
        CreateBubbleBullet();
    }
예제 #27
0
파일: PFE.cs 프로젝트: yuxi214/QuantSys
 public PFE(int n) : base(n)
 {
     priceData = new MovingQueue <double>(n);
 }
예제 #28
0
 public NeuralNetworkStrategy(int window)
 {
     dataList = new MovingQueue<double>(window);
     AttachIndicator("IND", new AC(60));
 }
예제 #29
0
파일: ATR.cs 프로젝트: ifzz/QuantSys
 public ATR(int n = 14) : base(n)
 {
     TrueRange = new MovingQueue<double>(n);
     counter = 0;
 }
예제 #30
0
 public HistoricalVol(int n) : base(n)
 {
     returnsData = new MovingQueue<double>(n);
     prevTick = double.NaN;
 }
예제 #31
0
파일: PFE.cs 프로젝트: ifzz/QuantSys
 public PFE(int n) : base(n)
 {
     priceData = new MovingQueue<double>(n);
 }
예제 #32
0
 public WilliamsR(int n = 14) : base(n)
 {
     _highData = new MovingQueue <double>(n);
     _lowData  = new MovingQueue <double>(n);
 }
예제 #33
0
 protected AbstractAverage(int n)
 {
     averageData = new MovingQueue<double>(n);
     Period = n;
 }
예제 #34
0
 public KAMA(int n, AbstractIndicator indicator = null) : base(n)
 {
     priceData      = new MovingQueue <double>(n);
     this.indicator = indicator;
 }
예제 #35
0
 public ATR(int n = 14) : base(n)
 {
     TrueRange = new MovingQueue <double>(n);
     counter   = 0;
 }
예제 #36
0
 public HurstIndicator(int n) : base(n)
 {
     priceData = new MovingQueue<double>(n);
 }
예제 #37
0
 public CCI(int n = 20, double constant = 0.015) : base(n)
 {
     SMA           = new SMA(n);
     priceData     = new MovingQueue <double>(n);
     this.constant = constant;
 }
예제 #38
0
파일: SMA.cs 프로젝트: ifzz/QuantSys
 public SMA(int N, AbstractIndicator indicator = null) : base(N)
 {
     tickdata = new MovingQueue<double>(N);
     this.indicator = indicator;
 }
예제 #39
0
 public PercentileRank(int n, AbstractIndicator indicator = null) : base(n)
 {
     data = new MovingQueue<double>(n);
     if(indicator!=null) this.indicator = indicator;
 }
예제 #40
0
파일: MFI.cs 프로젝트: yuxi214/QuantSys
 public MFI(int n = 14) : base(n)
 {
     PositiveMF = new MovingQueue <double>(n);
     NegativeMF = new MovingQueue <double>(n);
 }
예제 #41
0
파일: SMA.cs 프로젝트: yuxi214/QuantSys
 public SMA(int N, AbstractIndicator indicator = null) : base(N)
 {
     tickdata       = new MovingQueue <double>(N);
     this.indicator = indicator;
 }
예제 #42
0
파일: WilliamsR.cs 프로젝트: ifzz/QuantSys
 public WilliamsR(int n = 14):base(n)
 {
     _highData = new MovingQueue<double>(n);
     _lowData = new MovingQueue<double>(n);
 }
예제 #43
0
파일: ZLEMA.cs 프로젝트: valmac/QuantSys
 public ZLEMA(int n, AbstractIndicator indicator = null) : base(n)
 {
     EMA            = new EMA(n);
     this.indicator = indicator;
     priceData      = new MovingQueue <double>((n - 1) / 2);
 }
예제 #44
0
 protected AbstractMultiSymbolIndicator(int n)
 {
     subIndicators = new Dictionary <string, AbstractIndicator>();
     indicatorData = new MovingQueue <double>(n);
     Period        = n;
 }
예제 #45
0
파일: HeikenAshi.cs 프로젝트: ifzz/QuantSys
 public HeikenAshi(int n)
     : base(n)
 {
     HACandle = new MovingQueue<Tick>(n);
     prevTick = null;
 }
예제 #46
0
파일: EMA.cs 프로젝트: ifzz/QuantSys
 public EMA(int N, AbstractIndicator indicator = null) : base(N)
 {
     alpha = 2.0/(N + 1);
     tickdata = new MovingQueue<double>(N);
     this.indicator = indicator;
 }
예제 #47
0
 protected AbstractMultiSymbolIndicator(int n)
 {
     subIndicators = new Dictionary<string, AbstractIndicator>();
     indicatorData = new MovingQueue<double>(n);
     Period = n;
 }
예제 #48
0
 public HurstIndicator(int n) : base(n)
 {
     priceData = new MovingQueue <double>(n);
 }
예제 #49
0
 protected AbstractAverage(int n)
 {
     averageData = new MovingQueue <double>(n);
     Period      = n;
 }
예제 #50
0
파일: ROC.cs 프로젝트: ifzz/QuantSys
 public ROC(int n, AbstractIndicator indicator = null) : base(n)
 {
     tickData = new MovingQueue<double>(n);
     this.indicator = indicator;
 }
예제 #51
0
 public NeuralNetworkStrategy(int window)
 {
     dataList = new MovingQueue <double>(window);
     AttachIndicator("IND", new AC(60));
 }
예제 #52
0
파일: KAMA.cs 프로젝트: ifzz/QuantSys
 public KAMA(int n, AbstractIndicator indicator = null) : base(n)
 {
     priceData = new MovingQueue<double>(n);
     this.indicator = indicator;
 }
예제 #53
0
파일: MFI.cs 프로젝트: ifzz/QuantSys
 public MFI(int n = 14) :base(n)
 {
     PositiveMF = new MovingQueue<double>(n);
     NegativeMF = new MovingQueue<double>(n);
 }
예제 #54
0
파일: ZLEMA.cs 프로젝트: ifzz/QuantSys
 public ZLEMA(int n, AbstractIndicator indicator = null) : base(n)
 {
     EMA = new EMA(n);
     this.indicator = indicator;
     priceData = new MovingQueue<double>((n-1)/2);
 }
    IEnumerator StartVictorySequence()
    {
        // Hide All flying bubble
        if (_flyingBubbles.Count > 0)
        {
            foreach (Bubble b in _flyingBubbles)
            {
                b.gameObject.SetActive(false);
                RemainBubbleShoot++;
            }
        }
        _flyingBubbles.Clear();

        // Hide Bullets
        if (_loadedBubble != null)
        {
            _loadedBubble.gameObject.SetActive(false);
            _loadedBubble = null;
            RemainBubbleShoot++;
        }
        if (_waitingBubble != null)
        {
            _waitingBubble.gameObject.SetActive(false);
            _waitingBubble = null;
            RemainBubbleShoot++;
        }
        if (needUpdateHUD)
        {
            UpdateHUD();
            needUpdateHUD = false;
        }

        yield return(new WaitForSeconds(3f));

        // Shoot remain bubbles Up
        int pointEachBubble = GlobalData.PointReward[RemainBubbleShoot > 14 ? 14 : RemainBubbleShoot, 2];

        while (RemainBubbleShoot > 0)
        {
            Bubble b = (Instantiate(BubblePrefab, WaitingPosition.position, WaitingPosition.rotation) as GameObject).GetComponent("Bubble") as Bubble;
            b.SetBubbleColor(Random.Range(1, 10));

            StartCoroutine(b.shootUp(pointEachBubble));

            RemainBubbleShoot--;
            //UpdateHUD();
            yield return(new WaitForSeconds(0.1f));
        }
        //

        // Play squirrel win animation
        Animator animator = PlayerSquirrel.GetComponent <Animator>();

        animator.Play("Victory");
        AudioHelper.CreatePlayAudioObject(BaseManager.GetInstance().sfxVictory);

        yield return(new WaitForSeconds(2f));

        // Result calculate
        int highScore = Utilities.PlayerPrefs.GetInt("LevelHighScore-" + GlobalData.GetCurrentLevel(), 0);

        if (CurrentScore > highScore)
        {
            highScore = CurrentScore;
        }

        int star = 0;

        if (CurrentScore >= StarTargets[2])
        {
            star = 3;
        }
        else if (CurrentScore >= StarTargets[1])
        {
            star = 2;
        }
        else
        {
            star = 1;
        }

        int highStar = Utilities.PlayerPrefs.GetInt("LevelStar-" + GlobalData.GetCurrentLevel(), 0);

        if (star > highStar)
        {
            highStar = star;
        }

        int nextLevel = GlobalData.GetCurrentLevel() + 1;

        // Update Preference
        Utilities.PlayerPrefs.SetInt("LevelHighScore-" + GlobalData.GetCurrentLevel(), highScore);
        Utilities.PlayerPrefs.SetInt("LevelStar-" + GlobalData.GetCurrentLevel(), highStar);
        // Set icon switch\
        if (nextLevel <= BranchPairSetup.MAXLEVEL)
        {
            Utilities.PlayerPrefs.SetBool("LevelUnlocked-" + (GlobalData.GetCurrentLevel() + 1), true);

            LevelSelectController.NewUnlockedLevel           = GlobalData.GetCurrentLevel() + 1;
            LevelSelectController.needUpdateMoveSquirrelIcon = true;
        }

        Utilities.PlayerPrefs.Flush();



        // Update Text & Star
        txtWinScore.text     = CurrentScore.ToString();
        txtWinHighScore.text = highScore.ToString();

        for (int i = 0; i < star; i++)
        {
            StarDisplay[i].SetActive(true);
        }
        gameSceneController.WinMenu.gameObject.SetActive(true);

        for (int i = 0; i < star; i++)
        {
            MovingQueue moac = StarDisplay[i].GetComponent <MovingQueue>();
            moac.moveToLocal(new Vector3(0, 0, 0), .5f, new Vector3((i - 1) * 300, 0, 0));
            yield return(new WaitForSeconds(.5f));
        }
    }
예제 #56
0
 public HeikenAshi(int n)
     : base(n)
 {
     HACandle = new MovingQueue <Tick>(n);
     prevTick = null;
 }
예제 #57
0
 public HistoricalVol(int n) : base(n)
 {
     returnsData = new MovingQueue <double>(n);
     prevTick    = double.NaN;
 }
예제 #58
0
파일: CCI.cs 프로젝트: ifzz/QuantSys
 public CCI(int n = 20, double constant = 0.015) : base(n)
 {
     SMA = new SMA(n);
     priceData = new MovingQueue<double>(n);
     this.constant = constant;
 }