Help with price action indicator

Back to topics list To post a new topic, please log in or register
avatar
3
Codeme 2015.08.12 13:24
 
Hi all,

I have created an indicator based on price action but I only want the signal to appear if the three signal candles are roughly the same size in other words non VOLATILE moments. Is this possible to code ? How would I do this? Big thank you in advance
avatar
12992
WHRoeder 2015.08.12 13:47 #
 

Codeme:

Is this possible to code ?

How would I do this?

  1. Once you decide what you mean by roughly, same, VOLATILE.
  2. See #1. I would use
    bool volatile(double max, int iEnd, int iBeg=0){
       double sizeMax = 0, sizeMin = DBL_MAX;
       for(; iBeg < iEnd; ++iBeg){
          double size = High[iBeg] - Low[iBeg];
          if(sizeMin > size) sizeMin = size;
          if(sizeMax < size) sizeMax = size;
       }
       if(sizeMin == 0.0) return false;
       return sizeMax / sizeMin > max;
    }
avatar
Moderator
3411
GumRai 2015.08.12 13:48 #
 

When it comes to coding, there is no such thing as "roughly the same size ".

You have to define precisely the conditions that you require 

avatar
3
Codeme 2015.08.12 14:14 #
 
WHRoeder:
  1. Once you decide what you mean by roughly, same, VOLATILE.
  2. See #1. I would use

Great thanks , I know roughly not good enough :) I am trying to confirm that there are not big differences between all three candles in other words non volatile movements. Thanks again I will give it ago

Back to topics list  

To add comments, please log in or register