private void AlgoSell(List <DailyDataPoint> listOfData, int i, AlgoPicker _algoPicker)
 {
     if (_algoPicker.PickAlgoSell() && _tradeManager.UnFinishedTrade())
     {
         _tradeManager.GetTradeList[_tradeManager.GetTradeList.Count - 1].Sell     = listOfData[i].Close;
         _tradeManager.GetTradeList[_tradeManager.GetTradeList.Count - 1].SellDate = TimeTranslation2(listOfData[i].Date);
     }
 }
Пример #2
0
 private void SellSignal(int index)
 {
     if (_algoPicker.PickAlgoSell())
     {
         if (_tradeManager.UnFinishedTrade())
         {
             AddFinishedTrade(index);
             ExitValuesToPlot(index);
         }
     }
 }
Пример #3
0
        private bool SellAfterDays(int exitdays, int nbrDays)
        {
            if (_tradeManager.UnFinishedTrade())
            {
                nbrDays++;
                _nbrDays += nbrDays;
            }

            if (_nbrDays == exitdays)
            {
                _nbrDays = 0;
                return(true);
            }
            else
            {
                return(false);
            }
        }