Re: Moving Average indicators for MT4

31
mladen wrote:This is the newest version of averages
 

For those that want to use if from custom calls, here is the enum for prices, averages types and time frames

Code: Select all

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
};
enum enMaTypes
{
   ma_adxvma,  // Adxvma
   ma_ahr,     // Ahrens moving average
   ma_alxma,   // Alexander moving average - ALXMA
   ma_dema,    // Double exponential moving average - DEMA
   ma_dsema,   // Double smoothed exponential moving average - DSEMA
   ma_emas,    // Ema derivative - EMAD
   ma_ema,     // Exponential moving average - EMA
   ma_frama,   // Fractal adaptive moving average - FRAMA
   ma_hull,    // Hull moving average - HMA
   ma_ie2,     // IE/2
   ma_ilinr,   // Integral of linear regression slope
   ma_itl,     // Instantaneous trendline
   ma_lagg,    // Laguerre filter
   ma_lead,    // Leader exponential moving average
   ma_linr,    // Linear regression value - LSMA
   ma_lwma,    // Linear weighted moving average - LWMA
   ma_mcg,     // McGinley Dynamic
   ma_mcma,    // McNicholl ema
   ma_nlma,    // Non lag moving average
   ma_pwma,    // Parabolic weighted moving average - PWMA
   ma_rmta,    // Recursive moving trendline - RMTA
   ma_sma,     // Simple moving average - SMA
   ma_sid,     // Simple decycler - SDEC
   ma_sine,    // Sine weighted moving average
   ma_smma,    // Smoothed moving average - SMMA
   ma_smoo,    // Smoother
   ma_ssm,     // Super smoother
   ma_b3p,     // Three pole Ehlers Butterworth
   ma_s3p,     // Three pole Ehlers smoother
   ma_tma,     // Triangular moving average - TMA
   ma_tema,    // Tripple exponential moving average - TEMA
   ma_b2p,     // Two pole Ehlers Butterworth
   ma_s2p,     // Two pole Ehlers smoother
   ma_vema,    // Volume weighted ema - VEMA
   ma_vwma,    // Volume weighted moving average - VWMA
   ma_zldema,  // Zero lag dema
   ma_zlma,    // Zero lag moving average
   ma_zltema   // Zero lag tema
};
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_mb1 = PERIOD_MN1,     // Monthly
   tf_cus = 12345678        // Custom time frame
};
Dear mladen
I really would appreciate if you may add option to change the color of this average indicator when the price close on upper (blue)of lower (red) the calculate average
I really need it
Thanks in advance
Talaat E


Re: Moving Average indicators for MT4

32
talaate wrote: Dear mladen I really would appreciate if you may add option to change the color of this average indicator when the price close on upper (blue)of lower (red) the calculate average I really need it Thanks in advance Talaat E
Sorry, but I do not understand the request
Would you mind explaining a bit more?

Re: Moving Average indicators for MT4

33
mladen wrote:
Sorry, but I do not understand the request
Would you mind explaining a bit more?
Ok mladen
The coloring of the indicator line is changing, as I understand, according to the slope of the line average. What I am looking for is the coloring when the idicator changing not according to the slop of the average but according to the close candle price such that if the candle price closes above the line, the sign, from my point of view, is buy and vice versa. Therefor, the sign of buy or sell will be due to price action in relationship with average. From my point view, according to my little experience, this approach on great factor for my decision for buy or sell especially for averages more than 100 and/or 200.
I hope I am clear

Re: Moving Average indicators for MT4

35
mntiwana wrote:What about lower TFs and MTF formation,when close of bar above/below the line considered as buy sell coloring,and only when any single or 2 bar spikes either side.
Brother
If I am understand you correctly, in mtf the usual repainting will be stop as soon as the higer time is completed which is normal even for sloping changing which also will occure in mtf mode


Re: Moving Average indicators for MT4

36
talaate wrote: Brother If I am understand you correctly, in mtf the usual repainting will be stop as soon as the higer time is completed which is normal even for sloping changing which also will occure in mtf mode
Respectable talaate
what i understand by your above posts,i applied a 150 periods averages white/magenta and then 2 periods blue/orange,this 2 period average doing as you described,if i am right ?
regards
Attachments
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: Moving Average indicators for MT4

37
mntiwana wrote: Respectable talaate
what i understand by your above posts,i applied a 150 periods averages white/magenta and then 2 periods blue/orange,this 2 period average doing as you described,if i am right ?
regards  
Actually i am out home now when i come bach i will read carefully your post to reply since i forgot my reading glass
I hope no spelling mistakes

Re: Moving Average indicators for MT4

38
talaate wrote: Actually i am out home now when i come bach i will read carefully your post to reply since i forgot my reading glass
I hope no spelling mistakes
I don't understand your point from your post. As i said before this option can be used for a value more than 150-200 simple moving average and it help me. So it is not helping other people, it is especial request for me and I know how to use it and I am already using it and making success for my trading work. Simply, if I explained my point such that mladen understand what I meant, please let him decide if he want to do it or not I'll not be sad if not. ?
Regards

Re: Moving Average indicators for MT4

39
talaate wrote: Ok mladen The coloring of the indicator line is changing, as I understand, according to the slope of the line average. What I am looking for is the coloring when the idicator changing not according to the slop of the average but according to the close candle price such that if the candle price closes above the line, the sign, from my point of view, is buy and vice versa. Therefor, the sign of buy or sell will be due to price action in relationship with average. From my point view, according to my little experience, this approach on great factor for my decision for buy or sell especially for averages more than 100 and/or 200. I hope I am clear
Hi Talaate, modified it using close<> the ma for the coloring.


Who is online

Users browsing this forum: ChatGPT [Bot], Grapeshot [Bot], muhammadFarooq2k20, RodrigoRT7, thomdel, Yandex [Bot] and 89 guests