請(qǐng)幫忙把MT4指標(biāo)LSMA改成博易指標(biāo),謝謝 [博易POBO]
咨詢內(nèi)容:
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Red
extern int period=50;
extern int CountBars=10000;?? // 暑腓麇耱忸 鋏鉞疣駔屐 徉痤?
double buffer[];
//+------------------------------------------------------------------+
//|????????????????????????????????????????????????????????????????? |
//+------------------------------------------------------------------+
void init()
? {
?? SetIndexStyle(0,DRAW_LINE,0,2);
?? SetIndexBuffer(0,buffer);
?? SetIndexLabel(0,"Value");
?? SetIndexDrawBegin(0,0);
? }
//+------------------------------------------------------------------+
//|????????????????????????????????????????????????????????????????? |
//+------------------------------------------------------------------+
void start()
? {
?? int counted_bars=IndicatorCounted();
?? int limit=Bars-counted_bars;
?? if(counted_bars==0)
???? {
????? limit-=(period+1);
????? limit=MathMin(CountBars,limit);
???? }
?? for(int i=0; i<limit; i++)
???? {
????? buffer[i]=LSMA(period,i);
???? }
? }
//+------------------------------------------------------------------+
//|????????????????????????????????????????????????????????????????? |
//+------------------------------------------------------------------+
double LSMA(int ma_period,int shift)
? {
?? double lengthvar;
?? double tmp;
?? double sum=0;
?? for(int i=ma_period; i>=1; i--)
???? {
????? lengthvar=(ma_period+1)/3;
????? tmp=(i-lengthvar)*Close[ma_period-i+shift];
????? sum+=tmp;
???? }
?? double value=sum*6/(ma_period*(ma_period+1));
?? return(value);
? }
//+------------------------------------------------------------------+
?
請(qǐng)幫忙把MT4指標(biāo)LSMA改成博易指標(biāo),謝謝
#property link "mandorr@gmail.com"#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Red
extern int period=50;
extern int CountBars=10000;?? // 暑腓麇耱忸 鋏鉞疣駔屐 徉痤?
double buffer[];
//+------------------------------------------------------------------+
//|????????????????????????????????????????????????????????????????? |
//+------------------------------------------------------------------+
void init()
? {
?? SetIndexStyle(0,DRAW_LINE,0,2);
?? SetIndexBuffer(0,buffer);
?? SetIndexLabel(0,"Value");
?? SetIndexDrawBegin(0,0);
? }
//+------------------------------------------------------------------+
//|????????????????????????????????????????????????????????????????? |
//+------------------------------------------------------------------+
void start()
? {
?? int counted_bars=IndicatorCounted();
?? int limit=Bars-counted_bars;
?? if(counted_bars==0)
???? {
????? limit-=(period+1);
????? limit=MathMin(CountBars,limit);
???? }
?? for(int i=0; i<limit; i++)
???? {
????? buffer[i]=LSMA(period,i);
???? }
? }
//+------------------------------------------------------------------+
//|????????????????????????????????????????????????????????????????? |
//+------------------------------------------------------------------+
double LSMA(int ma_period,int shift)
? {
?? double lengthvar;
?? double tmp;
?? double sum=0;
?? for(int i=ma_period; i>=1; i--)
???? {
????? lengthvar=(ma_period+1)/3;
????? tmp=(i-lengthvar)*Close[ma_period-i+shift];
????? sum+=tmp;
???? }
?? double value=sum*6/(ma_period*(ma_period+1));
?? return(value);
? }
//+------------------------------------------------------------------+
?
?
?來(lái)源:程序化99網(wǎng)( www.kzuj.com.cn )
博易技術(shù)人員: 就是程序中的LSMA函數(shù),能改成博易函數(shù)實(shí)現(xiàn)嗎? 您好,無(wú)法修改。 來(lái)源 程序化久久網(wǎng)
有思路,想編寫各種指標(biāo)公式,交易模型,選股公式,還原公式的朋友
可聯(lián)系技術(shù)人員 QQ: 262069696 或微信號(hào):cxh99cxh99 進(jìn)行 有償收費(fèi) 編寫!
(怎么收費(fèi),代編流程等詳情請(qǐng)點(diǎn)擊閱讀!)
(注:由于人數(shù)限制,QQ或微信請(qǐng)選擇方便的一個(gè)聯(lián)系我們就行,加好友時(shí)請(qǐng)簡(jiǎn)單備注下您的需求,否則無(wú)法通過(guò)。謝謝您!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容