DownloadRe: Trend Indicators for MT4

681
mrtools wrote:Mon Dec 07, 2020 6:00 am Try, hopefully it will be closer to what you need.

PS: If you would like to download the template used on our Daily Downloads with the indicator, see here: Elder Auto Envelopes indicator settings template for MT4.
Hello once again Mr Tools, I have one more request concerning the ReEntry Mode of Elder Envelope you last coded.

I have been missing a few trades of the ReEntry mode when price pulls back to the envelope but it only slightly touches the Envelope then it continues with trend. There will be no ReEntry Signal/Arrow that appears because no candles are formed outside the envelope, thus cant be classified as ReEntry.

I was wondering if you could take into consideration this types of trades so that a signal arrow/ alert can appear to notify me that price has reached the envelope.

I have accompanied request with two images to make it a little bit clearer.

Thank you so much
Attachments


Re: Trend Indicators for MT4

682
Outclear wrote:Thu Feb 18, 2021 2:48 pm

Hello once again Mr Tools, I have one more request concerning the ReEntry Mode of Elder Envelope you last coded.

I have been missing a few trades of the ReEntry mode when price pulls back to the envelope but it only slightly touches the Envelope then it continues with trend. There will be no ReEntry Signal/Arrow that appears because no candles are formed outside the envelope, thus cant be classified as ReEntry.

I was wondering if you could take into consideration this types of trades so that a signal arrow/ alert can appear to notify me that price has reached the envelope.

I have accompanied request with two images to make it a little bit clearer.

Thank you so much
Right now it's using close price <>upper/lower envelope maybe could use low price < lower envelope and high price > upper envelope just not sure how that would work.

Re: Trend Indicators for MT4

683
mrtools wrote:Fri Feb 19, 2021 3:03 am

Right now it's using close price <>upper/lower envelope maybe could use low price < lower envelope and high price > upper envelope just not sure how that would work.
Well yeah, High price : Upper Envelope & Low Price: Lower Envelope was able to incorporate some more trading opportunities (Improvement), however they are a few that are left unnoticed, i.e. when candle price moves out of envelope but later candle closes within the boundary.

NZDUSD 1HR Shows perfectly a potential profitable trade that was missed (High Price: Upper Envelope Settings). See Attached.
Attachments

Re: Trend Indicators for MT4

685
fre_wind wrote:Mon Feb 22, 2021 6:02 am

Hello!
Dear mrtools ,
Could you please check the ICustom call of this indi ?

I'm trying to call it with
double buy_adaptive_Itrend_H1 = iCustom(symbol,timeFrame,"t3 vhf adaptive - itrend (mtf + arrows + alerts + multisymbol).ex4",0,0,"",0,34.0,1.0,1,true,0.5,300,0.283,3,3,true,true,false,true,true,false,false,false,false,"it Arrows1",1.0,1.0,16711680,3937500,221,222,2,2,0,true,0,shift);
double sell_adaptive_Itrend_H1 = iCustom(symbol,timeFrame,"t3 vhf adaptive - itrend (mtf + arrows + alerts + multisymbol).ex4",0,0,"",0,34.0,1.0,1,true,0.5,300,0.283,3,3,true,true,false,true,true,false,false,false,false,"it Arrows1",1.0,1.0,16711680,3937500,221,222,2,2,0,true,1,shift);

and getting this error:
t3 vhf adaptive - itrend (mtf + arrows + alerts + multisymbol).ex4 EURUSD,H1: Alert: You are trying to use renamed indicator
t3 vhf adaptive - itrend (mtf + arrows + alerts + multisymbol).ex4 EURUSD,H1: Alert: The file name must be :t3 vhf adaptive - itrend (mtf + arrows + alerts + multisymbol).ex4
t3 vhf adaptive - itrend (mtf + arrows + alerts + multisymbol).ex4 EURUSD,H1: Alert: contact forex-station.com

even though the filename is exactly as requested : t3 vhf adaptive - itrend (mtf + arrows + alerts + multisymbol).ex4

