The difference between the order ticket number on the real hedging account and demo hedging account MT5 - page 2
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Where? I have not seen your MQL5 code.
please scroll up
please scroll up
It's just a piece. This is not a code, but a piece of a program.
There is no variable initialization in the provided stub ...
It's just a piece. This is not a code, but a piece of a program.
There is no variable initialization in the provided stub ...
but this is the code I use for tracking ticket.
The others are not related to tracking tickets.
With the same code, tracking results can differ between demo and real
but this is the code I use for tracking ticket.
The others are not related to tracking tickets.
With the same code, tracking results can differ between demo and real
All the code is needed to show your error.
I am not a telepathic person, but I suppose: you do not initialize variables, you do not reset variables, you confuse price and ticket, you confuse up and down. But this is all I only assume - since you did not show all the code.
If you do not show the entire code, then you will be left alone with your mistake.
All the code is needed to show your error.
I am not a telepathic person, but I suppose: you do not initialize variables, you do not reset variables, you confuse price and ticket, you confuse up and down. But this is all I only assume - since you did not show all the code.
If you do not show the entire code, then you will be left alone with your mistake.
Thank's Vladimir, The problem of confusion about up and down, if that's the problem I just question why the results on the demo account can be the same, while on the real account it can be negative, even though it uses the same code.
by the ways, if you want to see the complete code, I use the reference from this https://www.mql5.com/en/code/27440
I only changed the following 1 line code:
tk=(int)m_position.Ticket(); CHANGE TO: tk=m_position.Ticket();
Thank's Vladimir dan Amando for Already taking the time to discuss with me on this topic, I wish you always healthy and prosperous
Thank's Vladimir, The problem of confusion about up and down, if that's the problem I just question why the results on the demo account can be the same, while on the real account it can be negative, even though it uses the same code.
by the ways, if you want to see the complete code, I use the reference from this https://www.mql5.com/en/code/27440
You gave a link to clean code. I want to see your dirty code - the code in which you made mistakes. You obviously made some changes, but you made a bunch of mistakes.
My advice: fix all your mistakes. And post your code.
I only changed the following 1 line code:
Thank's Vladimir dan Amando for Already taking the time to discuss with me on this topic, I wish you always healthy and prosperous
This is just one mistake. Here's another error:
and I think you have made mistakes in many places.
This is just one mistake. Here's another error:
and I think you have made mistakes in many places.
Thank you Vladimir, I have corrected the mistakes you pointed out.
And frankly, I didn't think that adding (int) would change the result between demo and real.
It would be nice if the demo account can run properly and it should be on a real account. The consistency between real and demo should be the same.
So if the demo doesn't work, it's the same in real, and vice versa.
Due to the inconsistency between demo and real results that makes many people doubt an expert advisor.
Thank you Vladimir, I have corrected the mistakes you pointed out.
And frankly, I didn't think that adding (int) would change the result between demo and real.
It would be nice if the demo account can run properly and it should be on a real account. The consistency between real and demo should be the same.
So if the demo doesn't work, it's the same in real, and vice versa.
Due to the inconsistency between demo and real results that makes many people doubt an expert advisor.
You still haven't understood anything: trade servers work WITHOUT ERRORS. And here you write with ERRORS. That is, the problem is in you. Remember: this is a technical forum and if you are trying to blame MetaQuotes - be prepared to prepare hard evidence.