예제 #1
0
        public bool downloadBBands(string folderPath, string scriptName, bool bIsTestOn, bool bSaveData)
        {
            string interval = ddlBBands_Interval.SelectedValue;
            string period   = textboxBBands_Period.Text;
            string series   = ddlBBands_Series.SelectedValue;
            string nbdevUp  = textboxBBands_NbdevUp.Text;
            string nbdevDn  = textboxBBands_NbdevDn.Text;

            if (StockApi.getBbandsAlternate(folderPath, scriptName, day_interval: interval, period: period, seriestype: series,
                                            nbdevup: nbdevUp, nbdevdn: nbdevDn,
                                            bIsTestModeOn: bIsTestOn, bSaveData: bSaveData, apiKey: Session["ApiKey"].ToString()) == null)
            {
                textboxMessage.Text = Environment.NewLine + "Bollinger Bands data not available for selected script.";
                return(false);
            }
            //if (StockApi.getBbands(folderPath, scriptName, day_interval: interval, period: period, seriestype: series,
            //                        nbdevup: nbdevUp, nbdevdn: nbdevDn,
            //                        bIsTestModeOn: bIsTestOn, bSaveData: bSaveData, apiKey: Session["ApiKey"].ToString()) == null)
            //{
            //    textboxMessage.Text = Environment.NewLine + "Bollinger Bands data not available for selected script.";
            //    return false;
            //}
            return(true);
        }