Discussion of article "Cluster Analysis (Part I): Mastering the Slope of Indicator Lines" - page 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);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   
  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---   
   double half_ind[];
   
   ArraySetAsSeries(half_ind,true);
  
   CopyBuffer(half,2,0,3,half_ind);
  
   double halfind=half_ind[0];

   Comment("halfind: ",halfind);
  }
if someone can use it, leave the correct code
 

Hello Carl,

Just want to say thank you. Have your indicator integrated in my EA. Everything worked immediately.

I use the Up and Down data as a filter in my Buy/Sell signals. Just dont know what to do with the flat trend signal.

It missing a new trend. May be I should skip the signal on the first (0) candle.

Looking forward to your next article.

Thanks again!

 

Hi Carl, can this indicator be run in mt4 ? if so, what changes need to be made. 

thanks a lot! 

 
Jadenode #:

Hi Carl, can this indicator be run in mt4 ? if so, what changes need to be made. 

thanks a lot! 

Well it has to be changed. There a some articels abou the difference of mt4 and mt5 like:

https://www.mql5.com/en/articles/81
https://www.mql5.com/en/articles/66
https://www.mql5.com/en/forum/179991 // MT4 => MT5 converter
https://www.mql5.com/en/code/16006  // mt4 orders to mt5
https://www.mql5.com/en/blogs/post/681230

https://www.mql5.com/en/users/iceron/publications => Chosse his CrossPlattform articles

It is only the other way around.

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.
 

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.


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


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.
 
Cluster analysis is of little use, because we see only part of the market, what we can see, we can see with the help of horizontal levels. And paying money for volumes is a waste of money.