MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal

Source code library - Expert Advisors, Indicators and Scripts

Read Financial Magazines in MetaTrader 4 and MetaTrader 5!
To post a new code, please log in or register

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2012.01.20 11:22
VQ bars

VQ bars

| English Russian Chinese Spanish Portuguese

Published by:
Nikolay Kositsin
Downloads:
1081
Views:
1482
Rating:
votes: 8
Files:
\MQL5\Include\\MQL5\Indicators\
vqbars.mq5 (8.38 KB)view

Real author:

raff1410

Description:

Trend indicator that sets color dots on a price chart according to a trend direction.

Smoothing algorithms can be selected out of ten possible versions:

  1. SMA - simple moving average;
  2. EMA - exponential moving average;
  3. SMMA - smoothed moving average;
  4. LWMA - linear weighted moving average;
  5. JJMA - JMA adaptive average;
  6. JurX - ultralinear smoothing;
  7. ParMA - parabolic smoothing;
  8. T3 - Tillson's multiple exponential smoothing;
  9. VIDYA - smoothing with the use of Tushar Chande's algorithm;
  10. AMA - smoothing with the use of Perry Kaufman's algorithm.

It should be noted that Phase parameters for different smoothing algorithms have completely different meaning. For JMA it is an external Phase variable changing from -100 to +100. For T3 it is a smoothing ratio multiplied by 100 for better visualization, for VIDYA it is a CMO oscillator period and for AMA it is a slow EMA period. In other algorithms these parameters do not affect smoothing. For AMA fast EMA period is a fixed value and is equal to 2 by default. The ratio of raising to the power is also equal to 2 for AMA.

The indicator uses SmoothAlgorithms.mqh library classes (must be copied to the terminal_data_folder\MQL5\Include). The use of the classes was thoroughly described in the article "Averaging Price Series for Intermediate Calculations Without Using Additional Buffers".

This indicator was first implemented in MQL4 and published in Code Base at mql4.com 17.07.2008.

Image:

VQbars

Translated from Russian by MetaQuotes Software Corp.
Original code: http://www.mql5.com/ru/code/709

Last comments | Go to discussion (2)
h5xforum
h5xforum | 22 Jan 2012 at 19:13

I encountered during compiling this indicator 20 errors.  Am I the only one with this problem?  If so, what I am doing wrong?

 

Here it is,

can't open "C:\Users\Owner\AppData\Roaming\MetaQuotes\Terminal\02E1FE87175CB18640D627D59E4CB3DF\MQL5\include\SmoothAlgorithms.mqh" include file VQbars.mq5 35 11
'CXMA' - declaration without type VQbars.mq5 38 1
'CMomentum' - declaration without type VQbars.mq5 39 1
'Smooth_Method' - declaration without type VQbars.mq5 73 7
'XMAO' - undeclared identifier VQbars.mq5 93 21
 'VQMA_Method' - undeclared identifier VQbars.mq5 93 39
'XMAO' - struct or class type expected VQbars.mq5 93 21
'XMAO' - struct or class type expected VQbars.mq5 97 4
'XMAO' - struct or class type expected VQbars.mq5 98 4
'XMAO' - undeclared identifier VQbars.mq5 166 12

 'XMAC' - undeclared identifier VQbars.mq5 167 12
'XMAC' - struct or class type expected VQbars.mq5 167 12
'XMAH' - undeclared identifier VQbars.mq5 168 12
'XMAH' - struct or class type expected VQbars.mq5 168 12
'XMAL' - undeclared identifier VQbars.mq5 169 12

 'XMAL' - undeclared identifier VQbars.mq5 169 12
'XMAL' - struct or class type expected VQbars.mq5 169 12
'MOM' - undeclared identifier VQbars.mq5 170 15
'MOM' - struct or class type expected VQbars.mq5 170 15
20 error(s), 0 warning(s) 21 1

any reply would be appreciated 

h5xforum
h5xforum | 22 Jan 2012 at 21:20
I corrected the problem.  no need to reply