Questions from Beginners MQL5 MT5 MetaTrader 5 - page 768

 
Aleksey Vyazmikin:

This is (close_price-open_price)*Lots*TickPrice - found the value in rubles, if TickPrice is the value per tick in the instrument currency, why divide by TickSize?

Isn't this option true (close_price-open_price)*Lots/USDRUB_TOM?

Once again:

When we calculate on the Sbera futures, we get a profit in rubles, even though the account is in dollars.

The same with Dax, you need to convert profit from euros to dollars.

There's no need to set the ruble, apart from it, there are a dozen of other instruments that have never heard of the ruble.

 
Vitaly Muzichenko:

Once again:

When we settle on Sbera futures, we end up with profits in roubles, even though the account is in dollars.

It is the same with Dax, you need to convert profits from euros to dollars.

There is no need to set up the rouble, apart from it, there are a dozen other instruments that have never heard of the rouble.


Then I can't imagine how you will get the price - the terminal automatically converts all the crosses according to the available quotations...

 
Aleksey Vyazmikin:

Then I don't see how you can get the price - the terminal automatically converts all the crosses using the available quotes...

Right, and there is a conversion function, that's what I need.

I've seen it somewhere andfxsaber seems to have posted it, but I can't find it.

 
Vitaly Muzichenko:

Right, and there is a conversion function, so I need that function.

I've seen it somewhere, and I thinkfxsaber posted it, but I can't find it.

So call him in this thread(@fxsaber), so he can read it and tell me if anything happens...

 
Vitaly Muzichenko:

Once again:

When we settle on Sbera futures, we end up with profits in roubles, even though the account is in dollars.

It is the same with Dax, you need to convert profits from euros to dollars.

There is no need to substitute the rouble, there are a dozen other instruments in addition to it, which have never heard of the rouble.

The easiest variant is to get the currency of profit SYMBOL_CURRENCY_PROFIT and select the corresponding quotation to the dollar. But which currency should be set as the base currency?

 
Artyom Trishkin:

So call him in this thread(@fxsaber), so he may read it and tell us if anything happens...

This recall mechanism has never worked in my case. And frankly, I don't even know how it works for others.

I'm answering because I accidentally read it. But it was an accident.


On topic now. There's your wonderful branch of MQL5 features. Despite some programmer's discontent with it, it still has some useful information...

TickValue has always helped to solve the problem of conversion to account currency. I suggest to write MyOrderCalcProfit by analogy.

Особенности языка mql5, тонкости и приёмы работы
Особенности языка mql5, тонкости и приёмы работы
  • 2017.02.27
  • www.mql5.com
В данной теме будут обсуждаться недокументированные приёмы работы с языком mql5, примеры решения тех, или иных задач...
 
fxsaber:

This recall mechanism has never worked in my case. And frankly, I don't even know how it works for others.

I'm answering because I accidentally read it. But it was an accident.


On topic now. There's your wonderful branch of MQL5 features. Despite some programmer's discontent with it, it still has some useful information...

TickValue has always helped to solve the problem of conversion to account currency. I suggest to write MyOrderCalcProfit by analogy.

Push messages to your mobile phone come in. But this needs to be set up in your profile, with a mobile MT installed - it doesn't matter which 4, or 5.

I haven't got time to gather all useful information into a separate FAQ. But I plan to. As the next builds, some of the earlier usefulnesses lose their relevance - also need to be taken into account when creating a FAQ. All in all, some thoughtful work needs to be done there. No time for that yet.

 
fxsaber:

This recall mechanism has never worked in my case. And frankly, I don't even know how it works for others.

I'm answering because I accidentally read it. But it was an accident.


On topic now. There's your wonderful branch of MQL5 features. Despite some programmer's discontent with it, it still has some useful information...

TickValue has always helped to solve the problem of conversion to account currency. I suggest to write MyOrderCalcProfit by analogy.

Thanks for the reply, but how to make it work I have no idea

 
Vitaly Muzichenko:

Thanks for the answer, but how to make it work, I have no idea

I'll ask again, though - what's it for? In fact, how can it really be used? Or is it possible to trade for dollars on the European exchange?

To calculate the lot as a % of the deposit?

 
Aleksey Vyazmikin:

I'll ask again, though - what's the point? In fact, how can it really be used? Or is it possible to trade in dollars on the European exchange?

To calculate the lot as a % of the deposit?

No, to calculate profit/loss before opening a position, but in the currency of the deposit, not the instrument for the Shanghai exchange.