Could you please check this?

This issue is probably related to app.php/attach/file/3374749
but I've double checked this, and it did not worked out.

Probably you can share the source code if possible, or just kindly verify the ICustom check.
Would be very grateful!
Try something like

Code: Select all

double upVal = iCustom(NULL,0,"T3 vhf adaptive - Itrend (mtf + arrows + alerts + multisymbol)",tf_cu,0,"",T3Price,T3Period,T3Hot,T3Type,Adaptive,T3AdaptingSpeed,LevelBars,LevelFactor,2,barToUse);
double dnVal = iCustom(NULL,0,"T3 vhf adaptive - Itrend (mtf + arrows + alerts + multisymbol)",tf_cu,0,"",T3Price,T3Period,T3Hot,T3Type,Adaptive,T3AdaptingSpeed,LevelBars,LevelFactor,3,barToUse);
then can add your enums

Code: Select all

enum enTimeFrames
      {
         tf_cu  = 0,                                      // Current time frame
         tf_m1  = PERIOD_M1,                              // 1 minute
         tf_m5  = PERIOD_M5,                              // 5 minutes
         tf_m15 = PERIOD_M15,                             // 15 minutes
         tf_m30 = PERIOD_M30,                             // 30 minutes
         tf_h1  = PERIOD_H1,                              // 1 hour
         tf_h4  = PERIOD_H4,                              // 4 hours
         tf_d1  = PERIOD_D1,                              // Daily
         tf_w1  = PERIOD_W1,                              // Weekly
         tf_mn1 = PERIOD_MN1,                             // Monthly
         tf_n1  = -1,                                     // First higher time frame
         tf_n2  = -2,                                     // Second higher time frame
         tf_n3  = -3,                                     // Third higher time frame
         tf_cus = 12345678                                // Custom time frame
      };
      
     enum   enPrices
       {
         pr_close,                                        // Close
         pr_open,                                         // Open
         pr_high,                                         // High
         pr_low,                                          // Low
         pr_median,                                       // Median
         pr_typical,                                      // Typical
         pr_weighted,                                     // Weighted
         pr_average,                                      // Average (high+low+open+close)/4
         pr_medianb,                                      // Average median body (open+close)/2
         pr_tbiased,                                      // Trend biased price
         pr_tbiased2,                                     // Trend biased (extreme) price
         pr_haclose,                                      // Heiken ashi close
         pr_haopen,                                       // Heiken ashi open
         pr_hahigh,                                       // Heiken ashi high
         pr_halow,                                        // Heiken ashi low
         pr_hamedian,                                     // Heiken ashi median
         pr_hatypical,                                    // Heiken ashi typical
         pr_haweighted,                                   // Heiken ashi weighted
         pr_haaverage,                                    // Heiken ashi average
         pr_hamedianb,                                    // Heiken ashi median body
         pr_hatbiased,                                    // Heiken ashi trend biased price
         pr_hatbiased2,                                   // Heiken ashi trend biased (extreme) price
         pr_habclose,                                     // Heiken ashi (better formula) close
         pr_habopen,                                      // Heiken ashi (better formula) open
         pr_habhigh,                                      // Heiken ashi (better formula) high
         pr_hablow,                                       // Heiken ashi (better formula) low
         pr_habmedian,                                    // Heiken ashi (better formula) median
         pr_habtypical,                                   // Heiken ashi (better formula) typical
         pr_habweighted,                                  // Heiken ashi (better formula) weighted
         pr_habaverage,                                   // Heiken ashi (better formula) average
         pr_habmedianb,                                   // Heiken ashi (better formula) median body
         pr_habtbiased,                                   // Heiken ashi (better formula) trend biased price
         pr_habtbiased2                                   // Heiken ashi (better formula) trend biased (extreme) price
      };
      
      enum enT3Type
{
   t3_tillson,                                            // Tim Tillson way of calculation
   t3_fulksmat                                            // Fulks/Matulich way of calculation
}; 
Think that should work


Re: Trend Indicators for MT4

686
mrtools wrote:Mon Feb 22, 2021 8:31 am

Try something like

Code: Select all

double upVal = iCustom(NULL,0,"T3 vhf adaptive - Itrend (mtf + arrows + alerts + multisymbol)",tf_cu,0,"",T3Price,T3Period,T3Hot,T3Type,Adaptive,T3AdaptingSpeed,LevelBars,LevelFactor,2,barToUse);
double dnVal = iCustom(NULL,0,"T3 vhf adaptive - Itrend (mtf + arrows + alerts + multisymbol)",tf_cu,0,"",T3Price,T3Period,T3Hot,T3Type,Adaptive,T3AdaptingSpeed,LevelBars,LevelFactor,3,barToUse);
then can add your enums

Code: Select all

enum enTimeFrames
      {
         tf_cu  = 0,                                      // Current time frame
         tf_m1  = PERIOD_M1,                              // 1 minute
         tf_m5  = PERIOD_M5,                              // 5 minutes
         tf_m15 = PERIOD_M15,                             // 15 minutes
         tf_m30 = PERIOD_M30,                             // 30 minutes
         tf_h1  = PERIOD_H1,                              // 1 hour
         tf_h4  = PERIOD_H4,                              // 4 hours
         tf_d1  = PERIOD_D1,                              // Daily
         tf_w1  = PERIOD_W1,                              // Weekly
         tf_mn1 = PERIOD_MN1,                             // Monthly
         tf_n1  = -1,                                     // First higher time frame
         tf_n2  = -2,                                     // Second higher time frame
         tf_n3  = -3,                                     // Third higher time frame
         tf_cus = 12345678                                // Custom time frame
      };
      
     enum   enPrices
       {
         pr_close,                                        // Close
         pr_open,                                         // Open
         pr_high,                                         // High
         pr_low,                                          // Low
         pr_median,                                       // Median
         pr_typical,                                      // Typical
         pr_weighted,                                     // Weighted
         pr_average,                                      // Average (high+low+open+close)/4
         pr_medianb,                                      // Average median body (open+close)/2
         pr_tbiased,                                      // Trend biased price
         pr_tbiased2,                                     // Trend biased (extreme) price
         pr_haclose,                                      // Heiken ashi close
         pr_haopen,                                       // Heiken ashi open
         pr_hahigh,                                       // Heiken ashi high
         pr_halow,                                        // Heiken ashi low
         pr_hamedian,                                     // Heiken ashi median
         pr_hatypical,                                    // Heiken ashi typical
         pr_haweighted,                                   // Heiken ashi weighted
         pr_haaverage,                                    // Heiken ashi average
         pr_hamedianb,                                    // Heiken ashi median body
         pr_hatbiased,                                    // Heiken ashi trend biased price
         pr_hatbiased2,                                   // Heiken ashi trend biased (extreme) price
         pr_habclose,                                     // Heiken ashi (better formula) close
         pr_habopen,                                      // Heiken ashi (better formula) open
         pr_habhigh,                                      // Heiken ashi (better formula) high
         pr_hablow,                                       // Heiken ashi (better formula) low
         pr_habmedian,                                    // Heiken ashi (better formula) median
         pr_habtypical,                                   // Heiken ashi (better formula) typical
         pr_habweighted,                                  // Heiken ashi (better formula) weighted
         pr_habaverage,                                   // Heiken ashi (better formula) average
         pr_habmedianb,                                   // Heiken ashi (better formula) median body
         pr_habtbiased,                                   // Heiken ashi (better formula) trend biased price
         pr_habtbiased2                                   // Heiken ashi (better formula) trend biased (extreme) price
      };
      
      enum enT3Type
{
   t3_tillson,                                            // Tim Tillson way of calculation
   t3_fulksmat                                            // Fulks/Matulich way of calculation
}; 
Think that should work
Thank you for reply!
Tried this one ...

