360 发表于 2018-3-22 16:22:42

Chaikin's Volatility_Kalenzo 波幅



//+------------------------------------------------------------------+
//|                                       Chaikin's Volatility.mq4 |
//|                                                          Kalenzo |
//|                                    bartlomiej.gorski@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Kalenzo"
#property link      "bartlomiej.gorski@gmail.com"

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 DeepSkyBlue
#property indicator_level1 0
//---- input parameters
extern int       iPeriod=10;
extern int       maPeriod=10;
extern int       barsToCount = 2000;
//---- buffers
double chakin[];
double hl[];
double emahl[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
   IndicatorBuffers(3);
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,chakin);
   
   SetIndexBuffer(1,hl);
   SetIndexBuffer(2,emahl);
//----
   return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                     |
//+------------------------------------------------------------------+
int deinit()
{
//----
   
//----
   return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
{
   int limit = barsToCount;
   
//----
   for(int c = 0 ;c <= limit ;c++) hl=High-Low;
   for(int e = 0 ;e <= limit ;e++) emahl= iMAOnArray(hl,0,maPeriod,0,MODE_EMA,e);
   
   for(int i = 0 ;i <= limit-20 ;i++)
   {
      chakin = ( (emahl-emahl)/emahl ) *100;
   }
//----
   return(0);
}
//+------------------------------------------------------------------+


铭聚远i 发表于 2018-3-28 12:39:45

careerC 发表于 2018-3-28 13:30:51

666666666666

渔人 发表于 2020-6-12 22:41:46

我是个凑数的。。。

zgicp 发表于 2020-6-16 15:50:03

帮帮顶顶!!

小汪洋 发表于 2020-6-24 11:13:39

我是来刷分的,嘿嘿

uoykp 发表于 2020-6-24 14:40:22

不错不错,楼主您辛苦了。。。

lzjiang 发表于 2020-11-15 16:20:38

{:1_179:}

超人king 发表于 2021-7-8 23:40:19

支持下

润菜 发表于 2021-8-9 12:19:00

{:1_186:}
页: [1]
查看完整版本: Chaikin's Volatility_Kalenzo 波幅