⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ta_def_ui.c

📁 股票主要技术指标源码
💻 C
📖 第 1 页 / 共 2 页
字号:
/* TA-LIB Copyright (c) 1999-2007, Mario Fortier * All rights reserved. * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributions of source code must retain the above copyright *   notice, this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright *   notice, this list of conditions and the following disclaimer in *   the documentation and/or other materials provided with the *   distribution. * * - Neither name of author nor the names of its contributors *   may be used to endorse or promote products derived from this *   software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *//* List of contributors: * *  Initial  Name/description *  ------------------------------------------------------------------- *  MF       Mario Fortier * * * Change history: * *  MMDDYY BY   Description *  ------------------------------------------------------------------- *  130101 MF   First version. *  111503 MF   Add TA_DEF_UI_Input_Price_CV *//* Description: *    Defines const structures representing how data can be *    input/output from the TA functions. *    These structure are mainly used to build the tables\table<a..z>.c files. */#include <stdlib.h>#include "ta_abstract.h"#include "ta_def_ui.h"const char TA_GroupId_MathOperatorsString[]        = "Math Operators";const char TA_GroupId_MathTransformString[]        = "Math Transform";const char TA_GroupId_OverlapStudiesString[]       = "Overlap Studies";const char TA_GroupId_VolatilityIndicatorsString[] = "Volatility Indicators";const char TA_GroupId_MomentumIndicatorsString[]   = "Momentum Indicators";const char TA_GroupId_CycleIndicatorsString[]      = "Cycle Indicators";const char TA_GroupId_VolumeIndicatorsString[]     = "Volume Indicators";const char TA_GroupId_PatternRecognitionString[]   = "Pattern Recognition";const char TA_GroupId_StatisticString[]            = "Statistic Functions";const char TA_GroupId_PriceTransformString[]       = "Price Transform";const char *TA_GroupString[TA_NB_GROUP_ID] ={   &TA_GroupId_MathOperatorsString[0],   &TA_GroupId_MathTransformString[0],   &TA_GroupId_OverlapStudiesString[0],   &TA_GroupId_VolatilityIndicatorsString[0],   &TA_GroupId_MomentumIndicatorsString[0],   &TA_GroupId_CycleIndicatorsString[0],   &TA_GroupId_VolumeIndicatorsString[0],   &TA_GroupId_PatternRecognitionString[0],   &TA_GroupId_StatisticString[0],   &TA_GroupId_PriceTransformString[0]};/************************************************************* * Define from here the TA_InputParameterInfo * These shall be sufficient for all possible TA functions. *************************************************************/const TA_InputParameterInfo TA_DEF_UI_Input_Price_OHLCV =                                  { TA_Input_Price, "inPriceOHLCV",                                    TA_IN_PRICE_OPEN   |                                    TA_IN_PRICE_HIGH   |                                    TA_IN_PRICE_LOW    |                                    TA_IN_PRICE_CLOSE  |                                    TA_IN_PRICE_VOLUME };const TA_InputParameterInfo TA_DEF_UI_Input_Price_HLCV =                                  { TA_Input_Price, "inPriceHLCV",                                    TA_IN_PRICE_HIGH   |                                    TA_IN_PRICE_LOW    |                                    TA_IN_PRICE_CLOSE  |                                    TA_IN_PRICE_VOLUME };const TA_InputParameterInfo TA_DEF_UI_Input_Price_OHLC =                                  { TA_Input_Price, "inPriceOHLC",                                    TA_IN_PRICE_OPEN   |                                    TA_IN_PRICE_HIGH   |                                    TA_IN_PRICE_LOW    |                                    TA_IN_PRICE_CLOSE  };const TA_InputParameterInfo TA_DEF_UI_Input_Price_HLC =                                  { TA_Input_Price, "inPriceHLC",                                    TA_IN_PRICE_HIGH   |                                    TA_IN_PRICE_LOW    |                                    TA_IN_PRICE_CLOSE  };const TA_InputParameterInfo TA_DEF_UI_Input_Price_HL =                                  { TA_Input_Price, "inPriceHL",                                    TA_IN_PRICE_HIGH   |                                    TA_IN_PRICE_LOW    };const TA_InputParameterInfo TA_DEF_UI_Input_Price_CV =                                  { TA_Input_Price, "inPriceCV",                                    TA_IN_PRICE_CLOSE  |                                    TA_IN_PRICE_VOLUME };const TA_InputParameterInfo TA_DEF_UI_Input_Price_V =                                  { TA_Input_Price, "inPriceV",                                    TA_IN_PRICE_VOLUME };const TA_InputParameterInfo TA_DEF_UI_Input_Real =                                  { TA_Input_Real, "inReal", 0 };const TA_InputParameterInfo TA_DEF_UI_Input_Periods =                                  { TA_Input_Real, "inPeriods", 0 };const TA_InputParameterInfo TA_DEF_UI_Input_Real0 =                                  { TA_Input_Real, "inReal0", 0 };const TA_InputParameterInfo TA_DEF_UI_Input_Real1 =                                  { TA_Input_Real, "inReal1", 0 };const TA_InputParameterInfo TA_DEF_UI_Input_Integer =                                  { TA_Input_Integer, "inInteger", 0 };/************************************************************* * Define from here the TA_OutputParameterInfo * These shall be sufficient for most of the TA functions. *************************************************************/const TA_OutputParameterInfo TA_DEF_UI_Output_Real =                                  { TA_Output_Real, "outReal", TA_OUT_LINE };const TA_OutputParameterInfo TA_DEF_UI_Output_Integer =                                  { TA_Output_Integer, "outInteger", TA_OUT_LINE };/***************************************************** * Define from here the TA_Integer ranges ****************************************************/const TA_IntegerRange TA_DEF_TimePeriod_Positive ={   1,             /* min */   100000,        /* max */   1,             /* suggested start */   200,           /* suggested end   */   1              /* suggested increment */};const TA_IntegerRange TA_DEF_TimePeriod_Positive_Minimum5 ={   5,             /* min */   100000,        /* max */   5,             /* suggested start */   200,           /* suggested end   */   1              /* suggested increment */};const TA_IntegerRange TA_DEF_TimePeriod_Positive_Minimum2 ={   2,             /* min */   100000,        /* max */   4,             /* suggested start */   200,           /* suggested end   */   1              /* suggested increment */};const TA_IntegerRange TA_DEF_HorizontalShiftPeriod ={   -200,               /* min */    200,               /* max   */   0,                  /* suggested start */   8,                  /* suggested end   */   1                   /* suggested increment */};/***************************************************** * Define from here the TA_Real ranges ****************************************************/const TA_RealRange TA_DEF_VerticalShiftPercent ={   -99.0,            /* min */   99.0,             /* max   */   1,                /* precision */   -10.0,            /* suggested start */   10.0,             /* suggested end   */   0.5               /* suggested increment */};const TA_RealRange TA_DEF_NbDeviation ={   TA_REAL_MIN,    /* min */   TA_REAL_MAX,    /* max */   2,              /* precision */   -2.0,           /* suggested start */   2.0,            /* suggested end   */   0.2             /* suggested increment */};const TA_RealRange TA_DEF_ZeroToOne ={   0.00,  /* min */   1.00,  /* max */   2,     /* precision */   0.01,  /* suggested start */   1.00,  /* suggested end   */   0.05   /* suggested increment */};const TA_RealRange TA_DEF_RealPositive ={   0.00,  /* min */   TA_REAL_MAX,  /* max */   0,    /* precision */   0.0,  /* suggested start */   0.0,  /* suggested end   */   0.0   /* suggested increment */};/***************************************************** * Define from here the TA_OptInputParameterInfo. ****************************************************/const TA_OptInputParameterInfo TA_DEF_UI_MinPeriod ={   TA_OptInput_IntegerRange, /* type */   "optInMinPeriod",        /* paramName */   0,                        /* flags */   "Minimum Period",            /* displayName */   (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */   2, /* defaultValue */   "Value less than minimum will be changed to Minimum period", /* hint */   NULL /* helpFile */};const TA_OptInputParameterInfo TA_DEF_UI_MaxPeriod ={   TA_OptInput_IntegerRange, /* type */   "optInMaxPeriod",        /* paramName */   0,                        /* flags */   "Maximum Period",            /* displayName */   (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */   30, /* defaultValue */   "Value higher than maximum will be changed to Maximum period", /* hint */   NULL /* helpFile */};const TA_OptInputParameterInfo TA_DEF_UI_TimePeriod_30_MINIMUM2 ={   TA_OptInput_IntegerRange, /* type */   "optInTimePeriod",        /* paramName */   0,                        /* flags */   "Time Period",            /* displayName */   (const void *)&TA_DEF_TimePeriod_Positive_Minimum2, /* dataSet */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -