00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00023 #pragma once
00024
00025 #include "RobotHelperInterfaces.h"
00026
00027 namespace corelib
00028 {
00029 struct security_identifier_t;
00030 }
00031
00032
00033 namespace RT
00034 {
00035
00036 enum MAType
00037 {
00038 SIMPLE = 1,
00039 EXPONENTIAL = 2,
00040 TIME_SERIES = 3,
00041 VARIABLE = 4,
00042 TRIANGULAR = 5,
00043 WEIGHTED = 6,
00044 VOLATILITY = 7
00045 };
00046
00055 class ITechnicalAnalysisHelper
00056 {
00057 public:
00058 virtual void setMarketDataHelper(IMarketDataHelper*) = 0;
00059
00071 virtual int SimpleMovingAverage(const std::string& symbol,
00072 TAHistDataType type,
00073 int optInTimePeriod,
00074 double& outValue,
00075 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00076
00078 virtual int ExponentialMovingAverage(const std::string& symbol,
00079 TAHistDataType type,
00080 int optInTimePeriod,
00081 double& outValue,
00082 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00083
00085 virtual int TriangularMovingAverage(
00086 const std::string& symbol,
00087 TAHistDataType type,
00088 int optInTimePeriod,
00089 double& outValue,
00090 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00091
00093 virtual int WeightedMovingAverage(
00094 const std::string& symbol,
00095 TAHistDataType type,
00096 int optInTimePeriod,
00097 double& outValue,
00098 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00099
00100
00101
00103 virtual int RSquared(
00104 const std::string& symbol,
00105 TAHistDataType type,
00106 int optInTimePeriod,
00107 double& outValue,
00108 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00109
00111 virtual int Slope(
00112 const std::string& symbol,
00113 TAHistDataType type,
00114 int optInTimePeriod,
00115 double& outValue,
00116 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00117
00119 virtual int Forecast(
00120 const std::string& symbol,
00121 TAHistDataType type,
00122 int optInTimePeriod,
00123 double& outValue,
00124 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00125
00127 virtual int Intercept(
00128 const std::string& symbol,
00129 TAHistDataType type,
00130 int optInTimePeriod,
00131 double& outValue,
00132 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00133
00134
00135
00136
00138 virtual int BollingerBands(
00139 const std::string& symbol,
00140 TAHistDataType type,
00141 int optInTimePeriod,
00142 double optInNbDevUp,
00143 double optInNbDevDn,
00144 MAType optInMAType,
00145 double& outRealUpperBand,
00146 double& outRealMiddleBand,
00147 double& outRealLowerBand,
00148 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00149
00150
00151
00152
00153
00155 virtual int MomentumOscillator(
00156 const std::string& symbol,
00157 TAHistDataType type,
00158 int optInTimePeriod,
00159 double& outValue,
00160 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00161
00163 virtual int ChandeMomentumOscillator(
00164 const std::string& symbol,
00165 TAHistDataType type,
00166 int optInTimePeriod,
00167 MAType optInMAType,
00168 double& outValue,
00169 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00170
00172 virtual int PriceOscillator(
00173 const std::string& symbol,
00174 TAHistDataType type,
00175 int optInFastPeriod,
00176 int optInSlowPeriod,
00177 MAType optInMAType,
00178 double& outValue,
00179 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00180
00182 virtual int AbsolutePriceOscillator(
00183 const std::string& symbol,
00184 TAHistDataType type,
00185 int optInFastPeriod,
00186 int optInSlowPeriod,
00187 MAType optInMAType,
00188 double& outValue,
00189 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00190
00192 virtual int TRIX(
00193 const std::string& symbol,
00194 TAHistDataType type,
00195 int optInTimePeriod,
00196 double& outValue,
00197 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00198
00200 virtual int WilliamsPctR(
00201 const std::string& symbol,
00202 int optInTimePeriod,
00203 double& outValue,
00204 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00205
00207 virtual int ChaikinADOscillator(
00208 const std::string& symbol,
00209 int optInFastPeriod,
00210 int optInSlowPeriod,
00211 double& outValue,
00212 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00213
00214
00215
00217 virtual int Aroon(
00218 const std::string& symbol,
00219 int optInTimePeriod,
00220 double& outAroonDown,
00221 double& outAroonUp,
00222 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00223
00225 virtual int MACD(
00226 const std::string& symbol,
00227 TAHistDataType type,
00228 int optInFastPeriod,
00229 int optInSlowPeriod,
00230 int optInSignalPeriod,
00231 double& outMACD,
00232 double& outMACDSignal,
00233 double& outMACDHist,
00234 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00235
00237 virtual int STOCH(
00238 const std::string& symbol,
00239 int optInFastK_Period,
00240 int optInSlowK_Period,
00241 MAType optInSlowK_MAType,
00242 int optInSlowD_Period,
00243 MAType optInSlowD_MAType,
00244 double& outSlowK,
00245 double& outSlowD,
00246 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00247
00248
00249
00251 virtual int StandardDeviation(
00252 const std::string& symbol,
00253 TAHistDataType type,
00254 int optInTimePeriod,
00255 double optInNbDev,
00256 double& outValue,
00257 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00258
00259
00261 virtual int MoneyFlowIndex(
00262 const std::string& symbol,
00263 int optInTimePeriod,
00264 double& outValue,
00265 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00266
00268 virtual int RelativeStrengthIndex(
00269 const std::string& symbol,
00270 TAHistDataType type,
00271 int optInTimePeriod,
00272 double& outValue,
00273 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00274
00275
00277 virtual int DirectionalMovementIndex(
00278 const std::string& symbol,
00279 int optInTimePeriod,
00280 double& outValue,
00281 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00282
00284 virtual int OnBalanceVolume(
00285 const std::string& symbol,
00286 TAHistDataType type,
00287 double& outValue,
00288 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00289
00291 virtual int CommodityChannelIndex(
00292 const std::string& symbol,
00293 TAHistDataType type,
00294 int optInTimePeriod,
00295 double& outValue,
00296 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00297
00299 virtual int ParabolicSAR(
00300 const std::string& symbol,
00301 double optInAcceleration,
00302 double optInMaximum,
00303 double& outValue,
00304 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00305
00306
00307
00309 virtual int MEDIANPRICE(
00310 const std::string& symbol,
00311 double& outValue,
00312 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00313
00315 virtual int WeightedClose(
00316 const std::string& symbol,
00317 double& outValue,
00318 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00319
00321 virtual int VolumeRateOfChange(
00322 const std::string& symbol,
00323 TAHistDataType type,
00324 int optInTimePeriod,
00325 double& outValue,
00326 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00327
00329 virtual int LowestLowValue(const std::string& symbol,
00330
00331 int optInTimePeriod,
00332 double& outValue,
00333 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00334
00336 virtual int HighestHighValue(const std::string& symbol,
00337
00338 int optInTimePeriod,
00339 double& outValue,
00340 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00341
00342
00344 virtual int CorrelationAnalysis(
00345 const std::string& symbol0,
00346 TAHistDataType type0,
00347 const std::string& symbol1,
00348 TAHistDataType type1,
00349 int optInTimePeriod,
00350 double& outValue,
00351 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00352
00354 virtual int CandlestickPattern(
00355 const std::string& symbol,
00356 double optInPenetration,
00357 int optInTimePeriod,
00358 int outIntVector[],
00359 int offset = 0, ohlc_interv_t interval = ohlc_1_day) = 0;
00360 };
00361
00362
00363 }