Download MetaTrader 5

Different formula in MetaEditor

To add comments, please log in or register
3043788 Schreudering
215
3043788 Schreudering  

Hi,

I try to make a EA, but I stuck .

I want to add the formula: (Open+Close+High+Low)/4

It's like the Heiken Ashi bar but the value of it is different.

I attach my tradingsystem (PDF). The profit is good. But when I calculate the formula by my self I lost every time my entry point.

Thanks in advance!

Bastiaan

Files:
qjol
3243
qjol  
iMA(Symbol(), Period(), 1, 0, MODE_SMA, PRICE_WEIGHTED, 0);

will give you the result

Keith Watford
Moderator
9995
Keith Watford  
qjol:

will give you the result


Doesn't PRICE_WEIGHTED use (H+L+C*2)/4 ?
qjol
3243
qjol  

i think it's only if you use greater than 1 period but if you use 1 period it's (H+L+O+C)/4

whroeder1
15042
whroeder1  
GumRai: Doesn't PRICE_WEIGHTED use (H+L+C*2)/4 ?
That's what the doc says Average price, (high + low + close + close)/4
James Hodges
3404
James Hodges  

PRICE_WEIGHTED does not consider Open. Only (H+L+C+C).

It looks like PRICE_OPEN is the only pre-defined identifier of the ENUM_APPLIED_PRICE enumeration that considers the open.

To add comments, please log in or register