Errors, bugs, questions - page 2884

 
Denis Kirichenko:

Here's the developer's response from eight years ago. Short and simple :-)

If the profit is not in the deposit currency - it should be sold at bid. If the loss is not in the deposit currency - it needs to be redeemed at ak.

Pay attention to normalisation, I think this is the current error.
I think it is clear that the values are different.

Forum on trading, automated trading systems and strategy testing

Errors, Bugs, Questions

Igor Makanu, 2020.10.17 12:23

What is the difference between these values?

void OnStart()
{
   Print(EnumToString(SYMBOL_TRADE_TICK_VALUE_PROFIT), " = ", SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE_PROFIT));
   Print(EnumToString(SYMBOL_TRADE_TICK_VALUE_LOSS), " = ", SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE_LOSS));
}

2020.10.17 01:42:41.037 tst (EURUSD,H1) SYMBOL_TRADE_TICK_VALUE_PROFIT = 1.0

2020.10.17 01:42:41.037 tst (EURUSD,H1) SYMBOL_TRADE_TICK_VALUE_LOSS = 1.0

2020.10.17 01:44:05.806 tst (USDJPY,H1) SYMBOL_TRADE_TICK_VALUE_PROFIT = 0.9486675963609111

2020.10.17 01:44:05.806 tst (USDJPY,H1) SYMBOL_TRADE_TICK_VALUE_LOSS = 0.9487846069185374

how is it calculated? - on USDJPY it is seen that the values are different

UPD:

UPD, in case anyone knows where SYMBOL_TRADE_TICK_VALUE_PROFIT and SYMBOL_TRADE_TICK_VALUE_LOSS came from



Forum on trading, automated trading systems and testing trading strategies

How does MetaTrader 5 Count Profits?

Renat Fatkhullin, 2012.03.18 17:42

Unfortunately, the question is not clearly stated and there is no output from the proposed example. I don't understand what exactly is listed as an error.

Formulate your question accurately, attach the results and point out where it says there is an error, please.

For example, indicate where there is an error here:

EURGBP  BuyPlus=158.40000000  BuyMinus=-158.48000000  SellPlus=-158.48000000  SellMinus=158.40000000  Profit=1.58398000  Loss=1.58482000

I added SYMBOL_TRADE_TICK_VALUE_PROFIT and SYMBOL_TRADE_TICK_VALUE_LOSS values at the end.

You can see that the profit actually takes into account different values of a tick, depending on profitability or loss of a trade. This is because there is an implicit conversion operation to the deposit currency, when one has to sell (if it is a profit) or buy back (if it is a loss) the obtained financial result in one currency for conversion.


 
Vladimir Karputov:

The old terminal can ONLY be taken from the broker's website.

Where does it say that?

Have you ever seen anything like this - you download one thing and it installs another?

 
Andrey Dik:

Where does it say that?

Have you ever seen anything like this - you download one thing and it installs another?

mt4 is no longer supported by the developer.

 
Roman:

mt4 is no longer supported by the developer.

that's not the answer to my question! my question is why do you download one thing and install another? What does it have to do with whether mt4 is supported by the developers or not?

 
Andrey Dik:

that's not the answer to my question! my question is why do you download one thing and install another? What does it have to do with whether or not MT4 is supported by the developers?

Because the developer decided so.
Mt4 support is discontinued, mt5 support is forced.

 

These are the results for the yen account.

Account currency: JPY

---== USDJPY ==---
   Type: major
   Bid: 104.843
   Ask: 104.863
   Tick value loss: 100.000
   Tick value profit: 100.000

---== EURJPY ==---
   Type: major
   Bid: 123.915
   Ask: 123.978
   Tick value loss: 100.000
   Tick value profit: 100.000

---== EURUSD ==---
   Type: cross
   Bid: 1.18201
   Ask: 1.18229
   Tick value loss: 104.863
   Tick value profit: 104.843
   Major symbol: USDJPY
     Bid: 104.843
     Ask: 104.863

---== USDCHF ==---
   Type: cross
   Bid: 0.90687
   Ask: 0.90742
   Tick value loss: 115.637
   Tick value profit: 115.551
   Major symbol: CHFJPY
     Bid: 115.551
     Ask: 115.637
 
Roman:

Because the developer decided so.
Support for mt4 discontinued, forced offer of mt5.

Virus developers decide what to install for the user, and Metaquotes, I think, just made a mistake, which I warned about, and in the appropriate thread for developers. Are you a developer?
 
Andrey Dik:
The developers of viruses decide what the user must install, while Metaquotes, I think, made a mistake. I have warned about it in the branch appropriate for developers. Are you a developer?

Andrei, I think you're the only one who doesn't know that Metaquotes doesn't support mt4 anymore.
How many times do I have to tell you? So he decided to give me mt5 instead of downloading mt4. What is not clear?

 

These are the results for the franc account.

Account currency: CHF

---== USDJPY ==---
   Type: cross
   Bid: 104.872
   Ask: 104.880
   Tick value loss: 0.865
   Tick value profit: 0.865
   Major symbol: CHFJPY
     Bid: 115.556
     Ask: 115.621

---== EURJPY ==---
   Type: cross
   Bid: 123.965
   Ask: 123.982
   Tick value loss: 0.865
   Tick value profit: 0.865
   Major symbol: CHFJPY
     Bid: 115.556
     Ask: 115.621

---== EURUSD ==---
   Type: cross
   Bid: 1.18210
   Ask: 1.18215
   Tick value loss: 0.90742
   Tick value profit: 0.90720
   Major symbol: USDCHF
     Bid: 0.90720
     Ask: 0.90742

---== USDCHF ==---
   Type: major
   Bid: 0.90720
   Ask: 0.90742
   Tick value loss: 1.00000
   Tick value profit: 1.00000


 

These are the results for the pound account.

Account currency: GBP

---== USDJPY ==---
   Type: cross
   Bid: 104.862
   Ask: 104.869
   Tick value loss: 0.729
   Tick value profit: 0.729
   Major symbol: GBPJPY
     Bid: 137.170
     Ask: 137.206

---== EURJPY ==---
   Type: cross
   Bid: 123.957
   Ask: 123.978
   Tick value loss: 0.729
   Tick value profit: 0.729
   Major symbol: GBPJPY
     Bid: 137.170
     Ask: 137.206

---== EURUSD ==---
   Type: cross
   Bid: 1.18213
   Ask: 1.18218
   Tick value loss: 0.76445
   Tick value profit: 0.76438
   Major symbol: GBPUSD
     Bid: 1.30813
     Ask: 1.30825

---== USDCHF ==---
   Type: cross
   Bid: 0.90719
   Ask: 0.90734
   Tick value loss: 0.84264
   Tick value profit: 0.84238
   Major symbol: GBPCHF
     Bid: 1.18674
     Ask: 1.18711

---== EURGBP ==---
   Type: major
   Bid: 0.90354
   Ask: 0.90372
   Tick value loss: 1.00000
   Tick value profit: 1.00000

---== GBPUSD ==---
   Type: major
   Bid: 1.30813
   Ask: 1.30825
   Tick value loss: 0.76445
   Tick value profit: 0.76438


Reason: