30 Star 78 Fork 79

liuyinghua/FastTrader

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
CW.h 2.02 KB
Copy Edit Raw Blame History
liuyinghua authored 2018-05-08 01:05 +08:00 . 整个项目的编译
#ifndef _TECH_CW_H_
#define _TECH_CW_H_
#include "TechLib.h"
#include "Tech.h"
#include "Technique.h"
#include <vector>
// ֲͼCW
class InstrumentData;
class TECH_API CCW : public TechnicalIndicator
{
public:
// Constructors
CCW( );
CCW( KdataContainer * pKData );
virtual ~CCW();
public:
virtual void clear( );
// Attributes
double m_dChangeHand;
virtual void SetDefaultParameters( );
void attach( CCW & src );
virtual bool IsValidParameters( );
// Operations
bool GetRange( std::size_t & nStart, std::size_t & nEnd, InstrumentInfo & info );
bool min_max_info( std::size_t nStart, std::size_t nEnd, double dMinPrice, double dMaxPrice, double dStep,
double *pdMinVolume, double *pdMaxVolume );
bool CalculateCW( double *pdVolume, std::size_t nStart, std::size_t nEnd, double dPrice, double dStep );
bool CalculateCW( std::size_t nStart, std::size_t nEnd, InstrumentInfo & info, double dStep,
std::vector<uint32_t> & adwPrice, std::vector<uint32_t> & adwVolume,
double * pdMinVolume, double * pdMaxVolume, double * pdTotalVolume, double * pdVolPercent );
bool CalculateRecentCW( std::size_t nEnd, std::size_t nDays, InstrumentInfo & info, double dStep,
std::vector<uint32_t> & adwPrice, std::vector<uint32_t> & adwVolume,
double * pdMinVolume, double * pdMaxVolume, double * pdTotalVolume, double * pdVolPercent );
bool CalculatePastCW( std::size_t nEnd, std::size_t nDays, InstrumentInfo & info, double dStep,
std::vector<uint32_t> & adwPrice, std::vector<uint32_t> & adwVolume,
double * pdMinVolume, double * pdMaxVolume, double * pdTotalVolume, double * pdVolPercent );
// Stat
static bool StatGainPercent(double *pdGainPercent, std::vector<uint32_t> &adwPrice, std::vector<uint32_t> &adwVolume, double dPriceSel);
static bool StatCostAverage(double *pdCostAve, std::vector<uint32_t> &adwPrice, std::vector<uint32_t> &adwVolume);
static bool StatMass(double *pdLower, double *pdUpper, double *pdMassPrice, std::vector<uint32_t> &adwPrice, std::vector<uint32_t> &adwVolume, double dMassVol);
};
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/mongodb_client/FastTrader.git
[email protected]:mongodb_client/FastTrader.git
mongodb_client
FastTrader
FastTrader
master

Search