Code: Select all

int tf_n1=-1;
int T3Price=0;
double T3Period=34.0;
double T3Hot=1.0;
int T3Type=1;
bool Adaptive=true;
double T3AdaptingSpeed=0.5;
int LevelBars=300;
double LevelFactor=0.283;

double buy_adaptive_Itrend_H1 = iCustom(NULL,0,"my_dev/T3 vhf adaptive - Itrend (mtf + arrows + alerts + multisymbol)",tf_n1,0,"",T3Price,T3Period,T3Hot,T3Type,Adaptive,T3AdaptingSpeed,LevelBars,LevelFactor,0,shift);
double sell_adaptive_Itrend_H1 = iCustom(NULL,0,"my_dev/T3 vhf adaptive - Itrend (mtf + arrows + alerts + multisymbol)",tf_n1,0,"",T3Price,T3Period,T3Hot,T3Type,Adaptive,T3AdaptingSpeed,LevelBars,LevelFactor,1,shift);

but....
still same error

Code: Select all

2021.02.21 23:23:05.219	2009.10.16 17:00:00  T3 vhf adaptive - Itrend (mtf + arrows + alerts + multisymbol) EURUSD,H1: Alert: You are trying to use renamed indicator
2021.02.21 23:23:05.219	2009.10.16 17:00:00  T3 vhf adaptive - Itrend (mtf + arrows + alerts + multisymbol) EURUSD,H1: Alert: The file name must be :t3 vhf adaptive - itrend (mtf + arrows + alerts + multisymbol).ex4
2021.02.21 23:23:05.219	2009.10.16 17:00:00  T3 vhf adaptive - Itrend (mtf + arrows + alerts + multisymbol) EURUSD,H1: Alert: contact forex-station.com

maybe it would be possible to take a look at source code, I could manage this fast then...
Thank you!

Re: Trend Indicators for MT4

687
fre_wind wrote:Mon Feb 22, 2021 9:28 am
still same error Alert: contact forex-station.com

maybe it would be possible to take a look at source code, I could manage this fast then...
Thank you!
The name is not "my_dev/T3 vhf adaptive - Itrend (mtf + arrows + alerts + multisymbol)" it's " T3 vhf adaptive - Itrend (mtf + arrows + alerts + multisymbol) "

Re: Trend Indicators for MT4

688
fre_wind wrote: Mon Feb 22, 2021 9:28 am Alert: You are trying to use renamed indicator
Leave it as it is and it will work properly. The naming protection exists because people download the free code then they fuck around. Next thing you know, it's for sale on the MQL5 Code Base!

Don't touch it. Keep the file name to how it is.

PS: If you're using Firefox, there's a bug in certain versions that will re-name files when you download them. Here's a solution (if that's the case): Firefox re-naming indicator files.
Important: The worst forex brokers of all time 👎

Re: Trend Persistence Rate Indicator MTF - Trend Indicators for MT4

690
Hi All,

Here is an brand new MTF Trend indicator I just put together called the Trend Persistence Rate (TPR) indicator. It is based on the TPR code published by Richard Poster, PhD, in his article, "Trend Strength: Measuring the Duration of a Trend," Technical Analysis of Stocks & Commodities (TASC), February 2021.

As far as I understand, you can use this indicator to filter trades by only taking trades with TPR% levels that are greater than the Lower trigger level so you can play with different values for the Lower trigger level to see what works best for you.

Unfortunately, when I plugged the GetTPR() function into my 28 currency pairs scanner it caused high CPU% usage values so it appears that the GetTPR() function in the indicator needs to be optimized to be more efficient but I couldn't figure out how to do that. I attached the code below. If anyone can optimize it then please do so we can all benefit and please post the optimized code. Thanks.

Here is what it looks like on a chart:



Who is online

Users browsing this forum: ChatGPT [Bot], DotNetDotCom [Bot], Grapeshot [Bot], IBM oBot [Bot], Tbot [Bot] and 97 guests