文章 "聚类分析(第一部分):精通指标线的斜率" - 页 2

 
input uint Amplitude=10;
uint half;
int OnInit()
  {
//---
    half=iCustom(NULL,Period(),"half-trend-analysingTrend",Amplitude,false,false,false,false,false,false,false,1,PRICE_CLOSE);
  //-
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| 专家去初始化函数|
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| 专家勾选功能|
//+------------------------------------------------------------------+
void OnTick()
  {
//--- 
   double half_ind[];
   
   ArraySetAsSeries(half_ind,true);
  
   CopyBuffer(half,2,0,3,half_ind);
  
   double halfind=half_ind[0];

   Comment("halfind: ",halfind);
  }
如果有人可以使用,请留下正确的代码
 

你好,卡尔、

我只想说声谢谢。我的 EA 中集成了您的指标。一切都很顺利。

我在买入/卖出信号中使用上涨和下跌数据作为过滤器。只是不知道如何处理持平趋势信号。

它错过了一个新趋势。也许我应该跳过第一根(0)蜡烛上的信号。

期待您的下一篇文章。

再次感谢!

 

卡尔,这个指标可以在 mt4 中运行吗?

非常感谢!

 
Jadenode #:

卡尔,这个指标可以在 mt4 中运行吗?

非常感谢!

必须修改。有一些关于MT4和MT5区别的文章,如:

https://www.mql5.com/zh/articles/81
https://www.mql5.com/zh/articles/66
https://www.mql5.com/en/forum/179991// MT4 => MT5转换器
https://www.mql5.com/zh/code/16006// MT4订单到MT5
https://www.mql5.com/en/blogs/post/681230

https://www.mql5.com/zh/users/iceron/publications=> 选择他的 CrossPlattform 文章

只是反过来而已。

Transferring Indicators from MQL4 to MQL5
Transferring Indicators from MQL4 to MQL5
  • www.mql5.com
This article is dedicated to peculiarities of transferring price constructions written in MQL4 to MQL5. To make the process of transferring indicator calculations from MQL4 to MQL5 easier, the mql4_2_mql5.mqh library of functions is suggested. Its usage is described on the basis of transferring of the MACD, Stochastic and RSI indicators.
 

hi  Carl. thank you for your idea!


Have you heard of the product named "Trend Pro"? 


I think the indicator in your article are very similar to "Trend Pro". At least in appearance.


Are they the same? 


If not, do you know the difference between them. 

 
Jadenode #:

hi  Carl. thank you for your idea!


Have you heard of the product named "Trend Pro"? 


I think the indicator in your article are very similar to "Trend Pro". At least in appearance.


Are they the same? 


If not, do you know the difference between them. 

No, I don't know Trend Pro.
 
聚类分析用处不大,因为我们只能看到市场的一部分,而我们能看到的,我们可以借助横向水平来看到。 而花钱买数量则是一种浪费。