Hull Moving Average's Trend System - page 12

 

Super Trend Hull Indicator

Forum on trading, automated trading systems and testing trading strategies

Hma Ea

Sergey Golubev, 2020.02.19 18:15

Super Trend Hull EA - expert for MetaTrader 5

Super Trend Hull EA - expert for MetaTrader 5

The EA works on signals from the Super Trend Hull Indicator custom indicator.

New in the trading engine:

  • there can be only one 'market entry' transaction on the bar (this is an internal parameter, it is not placed in the input parameters and this is not related to the ' Only one positions ' parameter)
  • when working in the 'inside signals ' mode (' Search signals, in seconds ' is greater than or equal to '10'), the current bar is bar # 0, when operating in the 'only at the time of birth of a new bar' (' Search signals, in seconds ' less than '10') current bar - bar # 1

 
Scorpion:

Make sure you install the HMA.mq4 in ..\Metatrader 4\experts\indicators folder and HMA Trend EA.mq4 in ..\Metatrader 4\experts

The HMA indicator seems not to be available to download.  I get page not found.  I have other HMA indicators and this one should have a distinctive name to install correctly.

 

Forum on trading, automated trading systems and testing trading strategies

Hma Ea

Sergey Golubev, 2020.02.20 10:37

Super Trend Hull EA 2 - expert for MetaTrader 5

Super Trend Hull EA 2 - expert for MetaTrader 5

This advisor is the development of the first version ( Super Trend Hull EA )

New in version 2 :

  • ' Type trade: ' - type of allowed trade ( Only BUY , Only SELL , BUY and SELL )
  • ' Use time control' - enable / disable the trading time interval. The time interval is set from ' Start Hour ' :: ' Start Minute ' to ' End Hour ' :: ' End Minute '

The EA works on signals from the Super Trend Hull Indicator custom indicator.


 

I have been using the Indicator included with this EA with great success manually trading.  I have attached the indicator to the 1H chart to determine my overall trend direction.  Then I go to the 20m chart and only enter the trades that are in the matching trend direction.  When the trend direction changes on the 1H chart, I close all open trades on the 20m chart and wait for the next signal matching the new trend direction.

If this could be added to the EA it would be very helpful to us all!

 

..thank you, this is a good one...

...this is a very good one, indeed...

I'm using it as a filter, sort of

if((price>trend) && (trend is green)) BUY
if((price<trend) && (trend is red)) SELL
I was wondering of a duration-type study, though...something like 
for(int i=Bars; i>=0; i--){
 durationGreen[i] = ...dunno how to write this, but the count should be of the number of consecutive Green-s 
 durationRed[i] = ...same, consecutive Red-s
}
...after that, get...
 
for(int j=0; j>=0; j--){
AverageDurationGreen = ...my guess is durationGreen[i] could now be averaged with something like
                                                                                                 /* 
                                                                                                 double SMA(double &array[],int per,int bar, int mult=1){
                                                                                                    double Sum = 0;
                                                                                                    for(int i = 0;i < per;i++) Sum += array[bar+(i*mult)];
                                                                                                 return(Sum/per);
                                                                                                 }         */
AverageDurationRed = ...;
}
...and finally...

for(k=0; k<=some_age(number of bars); k++){

if(durationGreen>AverageDurationGreen){bull trend is old
if(durationGreen<AverageDurationGreen){bull trend is young

if(durationRed>AverageDurationRed){bear trend is old
if(durationRed<AverageDurationRed){bear trend is young

...i'm not really sure how this would have to be laid out in code, ...probably I'd have to store the durations somehow into an array, but have the duration start at 1 and end at i when the color changes...please advise

...hopefully you get the logic here, what do you think of such studies, i.e. duration-type...maybe they're called cyclicality, not sure, any thoughts?

 

and another question...

I'm using this indicator I call Drift and it basically

int start(){
   int counted_bars = IndicatorCounted();
   if(counted_bars < 0){return(1);} counted_bars--;
   int limit = Bars - counted_bars;
   if(limit>BarsToLoad && BarsToLoad>0){limit = BarsToLoad;}
   for(int i=limit; i>=0; i--){
      buffer_ema[i] = iMA(Symbol(), PERIOD_H1, 120, 0, MODE_EMA, PRICE_CLOSE, i);
      buffer_sma[i] = iMA(Symbol(), PERIOD_H1, 120, 0, MODE_SMA, PRICE_CLOSE, i);}
   for(int j=limit; j>=0; j--){buffer_drift[j] = (buffer_ema[j]-buffer_sma[j]);}   
   return(0);
}

and that's essentially it, what it does is this

weeklyDrift

how to turn it to something like a colored Hull?  so it would look like this

turnWeeklyDrift2color

because if I just put #property indicator_separate_window (using the HMA.mq4 from here), it just uses the actual price and not around 0 the way Drift should be, so that it shows a change at the right time

WeeklyDriftSlopeColorChange

Reason: