Heiken Ashi Candlestick Strength

To add comments, please log in or register
Tony Chavez
235
Tony Chavez  
Anyone know how to check the fullness of a candle? Trying to avoid opening trades when candle is weak.
Marco vd Heijden
Moderator
8168
Marco vd Heijden  
What does that even mean ?
Tony Chavez
235
Tony Chavez  
Marco vd Heijden:
What does that even mean ?

Sorry means if the candle forms with long tails but only a thin bar, I want to avoid opening a trade at that point.
Files:
whroeder1
17943
whroeder1  
Compare the body to a moving average of the body.
Tony Chavez
235
Tony Chavez  
whroeder1:
Compare the body to a moving average of the body.

Any pointers on where I can read about that?
whroeder1
17943
whroeder1  
Tony Chavez: Any pointers on where I can read about that?
There's nothing to read about, just code it.
void OnTick(){
   static datetime Time0=0; datetime TimePrev = Time0; Time0=Time[0]; bool isNewBar = TimePrev != Time0;
   if(isNewBar){
      double HAopen   = ...,
             HAclose  = ...,
             bodySize = MathAbs(HAopen - HAclose);
      #define bodySizeEMAlength 10
      static const double bodySizeEMAalpha = 2.0 / (bodySizeEMAlength + 1);
      static double bodySizeAve = 0.0; bodySizeAve += bodySizeEMAalpha * (bodySize - bodySizeAve);
      if(bodySize > bodySizeAve) 
         Print("Significant");
   :
}
Tony Chavez
235
Tony Chavez  
whroeder1:
There's nothing to read about, just code it.

Thank you. That should be helpful once include it as a limiter in the code.
To add comments, please log in or register