MT4 and MT5 has lots of bugs in documentation. But in MT4 "Client Terminal / Client Terminal Settings / Charts" help you can find:
- Show ask line
Bars in the terminal are built and shown only for Bid prices. However, for opening of long positions and closing of short ones, Ask price is always used. But it is not shown in the chart in any way, it cannot be seen. To control over one's trading activities more attentively, one can enable the "Show Ask line" parameter. After this command has been executed, an additional horizontal line corresponding with Ask price of the last bar will appear in the chart.
Dear Audrius
thanks for your answer, in fact I did activate the line for graphic purpose. But the thing is when I'm trying to program an EA, I encounter problems due to this delta.
For instance, the Moving Average function I'm using is using PRICE_CLOSE and this this price close is definitely the spot close....and not the Ask one. Therefore
the calculation is wrong....
Can't modify iMA (that's internal to the terminal.) Write or have written a new indicator (perhaps extending "Custom Moving Averages.mq4" or "AllAverages")
- warren78: in the iMA command you have the ability to define a custom enum price. That is what I'm trying to use...Perhaps you should read the manual. Where do you see that?[in] Applied price. It can be any of ENUM_APPLIED_PRICE enumeration values.
iMA - Technical Indicators - MQL4 Reference
ENUM_APPLIED_PRICE
ID
Value
Description
PRICE_CLOSE
0
Close price
PRICE_OPEN
1
Open price
PRICE_HIGH
2
The maximum price for the period
PRICE_LOW
3
The minimum price for the period
PRICE_MEDIAN
4
Median price, (high + low)/2
PRICE_TYPICAL
5
Typical price, (high + low + close)/3
PRICE_WEIGHTED
6
Weighted close price, (high + low + close + close)/4
Price Constants - Indicator Constants - Standard Constants, Enumerations and Structures - MQL4 Reference
- warren78: i'd like to use the custom enum price feature of MQL5.
Then start using MT5, you can't do it here.
I' m talking about MQL5

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I'm currently converting my EA from Pro Real Time to MT4. I'm currently an IG customer and I checked on the graph I'm using (GBPJPY M5) that both MT4 and PRT
are displaying the same quotation (ie : Bid, Ask are exactly the same). However when I look in the data window of MT4 and PRT. There are differences....
In fact MT4 seems to use the spot value to show Open Close High and Low information, whereas PRT seems to use Ask value to display Open Close High and Low.
As a consequence I systematically have a delta (Ask-Bid/2) between the MT4 data and PRT data. Then it is a problem for me to start coding my EA with values that are
different....Anyone has an idea about what i should do in MT4 to change this....?