?? strings.cpp
字號:
// strings.cpp : implementation file
//
// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) 1992-1997 Microsoft Corporation
// All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and related
// electronic documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft Foundation Classes product.
#include "StdAfx.h"
#include "Qianlong.h"
#include "Shenglong.h"
#include "SelfDB.h"
#include "Strings.h"
#ifdef CLKLAN_ENGLISH_US
char CQianlong::m_szDataType[] = "QianLong";
char CShenglong::m_szDataType[] = "Salon";
char CSelfDB::m_szDataType[] = "Ninebulls-Stock";
#else
char CQianlong::m_szDataType[] = "錢龍";
char CShenglong::m_szDataType[] = "勝龍";
char CSelfDB::m_szDataType[] = "策略為王";
#endif
//////////////////////////////////////////////////////////////////////////////////
// 字符串
#ifdef CLKLAN_ENGLISH_US
char sz_stockname_fund[] = "基金";
char sz_stockname_bond[] = "債券";
char sz_stockname_index[] = "指數";
char sz_stockname_bondindex[] = "國債指數";
char sz_stockname_bondindexcorp[] = "企債指數";
#else
char sz_stockname_fund[] = "基金";
char sz_stockname_bond[] = "債券";
char sz_stockname_index[] = "指數";
char sz_stockname_bondindex[] = "國債指數";
char sz_stockname_bondindexcorp[] = "企債指數";
#endif
//////////////////////////////////////////////////////////////////////////////////
// 指標買賣信號字符串
#ifdef CLKLAN_ENGLISH_US
char its_sellintense[] = "Strong Sell";
char its_sell[] = "Sell";
char its_sellfeeble[] = "Faintly Sell";
char its_nothing[] = "Nothing";
char its_buyfeeble[] = "Faintly Buy";
char its_buy[] = "Buy";
char its_buyintense[] = "Strong Buy";
char itsc_nothing[] = "nothing";
char itsc_deviateonbottom[] = "deviate on bottom";
char itsc_deviateontop[] = "deviate on top";
char itsc_goldenfork[] = "golden fork";
char itsc_deadfork[] = "dead fork";
char itsc_long[] = "long";
char itsc_short[] = "short";
char itsc_overbought[] = "overbought";
char itsc_oversold[] = "oversold";
char itsc_support[] = "support";
char itsc_resistance[] = "resistance";
#else
char its_sellintense[] = "強烈賣出";
char its_sell[] = "賣出";
char its_sellfeeble[] = "微弱賣出";
char its_nothing[] = "無";
char its_buyfeeble[] = "微弱買進";
char its_buy[] = "買進";
char its_buyintense[] = "強烈買進";
char itsc_nothing[] = "無";
char itsc_deviateonbottom[] = "底背離";
char itsc_deviateontop[] = "頂背離";
char itsc_goldenfork[] = "金叉";
char itsc_deadfork[] = "死叉";
char itsc_long[] = "多頭強勢";
char itsc_short[] = "空頭強勢";
char itsc_overbought[] = "超買";
char itsc_oversold[] = "超賣";
char itsc_support[] = "支撐";
char itsc_resistance[] = "壓力";
#endif
//////////////////////////////////////////////////////////////////////////////////
// 指標字符串
// 給定技術指標唯一編號,返回技術指標中文名稱
CSPString AfxGetSTTName( UINT nTech )
{
static CSPString stt_names[STT_MAX+1];
SP_ASSERT( STT_MAX >= 0 );
if( stt_names[0].GetLength() <= 0 )
{
// stt_names
stt_names[0] = "STTNames";
#ifdef CLKLAN_ENGLISH_US
// K線屬性類
stt_names[STT_MA] = ("Moving Average");
stt_names[STT_BBI] = ("BBI");
stt_names[STT_BOLL] = ("Boollinger Bands");
stt_names[STT_PV] = ("Price/Volume");
stt_names[STT_SAR] = ("Stop And Reverse");
stt_names[STT_DJ] = ("Superposition");
stt_names[STT_CW] = ("Chips Distribution");
// 趨勢類
stt_names[STT_MACD] = ("Moving Average Convergence/Divergence");
stt_names[STT_MIKE] = ("Mike Base");
stt_names[STT_PSY] = ("Psychological Line");
// 能量類
stt_names[STT_VOLUME] = ("Volume");
stt_names[STT_NVI] = ("Negative Volume Indicator");
stt_names[STT_PVI] = ("Positive Volume Indicator");
stt_names[STT_VR] = ("Volume Ratio");
stt_names[STT_VROC] = ("Volume Rate Indicator");
stt_names[STT_OBV] = ("On Balance Volume");
stt_names[STT_MOBV] = ("Moving On Balance Volume");
stt_names[STT_MFI] = ("Money Flow Indicator");
stt_names[STT_VMACD] = ("Volume Moving Average Convergence/Divergence");
stt_names[STT_WVAD] = ("William's Variable Accumulation Distribution");
stt_names[STT_EMV] = ("Ease of Movement Value");
stt_names[STT_VRSI] = ("Volume Relative Strength Indicator");
stt_names[STT_NVRSI] = ("New Volume Relative Strength Indicator");
stt_names[STT_AD] = ("Accumulation/Distribution");
stt_names[STT_CI] = ("Cumulation Indicator");
// 擺動類
stt_names[STT_KDJ] = ("Stochastics");
stt_names[STT_R] = ("William's Overbought/Oversold Indicator");
stt_names[STT_RSI] = ("Relative Strength Indicator");
stt_names[STT_BIAS] = ("Bias");
stt_names[STT_MTM] = ("Momentum");
stt_names[STT_DMI] = ("Directional Movement Indicator");
stt_names[STT_ROC] = ("Rate Of Change");
stt_names[STT_CCI] = ("Commodity Channel Indicator");
stt_names[STT_CV] = ("Chavkin");
stt_names[STT_ARBR] = ("AR BR");
stt_names[STT_CR] = ("CR");
stt_names[STT_OSC] = ("Oscillator");
stt_names[STT_UOS] = ("Ultimate Oscillator");
stt_names[STT_MAOSC] = ("Moving Average Oscillator");
stt_names[STT_36BIAS] = ("3-6 Bias");
stt_names[STT_DPO] = ("Detrended Price Oscillator");
stt_names[STT_KST] = ("Know Sure Things");
// 其他類
stt_names[STT_REI] = ("Range Expansion Indicator");
stt_names[STT_DMKI] = ("Demaker Indicator");
stt_names[STT_PCNT] = ("Percent");
stt_names[STT_HLC] = ("Highest and Lowest and Close Price");
stt_names[STT_CDP] = ("CDP");
stt_names[STT_ASI] = ("Accumulation Swing Indicator");
stt_names[STT_ATR] = ("Average True Ranger");
// 策略為王指標類
stt_names[STT_CYO] = ("Cycle Oscillator");
stt_names[STT_DCYO] = ("Degaussed Cycle Oscillator");
stt_names[STT_HSL] = ("Relative Change Hands");
stt_names[STT_DPER] = ("Detrended Percent Oscillator");
#else
// K線屬性類
stt_names[STT_MA] = ("移動平均線");
stt_names[STT_BBI] = ("多空指標");
stt_names[STT_BOLL] = ("布林帶");
stt_names[STT_PV] = ("匯證均價線");
stt_names[STT_SAR] = ("停損點轉向指標");
stt_names[STT_DJ] = ("疊加圖");
stt_names[STT_CW] = ("籌碼分布圖");
// 趨勢類
stt_names[STT_MACD] = ("指數平滑異同移動平均線");
stt_names[STT_MIKE] = ("麥克指標");
stt_names[STT_PSY] = ("心理線");
// 能量類
stt_names[STT_VOLUME] = ("成交量");
stt_names[STT_NVI] = ("負成交量指標");
stt_names[STT_PVI] = ("正成交量指標");
stt_names[STT_VR] = ("容量比率");
stt_names[STT_VROC] = ("成交量變動率指標");
stt_names[STT_OBV] = ("能量線");
stt_names[STT_MOBV] = ("主力進出");
stt_names[STT_MFI] = ("資金流動指數");
stt_names[STT_VMACD] = ("量指數平滑異同移動平均線");
stt_names[STT_WVAD] = ("威廉變異離散量");
stt_names[STT_EMV] = ("簡易波動指標");
stt_names[STT_VRSI] = ("量相對強弱指標");
stt_names[STT_NVRSI] = ("新量相對強弱指標");
stt_names[STT_AD] = ("聚/散指標");
stt_names[STT_CI] = ("累積指數");
// 擺動類
stt_names[STT_KDJ] = ("隨機指標");
stt_names[STT_R] = ("威廉指標");
stt_names[STT_RSI] = ("相對強弱指標");
stt_names[STT_BIAS] = ("乖離率");
stt_names[STT_MTM] = ("動量指標");
stt_names[STT_DMI] = ("動向指標");
stt_names[STT_ROC] = ("變動率指標");
stt_names[STT_CCI] = ("順勢通道指標");
stt_names[STT_CV] = ("佳慶指標");
stt_names[STT_ARBR] = ("人氣意愿指標");
stt_names[STT_CR] = ("中間意愿指標");
stt_names[STT_OSC] = ("擺動量");
stt_names[STT_UOS] = ("極擺動指標");
stt_names[STT_MAOSC] = ("移動平均擺動量");
stt_names[STT_36BIAS] = ("3減6日乖離");
stt_names[STT_DPO] = ("去勢價格擺動指數");
stt_names[STT_KST] = ("確然指標");
// 其他類
stt_names[STT_REI] = ("范圍膨脹指數");
stt_names[STT_DMKI] = ("迪馬克爾指標");
stt_names[STT_PCNT] = ("幅度比");
stt_names[STT_HLC] = ("幅度分析");
stt_names[STT_CDP] = ("逆勢操作指標");
stt_names[STT_ASI] = ("累積擺動指標");
stt_names[STT_ATR] = ("均幅指標");
// 策略為王指標類
stt_names[STT_CYO] = ("周期擺動量");
stt_names[STT_DCYO] = ("去噪周期擺動量");
stt_names[STT_HSL] = ("相對換手率");
stt_names[STT_DPER] = ("去勢百分比指標");
#endif
}
if( nTech >= STT_MIN && nTech <= STT_MAX )
{
return stt_names[nTech];
}
if( nTech >= STT_USER_MIN )
{
return CTechUser::GetTechUserName( nTech );
}
return "";
}
// 給定技術指標唯一編號,返回技術指標英文簡稱
CSPString AfxGetSTTShortName( UINT nTech )
{
static CSPString stt_shortnames[STT_MAX+1];
SP_ASSERT( STT_MAX >= 0 );
if( stt_shortnames[0].GetLength() <= 0 )
{
// stt_shortnames
stt_shortnames[0] = "STTShortNames";
// K線屬性類
stt_shortnames[STT_MA] = ("MA");
stt_shortnames[STT_BBI] = ("BBI");
stt_shortnames[STT_BOLL] = ("BOLL");
stt_shortnames[STT_PV] = ("P/V");
stt_shortnames[STT_SAR] = ("SAR");
stt_shortnames[STT_DJ] = ("DJ");
stt_shortnames[STT_CW] = ("CW");
// 趨勢類
stt_shortnames[STT_MACD] = ("MACD");
stt_shortnames[STT_MIKE] = ("MIKE");
stt_shortnames[STT_PSY] = ("PSY");
// 能量類
stt_shortnames[STT_VOLUME] = ("VOLUME");
stt_shortnames[STT_NVI] = ("NVI");
stt_shortnames[STT_PVI] = ("PVI");
stt_shortnames[STT_VR] = ("VR");
stt_shortnames[STT_VROC] = ("VROC");
stt_shortnames[STT_OBV] = ("OBV");
stt_shortnames[STT_MOBV] = ("MOBV");
stt_shortnames[STT_MFI] = ("MFI");
stt_shortnames[STT_VMACD] = ("VMACD");
stt_shortnames[STT_WVAD] = ("WVAD");
stt_shortnames[STT_EMV] = ("EMV");
stt_shortnames[STT_VRSI] = ("VRSI");
stt_shortnames[STT_NVRSI] = ("NVRSI");
stt_shortnames[STT_AD] = ("A/D");
stt_shortnames[STT_CI] = ("CI");
// 擺動類
stt_shortnames[STT_KDJ] = ("KDJ");
stt_shortnames[STT_R] = ("R");
stt_shortnames[STT_RSI] = ("RSI");
stt_shortnames[STT_BIAS] = ("BIAS");
stt_shortnames[STT_MTM] = ("MTM");
stt_shortnames[STT_DMI] = ("DMI");
stt_shortnames[STT_ROC] = ("ROC");
stt_shortnames[STT_CCI] = ("CCI");
stt_shortnames[STT_CV] = ("CV");
stt_shortnames[STT_ARBR] = ("ARBR");
stt_shortnames[STT_CR] = ("CR");
stt_shortnames[STT_OSC] = ("OSC");
stt_shortnames[STT_UOS] = ("UOS");
stt_shortnames[STT_MAOSC] = ("MAOSC");
stt_shortnames[STT_36BIAS] = ("3-6BIAS");
stt_shortnames[STT_DPO] = ("DPO");
stt_shortnames[STT_KST] = ("KST");
// 其他類
stt_shortnames[STT_REI] = ("REI");
stt_shortnames[STT_DMKI] = ("DMKI");
stt_shortnames[STT_PCNT] = ("PCNT");
stt_shortnames[STT_HLC] = ("HLC");
stt_shortnames[STT_CDP] = ("CDP");
stt_shortnames[STT_ASI] = ("ASI");
stt_shortnames[STT_ATR] = ("ATR");
// 策略為王指標類
stt_shortnames[STT_CYO] = ("CYO");
stt_shortnames[STT_DCYO] = ("DCYO");
stt_shortnames[STT_HSL] = ("HSL");
stt_shortnames[STT_DPER] = ("DPER");
}
if( nTech >= STT_MIN && nTech <= STT_MAX )
{
return stt_shortnames[nTech];
}
if( nTech >= STT_USER_MIN )
{
return CTechUser::GetTechUserShortName( nTech );
}
return "";
}
// 給定技術指標唯一編號,返回技術指標中文名稱+英文簡稱
CSPString AfxGetSTTFullName( UINT nTech )
{
return AfxGetSTTName( nTech ) + "(" + AfxGetSTTShortName( nTech ) + ")";
}
// 給定技術指標唯一編號,返回技術指標類別名稱
CSPString AfxGetSTTClassName( UINT nTech )
{
static CSPString stt_classnames[STT_CLASS_MAX+1];
SP_ASSERT( STT_MAX >= 0 );
if( stt_classnames[0].GetLength() <= 0 )
{
// stt_classnames
stt_classnames[0] = "STTClassNames";
#ifdef CLKLAN_ENGLISH_US
stt_classnames[STT_CLASS_KLINE] = "K Line Attribute";
stt_classnames[STT_CLASS_TREND] = "Trend";
stt_classnames[STT_CLASS_ENERGY] = "Energy";
stt_classnames[STT_CLASS_SWING] = "Swing";
stt_classnames[STT_CLASS_OTHER] = "Others";
stt_classnames[STT_CLASS_CLK] = "Ninebulls-Stock";
stt_classnames[STT_CLASS_USER] = "User Define";
#else
stt_classnames[STT_CLASS_KLINE] = "K線屬性類";
stt_classnames[STT_CLASS_TREND] = "趨勢類";
stt_classnames[STT_CLASS_ENERGY] = "能量類";
stt_classnames[STT_CLASS_SWING] = "擺動類";
stt_classnames[STT_CLASS_OTHER] = "其它類";
stt_classnames[STT_CLASS_CLK] = "策略為王指標類";
stt_classnames[STT_CLASS_USER] = "外掛指標類";
#endif
}
if( nTech >= STT_KLINE_MIN && nTech <= STT_KLINE_MAX )
return stt_classnames[STT_CLASS_KLINE];
else if( nTech >= STT_TREND_MIN && nTech <= STT_TREND_MAX )
return stt_classnames[STT_CLASS_TREND];
else if( nTech >= STT_ENERGY_MIN && nTech <= STT_ENERGY_MAX )
return stt_classnames[STT_CLASS_ENERGY];
else if( nTech >= STT_SWING_MIN && nTech <= STT_SWING_MAX )
return stt_classnames[STT_CLASS_SWING];
else if( nTech >= STT_OTHER_MIN && nTech <= STT_OTHER_MAX )
return stt_classnames[STT_CLASS_OTHER];
else if( nTech >= STT_CLK_MIN && nTech <= STT_CLK_MAX )
return stt_classnames[STT_CLASS_CLK];
else if( nTech >= STT_USER_MIN )
return stt_classnames[STT_CLASS_USER];
return "";
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -