//Merge alert message with specified-language text public static string AlertMessageText(string msg) { common.myKeyValueItem[] tags = new common.myKeyValueItem[4]; tags[0] = CreateAlertMessageTag("price"); tags[1] = CreateAlertMessageTag("volume"); tags[2] = CreateAlertMessageTag("marketInfo"); tags[3] = CreateAlertMessageTag("ownedQty"); return common.system.MergeText(msg, tags); }
//Merge alert message with specified-language text public static string AlertMessageText(string msg) { common.myKeyValueItem[] tags = new common.myKeyValueItem[4]; tags[0] = CreateAlertMessageTag("price"); tags[1] = CreateAlertMessageTag("volume"); tags[2] = CreateAlertMessageTag("marketInfo"); tags[3] = CreateAlertMessageTag("ownedQty"); return(common.system.MergeText(msg, tags)); }
public static string AlertMessageText(string msg,string convertCRLF_ToString) { if (convertCRLF_ToString!=null) { msg = msg.Replace(common.Consts.constCRLF,convertCRLF_ToString); } common.myKeyValueItem[] tags = new common.myKeyValueItem[4]; tags[0] = CreateAlertMessageTag("price"); tags[1] = CreateAlertMessageTag("volume"); tags[2] = CreateAlertMessageTag("marketInfo"); tags[3] = CreateAlertMessageTag("ownedQty"); return common.system.MergeText(msg, tags); }
public static string AlertMessageText(string msg, string convertCRLF_ToString) { if (convertCRLF_ToString != null) { msg = msg.Replace(common.Consts.constCRLF, convertCRLF_ToString); } common.myKeyValueItem[] tags = new common.myKeyValueItem[4]; tags[0] = CreateAlertMessageTag("price"); tags[1] = CreateAlertMessageTag("volume"); tags[2] = CreateAlertMessageTag("marketInfo"); tags[3] = CreateAlertMessageTag("ownedQty"); return(common.system.MergeText(msg, tags)); }
private void MakeIndicatorData(DateTime frDate, DateTime toDate, StringCollection indicatorCode, StringCollection stockCode) { int priceAdjustDay = 100; DateTime frPriceDate = frDate.AddDays(-priceAdjustDay); progressBar.Visible = true; myDataSet.indicator.Clear(); application.dataLibs.LoadData(myDataSet.indicator, false); common.myKeyValueItem[] indicatorCodeList = new common.myKeyValueItem[0]; for (int idx = 0; idx < myDataSet.indicator.Count; idx++) { if (!indicatorCode.Contains(myDataSet.indicator[idx].code.Trim())) { continue; } Array.Resize(ref indicatorCodeList, indicatorCodeList.Length + 1); indicatorCodeList[indicatorCodeList.Length - 1] = new common.myKeyValueItem(myDataSet.indicator[idx].code.Trim(), myDataSet.indicator[idx].parameter.Trim()); } //this.ShowMessage("Calculating..."); progressBar.Maximum = stockCode.Count; progressBar.Value = 0; myDataSet.indicatorData.Clear(); for (int count = 0; count < stockCode.Count; count++) { if (fCanceled) { break; } myDataSet.indicatorData.Clear(); myDataSet.priceData.Clear(); application.dataLibs.LoadData(myDataSet.priceData, frPriceDate, toDate, stockCode[count]); MakeIndicatorData(indicatorCodeList, myDataSet.priceData, myDataSet.indicatorData); //Update database application.dataLibs.DeleteIndicatorDataByStockCode(frDate, toDate, stockCode[count]); for (int idx = 0; idx < myDataSet.indicatorData.Count; idx++) { if (myDataSet.indicatorData[idx].onDate <frDate || myDataSet.indicatorData[idx].onDate> toDate) { continue; } application.dataLibs.UpdateData(myDataSet.indicatorData[idx]); } progressBar.Value++; Application.DoEvents(); } progressBar.Visible = false; this.ShowMessage(""); return; }
private void MakeIndicatorData(DateTime frDate, DateTime toDate,StringCollection indicatorCode,StringCollection stockCode) { int priceAdjustDay = 100; DateTime frPriceDate = frDate.AddDays(-priceAdjustDay); progressBar.Visible = true; myDataSet.indicator.Clear(); application.dataLibs.LoadData(myDataSet.indicator,false); common.myKeyValueItem[] indicatorCodeList = new common.myKeyValueItem[0]; for (int idx = 0; idx < myDataSet.indicator.Count; idx++) { if(!indicatorCode.Contains(myDataSet.indicator[idx].code.Trim())) continue; Array.Resize(ref indicatorCodeList,indicatorCodeList.Length+1); indicatorCodeList[indicatorCodeList.Length-1]= new common.myKeyValueItem(myDataSet.indicator[idx].code.Trim(),myDataSet.indicator[idx].parameter.Trim()); } //this.ShowMessage("Calculating..."); progressBar.Maximum = stockCode.Count; progressBar.Value = 0; myDataSet.indicatorData.Clear(); for (int count = 0; count < stockCode.Count; count++) { if (fCanceled) break; myDataSet.indicatorData.Clear(); myDataSet.priceData.Clear(); application.dataLibs.LoadData(myDataSet.priceData, frPriceDate, toDate, stockCode[count]); MakeIndicatorData(indicatorCodeList, myDataSet.priceData, myDataSet.indicatorData); //Update database application.dataLibs.DeleteIndicatorDataByStockCode(frDate, toDate, stockCode[count]); for (int idx = 0; idx < myDataSet.indicatorData.Count; idx++) { if (myDataSet.indicatorData[idx].onDate < frDate || myDataSet.indicatorData[idx].onDate > toDate) continue; application.dataLibs.UpdateData(myDataSet.indicatorData[idx]); } progressBar.Value++; Application.DoEvents(); } progressBar.Visible = false; this.ShowMessage(""); return; }
private void MakeIndicatorData(common.myKeyValueItem[] indicatorCode, data.baseDS.priceDataDataTable priceDataTbl, data.baseDS.indicatorDataDataTable toTbl) { common.myKeyValueItem[] smaCodes = new common.myKeyValueItem[0]; common.myKeyValueItem[] macdCodes = new common.myKeyValueItem[0]; for (int idx = 0; idx < indicatorCode.Length; idx++) { if (indicatorCode[idx].Key.StartsWith("SMA")) { Array.Resize(ref smaCodes, smaCodes.Length + 1); smaCodes[smaCodes.Length - 1] = new common.myKeyValueItem(indicatorCode[idx].Key, indicatorCode[idx].Value); continue; } if (indicatorCode[idx].Key.StartsWith("MACD")) { Array.Resize(ref macdCodes, macdCodes.Length + 1); macdCodes[macdCodes.Length - 1] = new common.myKeyValueItem(indicatorCode[idx].Key, indicatorCode[idx].Value); continue; } } }
private void MakeIndicatorData(common.myKeyValueItem[] indicatorCode, data.baseDS.priceDataDataTable priceDataTbl, data.baseDS.indicatorDataDataTable toTbl) { common.myKeyValueItem[] smaCodes = new common.myKeyValueItem[0]; common.myKeyValueItem[] macdCodes = new common.myKeyValueItem[0]; for (int idx = 0; idx < indicatorCode.Length; idx++) { if (indicatorCode[idx].Key.StartsWith("SMA")) { Array.Resize(ref smaCodes, smaCodes.Length + 1); smaCodes[smaCodes.Length - 1] = new common.myKeyValueItem(indicatorCode[idx].Key, indicatorCode[idx].Value); continue; } if (indicatorCode[idx].Key.StartsWith("MACD")) { Array.Resize(ref macdCodes, macdCodes.Length + 1); macdCodes[macdCodes.Length - 1] = new common.myKeyValueItem(indicatorCode[idx].Key, indicatorCode[idx].Value); continue; } } }