This forum is now read-only. You can discuss you questions on Forums of MQL4.community and MQL5.community
calculating OHLC in MT3 apiBack to topics list |
|
calidragon
2005.04.28 05:09
How do you calculate OHLC with MT3 api ? Is it consistent across all MT3 servers or a broker based setting ? For example, I got tick data : bid/ask 1.2921/1.2924 ... 1.2919/1.2922 with the in between ticks being one of those 2. When I got the server data for that same period it gave me : O = 1.2922999858856201 H = 1.2924000024795532 L = 1.2919000387191773 C = 1.2920999526977539 Obviously, open and close are kinda an average [ but (1.2921 + 1.2924)/2 = 1.29225 - even with rounding error, its still off. but close enough due to the precision needed ] Low is a tad higher than the lowest bid Ask is a tad higher than the highest ask Also, I noticed in MT4 the "price" is the bid. Is this going to remain or will it switch tto anm MT3 style ? Thanks Chris |
