Re: Coding Help

301
acerdufer wrote: Sat May 20, 2017 5:52 am No matter the trend the only thing I want is a signal when for example buyers exceeds x point sellers for example buyers a100 point sellers 50 I entered a difference to 50 I get an alert
Use the parameters provided by MrPips version for that


Re: Coding Help

303
acerdufer wrote: Sat May 20, 2017 6:34 am Yes big thank you to Mrpip but why the indicator does not produce an alert with each difference I look at the graph en direct avec une différence 20 when the buyers are a 50 and the sellers has 30 there is not warning
Because that indicator does not alert like that
It will alert when the "trend" changes and when that difference is greater than that. Otherwise you would have alerts on almost each and ever bar

Re: Coding Help

305
acerdufer wrote: Sat May 20, 2017 6:52 am Yes exactly this is what I ask from the beginning to change the coding so that they can alert me this way please this indicator and the holy grail
If you are looking for a holly grail then you should continue searching anywhere else
Otherwise, if you are looking for alerts when a "volume" exceeds some value, you should try some of the indicators using volume values


Re: Coding Help

307
acerdufer wrote: Sat May 20, 2017 7:08 am Yes exactly this is what I ask from the beginning to change the coding so that they can alert me this way please this indicator and the holy grail
Man,holy grail is far from it and far from any indicator - that is simply a unfulfilling dream that every trader waiting to see in daylight :)
Indicator is just a tool.

Use it only if it can benefit you. Leave it if you don't know how to use it optimally.

Re: Coding Help

309
mladen wrote: Fri May 19, 2017 4:41 pm Yes.
That is happening because of some conditions in the get price function
See the get price function and you shall see why is it so
for some reason (for testing purposes) I wanted to have the prices pr_hab
directly after pr_, so I redefined the price function in the following way:

Code: Select all

#define _prHABF(_prtype) (_prtype>=pr_habclose && _prtype<=pr_habtbiased2)
#define _priceInstances     1
#define _priceInstancesSize 4
double workHa[][_priceInstances*_priceInstancesSize];
double getPrice(int tprice, const double& open[], const double& close[], const double& high[], const double& low[], int i, int instanceNo=0)
{
  if (tprice>=pr_habclose)
   {
      if (ArrayRange(workHa,0)!= Bars) ArrayResize(workHa,Bars); instanceNo*=_priceInstancesSize; int r = Bars-i-1;
         
         //
         //
         //
         //
         //
         
         double haOpen  = (r>0) ? (workHa[r-1][instanceNo+2] + workHa[r-1][instanceNo+3])/2.0 : (open[i]+close[i])/2;;
         double haClose = (open[i]+high[i]+low[i]+close[i]) / 4.0;
         if (_prHABF(tprice))
               if (high[i]!=low[i])
                     haClose = (open[i]+close[i])/2.0+(((close[i]-open[i])/(high[i]-low[i]))*MathAbs((close[i]-open[i])/2.0));
               else  haClose = (open[i]+close[i])/2.0; 
         double haHigh  = fmax(high[i], fmax(haOpen,haClose));
         double haLow   = fmin(low[i] , fmin(haOpen,haClose));

         //
         //
         //
         //
         //
         
         if(haOpen<haClose) { workHa[r][instanceNo+0] = haLow;  workHa[r][instanceNo+1] = haHigh; } 
         else               { workHa[r][instanceNo+0] = haHigh; workHa[r][instanceNo+1] = haLow;  } 
                              workHa[r][instanceNo+2] = haOpen;
                              workHa[r][instanceNo+3] = haClose;
         //
         //
         //
         //
         //
         
         switch (tprice)
         {
            case pr_habclose:    return(haClose);
            case pr_habopen:     return(haOpen);
            case pr_habhigh:     return(haHigh);
            case pr_hablow:      return(haLow);
            case pr_habmedian:   return((haHigh+haLow)/2.0);
            case pr_habmedianb:  return((haOpen+haClose)/2.0);
            case pr_habtypical:  return((haHigh+haLow+haClose)/3.0);
            case pr_habweighted: return((haHigh+haLow+haClose+haClose)/4.0);
            case pr_habaverage:  return((haHigh+haLow+haClose+haOpen)/4.0);
            case pr_habtbiased:
               if (haClose>haOpen)
                     return((haHigh+haClose)/2.0);
               else  return((haLow+haClose)/2.0);        
            case pr_habtbiased2:
               if (haClose>haOpen)  return(haHigh);
               if (haClose<haOpen)  return(haLow);
                                    return(haClose);        
         }
   }
   
   //
   //
   //
   //
   //
   
   switch (tprice)
   {
      case pr_close:     return(close[i]);
      case pr_open:      return(open[i]);
      case pr_high:      return(high[i]);
      case pr_low:       return(low[i]);
      case pr_median:    return((high[i]+low[i])/2.0);
      case pr_medianb:   return((open[i]+close[i])/2.0);
      case pr_typical:   return((high[i]+low[i]+close[i])/3.0);
      case pr_weighted:  return((high[i]+low[i]+close[i]+close[i])/4.0);
      case pr_average:   return((high[i]+low[i]+close[i]+open[i])/4.0);
      case pr_tbiased:   
               if (close[i]>open[i])
                     return((high[i]+close[i])/2.0);
               else  return((low[i]+close[i])/2.0);        
      case pr_tbiased2:   
               if (close[i]>open[i]) return(high[i]);
               if (close[i]<open[i]) return(low[i]);
                                     return(close[i]);        
   }
   return(0);
}

Re: Coding Help

310
anyone has a MT4 platform's indicator that beeps when sudden price change occurs?

what i mean is, this indicator is needed to detect fast price fluctuation, the faster price moves, the faster it beeps, to alert unusual movement, ever come across this indicator?

Alternatively, an indicator that detects unusual volume, could do the job as well, hopefully I can find one that incorporates both requirement.

appreciate all feedback, thanks.


Who is online

Users browsing this forum: dgrl and 14 guests