怎样学习MC

当前位置: >>
/******************** (C) COPYRIGHT 2007 STMicroelectronics ********************
* File Name
: MC_State_Observer.c
* Author
: IMS Systems Lab
* Date First Issued
: 21/11/07
* Description
: This module implements the State Observer of
the PMSM B-EMF, thus identifying rotor speed and position
*
********************************************************************************
* History:
* 21/11/07 v1.0
********************************************************************************
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*******************************************************************************/
/* Includes ------------------------------------------------------------------*/
#include &stm32f10x_type.h&
#include &MC_type.h&
#include &MC_State_Observer.h&
/* Private define ------------------------------------------------------------*/
#define BUFFER_SIZE (u8)64
/* Private variables ---------------------------------------------------------*/
static s32 wIalfa_est,wIbeta_
static s32 wBemf_alfa_est, wBemf_beta_
static s32 wSpeed_PI_integral_
static s16 hBemf_alfa_est,hBemf_beta_
static s16 hSpeed_Buffer[BUFFER_SIZE];
static s16 hRotor_El_A
static s16 hRotor_Speed_
static bool Max_Speed_Out, Min_Speed_Out, Is_Speed_R
static u8 bSpeed_Buffer_I
extern const s16 hSin_Cos_Table[256];
static volatile s16 hC2, hC4;
static s16 hF1, hF2, hF3, hC1, hC3,hC5, hC6;
static volatile s16 hSpeed_P_Gain, hSpeed_I_G
static s32 wMotorMaxSpeed_
static u16 hPercentageF
/* Private function prototypes -----------------------------------------------*/
s16 Calc_Rotor_Speed(s16, s16);
s16 Speed_PI(s16, s16);
void Store_Rotor_Speed(s16);
//function of MC_Clarke_Park.c
Trig_Components Trig_Functions(s16);
/*******************************************************************************
* Function Name : STO_Calc_Rotor_Angle角度
* Description : This function implements the State Observer of a
*
PMSM back-emfs. Thus, motor speed and rotor angle are calculated
*
and stored in the variables hRotor_Speed,hRotor_El_Angle.
* Input : Stator voltage reference values Valpha, Vbeta (as provided by RevPark
*
through variable Stat_Volt_alfa_beta),
*
Stator current values Ialpha,Ibeta (as provided by Clark trasformation
*
through variable Stat_Curr_alfa_beta),
DC bus voltage.
* Output : None
* Return : None
*******************************************************************************/
void STO_Calc_Rotor_Angle(Volt_Components Stat_Volt_alfa_beta,
Curr_Components Stat_Curr_alfa_beta,
s16 hBusVoltage)
{
s32 wIalfa_est_Next,wIbeta_est_N
s32 wBemf_alfa_est_Next, wBemf_beta_est_N
s16 hValfa,hV
s16 hIalfa_err, hIbeta_
s16 hRotor_S
//////////////////限幅
if (wBemf_alfa_est & (s32)(S16_MAX*hF2))
wBemf_alfa_est = S16_MAX*hF2;
else if (wBemf_alfa_est &= (s32)(S16_MIN*hF2))
wBemf_alfa_est = -S16_MAX*hF2;
if (wBemf_beta_est & (s32)(S16_MAX*hF2))
wBemf_beta_est = S16_MAX*hF2;
else if (wBemf_beta_est &= (s32)(S16_MIN*hF2))
wBemf_beta_est = -S16_MAX*hF2;
if (wIalfa_est & (s32)(S16_MAX*hF1))
wIalfa_est = S16_MAX*hF1;
else if (wIalfa_est &= (s32)(S16_MIN*hF1))
wIalfa_est = -S16_MAX*hF1;
if (wIbeta_est & S16_MAX*hF1)
wIbeta_est = S16_MAX*hF1;
else if (wIbeta_est &= S16_MIN*hF1)
wIbeta_est = -S16_MAX*hF1;
//////////////////限幅wdwd2008
hIalfa_err = (s16)((wIalfa_est/hF1)-Stat_Curr_alfa_beta.qI_Component1);
hIbeta_err = (s16)((wIbeta_est/hF1)-Stat_Curr_alfa_beta.qI_Component2);
hValfa = (s16)((Stat_Volt_alfa_beta.qV_Component1*hBusVoltage)/32768);
hVbeta = (s16)((Stat_Volt_alfa_beta.qV_Component2*hBusVoltage)/32768);
/*alfa axes observer*/
wIalfa_est_Next = (s32)(wIalfa_est-(s32)(hC1*(s16)(wIalfa_est/hF1))+
(s32)(hC2*hIalfa_err)+
(s32)(hC5*hValfa)-
(s32)(hC3*(s16)(wBemf_alfa_est/hF2)));
//I(n+1)=I(n)-rs*T/Ls*I(n)+K1*(I(n)-i(n))+T/Ls*V-T/Ls*emf
wBemf_alfa_est_Next = (s32)(wBemf_alfa_est+(s32)(hC4*hIalfa_err)+
(s32)(hC6*hRotor_Speed_dpp*(wBemf_beta_est/(hF2*hF3))));
//emf(n+1)=emf(n)+K2*(I(n)-i(n))+p*w*emfb*T
/*beta axes observer*/
wIbeta_est_Next = (s32)(wIbeta_est-(s32)(hC1*(s16)(wIbeta_est/hF1))+
(s32)(hC2*hIbeta_err)+
(s32)(hC5*hVbeta)-
(s32)(hC3*(s16)(wBemf_beta_est/hF2)));
wBemf_beta_est_Next = (s32)(wBemf_beta_est+(s32)(hC4*hIbeta_err)-
(s32)(hC6*hRotor_Speed_dpp*(wBemf_alfa_est/(hF2*hF3))));
/* Extrapolation of present rotation direction, necessary for PLL */
if (hRotor_Speed_dpp &=0)
bDirection = 1;
bDirection = -1;
/*Calls the PLL blockset*/
hBemf_alfa_est = wBemf_alfa_est/hF2;
hBemf_beta_est = wBemf_beta_est/hF2;
hRotor_Speed = Calc_Rotor_Speed((s16)(hBemf_alfa_est*bDirection),
(s16)(-hBemf_beta_est*bDirection));
Store_Rotor_Speed(hRotor_Speed);
hRotor_El_Angle = (s16)(hRotor_El_Angle + hRotor_Speed);
/*storing previous values of currents and bemfs*/
wIalfa_est = wIalfa_est_N
wBemf_alfa_est = wBemf_alfa_est_N
wIbeta_est = wIbeta_est_N
wBemf_beta_est = wBemf_beta_est_N
}
/*******************************************************************************
* Function Name : STO_Calc_Speed可靠性
* Description : It averages the values of hRotor_Speed contained in the speed
*
motor speed is stored in the variable hRotor_Speed_dpp
* Input : None.
* Output : None.
* Return : None.
*******************************************************************************/
void STO_Calc_Speed(void)
{
s32 wAverage_Speed = 0;
s32 wAverageQuadraticError = 0;
for (i=0;i&BUFFER_SIZE;i++)
wAverage_Speed += hSpeed_Buffer[i];
wAverage_Speed /= BUFFER_SIZE;
hRotor_Speed_dpp = (s16)(wAverage_Speed);
for (i=0;i&BUFFER_SIZE;i++)
wError = hSpeed_Buffer[i] - wAverage_S
wError = (wError * wError);
wAverageQuadraticError += (u32)(wError);
//It computes the measurement variance
wAverageQuadraticError/= BUFFER_SIZE;
//The maximum variance acceptable is here calculated as ratio of average speed
wAverage_Speed = (s32)(wAverage_Speed * wAverage_Speed);
wAverage_Speed = (wAverage_Speed/128) * hPercentageF
if (wAverageQuadraticError & wAverage_Speed)
Is_Speed_Reliable = FALSE;
Is_Speed_Reliable = TRUE;
/*******************************************************************************
* Function Name : STO_IsSpeed_Reliable
* Description : Return latest value of variable Is_Speed_Reliable
* Input : None
* Output : None
* Return : boolean value: TRUE if speed is reliable, FALSE otherwise.
*******************************************************************************/
bool STO_IsSpeed_Reliable(void)
{
return(Is_Speed_Reliable);
}
/*******************************************************************************
* Function Name : STO_Get_Speed
* Description : It returns the motor electrical speed (dpp)
* Input : None.
* Output : None.
* Return : hRotor_Speed_dpp.
*******************************************************************************/
s16 STO_Get_Speed(void)
{
return (hRotor_Speed_dpp);
//Average_Speed
}
/*******************************************************************************
* Function Name : STO_Get_Electrical_Angle
* Description : It returns the rotor position (electrical angle,s16)
* Input : None.
* Output : None.
* Return : hRotor_El_Angle.
*******************************************************************************/
s16 STO_Get_Electrical_Angle(void)
{
return (hRotor_El_Angle);
}
/*******************************************************************************
* Function Name : STO_Init
* Description : It initializes all the State Observer related variables to
*
suitable values.
* Input : None.
* Output : None.
* Return : None.
*******************************************************************************/
void STO_Init(void)
{
wIalfa_est = 0;
wIbeta_est = 0;
wBemf_alfa_est = 0;
wBemf_beta_est = 0;
Is_Speed_Reliable = FALSE;
wSpeed_PI_integral_sum = 0;
Max_Speed_Out = FALSE;
Min_Speed_Out = FALSE;
hRotor_El_Angle = 0;
//could be used for start-up procedure
hRotor_Speed_dpp = 0;
STO_InitSpeedBuffer();
}
/*******************************************************************************
* Function Name : STO_Init
* Description : It initializes all the State Observer related variables to
*
suitable values.
* Input : None.
* Output : None.
* Return : None.
*******************************************************************************/
void STO_Gains_Init(StateObserver_Const* StateObserver_ConstStruct)
{
hC1 = StateObserver_ConstStruct-&hC1;
hC2 = StateObserver_ConstStruct-&hC2;
hC3 = StateObserver_ConstStruct-&hC3;
hC4 = StateObserver_ConstStruct-&hC4;
hC5 = StateObserver_ConstStruct-&hC5;
hC6 = StateObserver_ConstStruct-&hC6;
hF1 = StateObserver_ConstStruct-&hF1;
hF2 = StateObserver_ConstStruct-&hF2;
hF3 = StateObserver_ConstStruct-&hF3;
hSpeed_P_Gain = StateObserver_ConstStruct-&PLL_P;
hSpeed_I_Gain = StateObserver_ConstStruct-&PLL_I;
wMotorMaxSpeed_dpp = StateObserver_ConstStruct-&wMotorMaxSpeed_
hPercentageFactor = StateObserver_ConstStruct-&hPercentageF
}
/*******************************************************************************
* Function Name : Calc_Rotor_Speed速度
* Description : This function implements a PLL; it receives the motor back-emfs
*
and calculates motor speed.
* Input : Motor back-emfs hBemf_alpha,hBemf_beta.
* Output : None.
* Return : Motor speed (dpp, digit-per-pwm)
*******************************************************************************/
s16 Calc_Rotor_Speed(s16 hBemf_alfa, s16 hBemf_beta)
{
s32 wAlfa_Sin_tmp, wBeta_Cos_
Trig_Components Local_C
Local_Components = Trig_Functions(hRotor_El_Angle);
/* Alfa & Beta BEMF multiplied by hRotor_El_Angle Cos & Sin*/
wAlfa_Sin_tmp = (s32)(hBemf_alfa*Local_Components.hSin);
wBeta_Cos_tmp = (s32)(hBemf_beta*Local_Components.hCos);
/* Speed PI regulator */
hOutput = Speed_PI((s16)(wAlfa_Sin_tmp/32768),(s16)(wBeta_Cos_tmp/32768));
return (hOutput);
}
/*******************************************************************************
* Function Name : Speed_PI
* Description : It implements the PLL PI regulator.
* Input : (B-emf alpha)*sin(theta),(B-emf beta)*cos(theta).
* Output : None.
* Return : Motor speed (dpp, digit-per-pwm).
*******************************************************************************/
s16 Speed_PI(s16 hAlfa_Sin, s16 hBeta_Cos)
{
s32 wSpeed_PI_error, wO
s32 wSpeed_PI_proportional_term, wSpeed_PI_integral_
wSpeed_PI_error = hBeta_Cos - hAlfa_S
wSpeed_PI_proportional_term = hSpeed_P_Gain * wSpeed_PI_
wSpeed_PI_integral_term = hSpeed_I_Gain * wSpeed_PI_
if ( (wSpeed_PI_integral_sum &= 0) && (wSpeed_PI_integral_term &= 0)
&& (Max_Speed_Out == FALSE) )
if ( (s32)(wSpeed_PI_integral_sum + wSpeed_PI_integral_term) & 0)
wSpeed_PI_integral_sum = S32_MAX;
wSpeed_PI_integral_sum += wSpeed_PI_integral_
//integral
else if ( (wSpeed_PI_integral_sum &= 0) && (wSpeed_PI_integral_term &= 0)
&& (Min_Speed_Out == FALSE) )
if ( (s32)(wSpeed_PI_integral_sum + wSpeed_PI_integral_term) & 0)
wSpeed_PI_integral_sum = -S32_MAX;
wSpeed_PI_integral_sum += wSpeed_PI_integral_
//integral
wSpeed_PI_integral_sum += wSpeed_PI_integral_
//integral
wOutput = (wSpeed_PI_proportional_term/16384 + wSpeed_PI_integral_sum/262144);
if (wOutput & wMotorMaxSpeed_dpp)
Max_Speed_Out = TRUE;
wOutput = wMotorMaxSpeed_
else if (wOutput & (-wMotorMaxSpeed_dpp))
Min_Speed_Out = TRUE;
wOutput = -wMotorMaxSpeed_
Max_Speed_Out = FALSE;
Min_Speed_Out = FALSE;
return ((s16)wOutput);
}
/*******************************************************************************
* Function Name : Store_Rotor_Speed
* Description : This function stores in a buffer, whose dimension is BUFFER_SIZE,
*
the last calculated value of the motor speed.为了计算可靠性
* Input : hRotor_Speed (dpp, digit-per-pwm)
* Output : None.
* Return : None.
*******************************************************************************/
void Store_Rotor_Speed(s16 hRotor_Speed)
{
bSpeed_Buffer_Index++;
if (bSpeed_Buffer_Index == BUFFER_SIZE) //64
bSpeed_Buffer_Index = 0;
hSpeed_Buffer[bSpeed_Buffer_Index] = hRotor_S
}
/*******************************************************************************
* Function Name : STO_InitSpeedBuffer清零
* Description : This function initializes the buffer for speed measurament
* Input : None
* Output : None
* Return : None
*******************************************************************************/
void STO_InitSpeedBuffer(void)
{
/*init speed buffer*/
for (i=0;i&BUFFER_SIZE;i++)
hSpeed_Buffer[i] = 0x00;
bSpeed_Buffer_Index = 0;
}
/*******************************************************************************
* Function Name : STO_Gains_Update
* Description : This function allows to write the private variables containing
both observer and PLL
* Input : Pointer to Sensorless_Gains type variable
* Output : None
* Return : None
*******************************************************************************/
void STO_Gains_Update(StateObserver_GainsUpdate* STO_GainsUpdateStruct)
{
hC2 = STO_GainsUpdateStruct-&hC2;
hC4 = STO_GainsUpdateStruct-&hC4;
hSpeed_P_Gain = STO_GainsUpdateStruct-&PLL_P;
hSpeed_I_Gain = STO_GainsUpdateStruct-&PLL_I;
/*******************************************************************************
* Function Name : STO_Get_wIalfa_est
* Description : This function allows to export the variables containing the
observed current Ialfa in s16 format
* Input : None
* Output : None
* Return : observed Ialfa in s16 format
*******************************************************************************/
s16 STO_Get_wIalfa_est(void)
{
return((s16)(wIalfa_est/hF1));
}
/*******************************************************************************
* Function Name : STO_Get_wIbeta_est
* Description : This function allows to export the variables containing the
observed current Ibeta in s16 format
* Input : None
* Output : None
* Return : observed Ibeta in s16 format
*******************************************************************************/
s16 STO_Get_wIbeta_est(void)
{
return((s16)(wIbeta_est/hF1));
}
/*******************************************************************************
* Function Name : STO_Get_wBemf_alfa_est
* Description : This function allows to export the variables containing the
observed Bemf alfa in s16 format
* Input : None
* Output : None
* Return : observed Bemf alfa in s16 format
*******************************************************************************/
s16 STO_Get_wBemf_alfa_est(void)
{
return((s16)(hBemf_alfa_est));
}
/*******************************************************************************
* Function Name : STO_Get_wBemf_beta_est
* Description : This function allows to export the variables containing the
observed Bemf beta in s16 format
* Input : None
* Output : None
* Return : observed Bemf alfa in s16 format
*******************************************************************************/
s16 STO_Get_wBemf_beta_est(void)
{
return((s16)(hBemf_beta_est));
}
/******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/
MC34119音频芯片_信息与通信_工程科技_专业资料。芯片技术资料MC34119 音频功率放大芯片,是摩托罗拉公司生产的,一种低电源、低功耗、外接元件小的音频功率放大芯片,被...Motorola MC145162/D (CMOS)翻译――中文 福州大学林仁杰翻译一、 简介 MC145162 (可编程的双 PLL(锁相环)频率合成器)最高频率可达到 60 MHz 和 85 MHz 。...的工作职责( PMC) pc 与 MC 的工作职责(统称 PMC) ( 09:04:52) 转载 标签: 分类:知识跟着火炬看中国 文化 MC 职责: 1.从业务处接收顾客需求...MC领地指令大全_法律资料_人文社科_专业资料。MC 领地指令大全 1.限权插件 由于限权插件使用很麻烦,而且会引起各种问题(如进地狱除 op 外都被限 权等) ,所以...MC2000 超声波检验 MC2100 总则 MC2110 适用范围 MC2120 一般要求 MC2121 检验人员资格 MC2122 超声波检验文件 MC2130 超声波检验设备 MC2131 超声波检验仪器 ...PMC分PC和MC的职责_经管营销_专业资料。PMC 分 PC 和 MC 的职责 PC 的职责: 1、从业务或交管处接收订单需求,并根据人力、机器模具、物料库存和购备状 况评审...MC33886的一些中文资料_计算机软件及应用_IT/计算机_专业资料。33886 作为一个单片电路 H-桥,是理想的功率分 流直流马达和双向推力电磁铁控制器. 它的集成电路 ...MC箱子商店教程_计算机软件及应用_IT/计算机_专业资料。第一步放个牌子, 第一行输入 第二行输入 第三行输入 商品。 注意锁好箱子 不输 B 钱数:S 钱数 物品...计算器上的M+,M-,MR,MC,GT都是什么意思_计算机软件及应用_IT/计算机_专业资料。M+:是计算结果并加上已经储存的数;中断数字输入. M-:从存储器内容中减去当前...mc作弊码_计算机硬件及网络_IT/计算机_专业资料。额 /gamemode XXX(玩家名称)1 或 0 开启或关闭创造模式 /god 无敌 /weather 换天气用的 /setspawn 重新设置...
All rights reserved Powered by
copyright &copyright 。文档资料库内容来自网络,如有侵犯请联系客服。& 本人想学习MC不知道怎么压声 哪位MC高手指导一下 学MC怎么压声技巧大全及日常练习?
本人想学习MC不知道怎么压声 哪位MC高手指导一下 学MC怎么压声技巧大全及日常练习?
本人想学习MC不知道怎么压声 哪位MC高手指导一下 学MC怎么压声技巧大全及日常练习?1.自己的声音意思就是迩本质说话的声音.但是要稍待一些气氛.那么建议刚学习MC的初学者,不要盲目的压声音.而且就算是压出的声音还不如用自己本身的声音喊出的更好听所以希望大家可以试着用自己的声音先去练习MC.而且在选曲的教程中也告戒大家了开始学一定要先寻找club曲速不是很快的DJ.这样才有利于逐步学习压声2.压声所发出的声音压声所发出的声音其实也未必都是沉闷的.而压声是很有讲究的压声要看是什么样的曲子.曲子适合的话,曲子的哪个部分来压声.还有迩本身的声音是否压声就会好听首先清楚迩到底要倾向于什么曲风(商业)or(酒吧)?然后你确定好你的风格之后,开始掌握真正的压声技巧刻意的去压声不仅会把声音压的很难听.也会很伤害声带(而且对于岁数小的初学者更是不要压声)所以掌握压声的技巧是很重要的,第一 :喊.这是压声的第一个技巧.并不是一味的压迫自己声音就是对的,而要先去掌握喊.喊麦嘛所以就是先要学会把嗓子打开.放开喉咙去喊.当然不是乱嚎(但这个只适用于提高高潮的时候,而不是从头到尾都是喊.)第二 :气息要够.压声其实是很练习气息的,如果说气不够.自然压声也不会很完美所以在每次喊出麦词的时候必须提前吸气保证迩的气息足够.然后再次释放.第三 :技巧.压声到底是用肚子的丹田气息去压 还是用声带在嗓子口压?(俄压声就是完全肚子部分用力)有的人压声 喊完之后会觉得嗓子痛痛 有人喊完却觉得嗓子毫无感觉,但是也会口渴用力和气息的部分 不能全靠嗓子也不能全靠丹田用力 所以他是双者结合着来的其实压声的主要技巧还是在于自己去摸索,因为压声这个东西都是运用你自己的器官所以也只有自己才能知道,唯一的办法(多听 多练)第四 :在曲子哪个部分进行压声并不是从开始喊到结束一直都要压声.压声也是要看曲子定义的那么一般都是尾音压声.还有就是喊些气氛的词 come on ,are you ready.提高高潮的部分来进行压声.以上是关于本人想学习MC不知道怎么压声 哪位MC高手指导一下 学MC怎么压声技巧大全及日常练习?的全部内容!
责任编辑:彩霞
吉香缘制香机设备多少钱?需要交加盟费吗?一般有万元就能够轻松起步了,而且这个品牌...
加盟中盛永基食用菌成功的多吗?学费需要多少钱?多少规模都可以,可大可小,根据自己...
创业投资对于品牌的选择很重要,现在加盟艾科宁空气净化有什么优势呢?该品牌的加盟优...
空气净化行业竞争激烈,但是蕴含着巨大的财富,所以选择一个好的品牌是至关重要的。那...从零开始学MC(1)——如何用一节课的时间开始MC交易
从零开始学MC&&如何用一节课的时间开始 MultiCharts&交易&
一、设置图表,如何找到交易商品&
二、添加策略,在图表上体现交易逻辑&
三、交易设置,交易前的最后准备工作&
四、交易查询,轻松了解交易状况&
更多问题解答,欢迎加入技术交流QQ群:
连络电话:+86-21-
公司地址:上海市浦东新区北张家浜路88 号C312 室
技术支持由 Algostars 策略星提供. (C) 2014 星策(上海)投资咨询有限公司. 沪ICP备号您现在的位置:>>
>>正文内容
学习写MC指标 [MC]
咨询内容: 原文转载自交易医生
开始前提醒,Multicharts 程序最重要的观念,每根K棒结束都执行程序一次(或是每tick一次)。。
这是专为交易而设计的系统,所有功能的开发皆以K棒为出发点,因此我们要养成习惯,以K棒来思考。我们最自然想得到的资料应该就是,K棒之间有何不同,那就必须比对不同K棒,所以就要取得当根K棒之前的K棒资料。这里又是Multicharts的重点了,但这个重点有点复杂我们要分段说明。
首先要知道 Multicharts 中的资料可以是,K棒的价格、成交量与时间,还有我们自己定义的变数,我们先全部统称为变数,变数会以K棒为单位,每根K棒都纪录一次所有变数的值,这样我们就能取出任何一个变数在任何一根K棒上的值,那程序中就是以中括号[n]来取前第n根K的变数值,
如当根K棒的开高收低分别是open、high、low、close,那前一根开与前二根收就是open[1]、close[2];想看当根K高是否高过前根K,那就是if (high & high[1]) then &do something&;;判断当根K低是否低于前跟K,即为if (low & low[1]) then &do something&;。
现在就来动手写写看,运用这几个重点,我们要写一个指标,用来指出连续过高或连续破低的K棒,那就先以写程序的步骤来规划。
写一个指标分别指出连续四根K过高或连续四根K破低;
判断连续四根K过高那就是当根K高大于前一根K高,且前一根K高大于前二根K高,及前二根K高大于前三根K高,成立时在当跟K高点上五点画一个黄点;同理当出现连续四根K棒破低我们画一个蓝点,请大家自己试试写出连续四根K棒破低的条件;
检查连续四根K棒过高条件,条件成立画出黄点;检查连续四根K棒破低条件,条件成立画出蓝点;
实作小程序:
检查连续四根K棒过高:if (High & High[1]) and (High[1] & High[2]) and (High[2] & High[3]) then&
检查连续四根K棒破低:if (Low & Low[1]) and (Low[1] & Low[2]) and (Low[2] & Low[3]) then&
画出高点黄点:plot1(High + 5, &High&, yellow);
画出低点蓝点:plot2(Low & 5, &Low&, blue);
结合并完成:if (High & High[1]) and (High[1] & High[2]) and (High[2] & High[3])then plot1(High + 5, &High&, yellow);
if (Low & Low[1]) and (Low[1] & Low[2]) and (Low[2] & Low[3])then plot2(Low & 5, &Low&, blue);
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ:
&进行 有偿 编写!
【字体: 】【】【】
没有相关内容
&本月热门排行
&用户常看内容
会员登录/注册

我要回帖

 

随机推荐