Older items - page 2

 
Alexey Volchanskiy:
I even think this was used on MT4 versions < 600
http://forex-ratings.ru/forex-brokers/4digits-forex-brokers.php
Брокеры Форекс 2018 с четырехзначными котировками - Рейтинг брокеров Форекс на Forex-ratings.ru
Брокеры Форекс 2018 с четырехзначными котировками - Рейтинг брокеров Форекс на Forex-ratings.ru
  • forex-ratings.ru
В настоящее время различные брокеры предлагают торговлю с разной точностью значения котировок. Если Вас больше устраивает система котирования с так называемыми, старыми пунктами, следует выбирать брокерскую компанию из списка брокеры с четырехзначными котировками. Существенной разницы между новыми и старыми системами котирования нет, однако...
 
And what, I don't know about 4-digit brokers, post to what? They've all been 4-digit for a long time.
 
Alexey Volchanskiy:
And what, I don't know about 4-digit brokers, post to what? They' ve all been 4-digit for a long time.

They are all 4-digit even now.


I was surprised to see that the EUN accounts on the website are also written as 4-digit, but the quotes in the terminal are 5-digit.


 
Alexey Viktorov:

They are all 4-digit even now.


I was surprised to see that the ECNs on the website are written as 4-digit, but the quotes in the terminal are 5-digit.


What they write on the site, no one cares. They write zero spreads there too.) They are interested in the real terminal.

 

The confusion arose because the term "point" most traders mean 0.0001 for major instruments (EURUSD, GBPUSD, USDCHF, USDJPY). In MQL4 and MQL5, a point is the minimum unit of a symbol price, obtained by the Point() function. As a result, the programmer writes - 5 * Point() expecting to receive 5 points, but on 5-unit accounts, he or she receives 0.5 points.

The check provided by the topicstarter works only in particular cases. It cannot be used universally. The way out is to allow the user to choose which points they have in mind when setting up an EA. If we are referring to the "old" points on instruments with the accuracy of 5 digits, the Expert Advisor must multiply the values of all parameters relating to points by 10. If we mean the "new" points or instruments with the accuracy of 4 digits, do not do anything. That is, this must be controlled by the user himself, while the Expert Advisor only multiplies or does not multiply the values depending on the action option specified by the user.

 
Ihor Herasko:

The confusion arose because the term "point" most traders mean 0.0001 for major instruments (EURUSD, GBPUSD, USDCHF, USDJPY). In MQL4 and MQL5, a point is the minimum unit of a symbol price, obtained by the Point() function. As a result, the programmer writes - 5 * Point() expecting to receive 5 points, but on 5-unit accounts, he or she receives 0.5 points.

The check provided by the topicstarter works only in particular cases. It cannot be used universally. The way out is to allow the user to choose which points they have in mind when setting up an EA. If we are referring to the "old" points on instruments with the accuracy of 5 digits, the Expert Advisor must multiply the values of all parameters relating to points by 10. If we mean the "new" points or instruments with the accuracy of 4 digits, do not do anything. That is, this must be controlled by the user himself, while the Expert Advisor only multiplies or does not multiply the values depending on the action option specified by the user.

It's the programmer who doesn't like to read the help )) There is a

SYMBOL_POINT

Value of a single point

и

SYMBOL_TRADE_TICK_SIZE

Minimum price change


But I calculate in Value_in_currency_deposit / 1_lot, this is the most universal way. Here is a snippet

enum ECalcPointMode
{
    EInPoint,           //В пунктах
    EInQuoteInstrument, //В котировке инструмента
    EInPrice4Lot,       //В валюте депозита/лот
};
input ECalcPointMode    CalcPointMode   = EInPoint; 
input double            StopLoss        = 400;

double  ExtStopLoss;

int OnInit()
{
    switch(CalcPointMode)
    {
    case EInPoint:              
    //СЛ и ТП заданы в пунктах.
        ExtStopLoss = StopLoss * SymbolInfo.Point();
        ExtTakeProfit = TakeProfit * SymbolInfo.Point();
        break;
    case EInQuoteInstrument:    
    //СЛ и ТП заданы в котировке инструмента, например 0.00500 == 500 пунктов для 5-значной котировки или 50 п. для 4-х значной/
        ExtStopLoss = StopLoss;
        ExtTakeProfit = TakeProfit;
        break;
    case EInPrice4Lot:          
    //СЛ и ТП заданы в наиболее универсальном варианте, в единицах валюты депозита для одного лота текущего инструмента/
    //Например, для пары EURUSD и валюты депозита USD, ТП = $500/лот для лота 100000 ед. базовой валюты пары EUR, будет равен 0.00500 в котировке EURUSD.
        if(!Price2Quote(ExtStopLoss, StopLoss, _Symbol))
        {
            Alert("OnInit: function Price2Quote returns false", "  StopLoss=", DoubleToString(StopLoss, _Digits), "  Symbol=", _Symbol);
            return INIT_PARAMETERS_INCORRECT;
        }
 
Alexey Volchanskiy:

It's the programmer who doesn't like to read the help )) There is

SYMBOL_POINT

The value of a single point

и

SYMBOL_TRADE_TICK_SIZE

Minimum price change

Unfortunately, I don't understand what you're trying to say. How does minimum price change(not measurement) relate to the problem at hand?

 
Ihor Herasko:

Unfortunately, I don't understand what you mean by this. How does minimal price change(not measurement) relate to the problem at hand?

This is the value that should be considered as a point
 
Alexey Volchanskiy:
This is the value to be considered as the point

Which one? The price change? So in euros it is equal to the value returned by Point().

 
Ihor Herasko:

Which one? The price change? So in euros it is equal to the value returned by Point().

Yes. But there are other currencies, futures, stocks, options besides the euro. What are we talking about now - proper patsy point concepts or how to properly calculate the real price range, e.g. Real_SL = price + SL? I said about my method, all these points are bogus.
Reason: