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
It seems to have worked. I have a minus print for every TakeProfit, and a plus print for every market entry. I am sorry for colloquial slang, but I am completely self-taught and have no one to communicate with on this topic.
And I'm self-taught. Anyway, I was cutting and cutting and cutting the code... If it wasn't for the dialogue with you, I would have found these problems a bit later...
I should add to the code a choice of deal before reading properties.
HistoryDealSelect(trans.deal);
Or to check the success of the choice.
And I'm self-taught. Anyway, I was cutting and cutting and cutting the code... If it wasn't for the dialogue with you I would have found these problems a bit later...
It's always good to talk, and you'll find out later if the conversation is useful or not. Thus, the most talkative people increase minPolus by averaging, but decrease maxPolus. That's a bit of a mouthful.
Are you thinking out loud or is that what you recommend me to do?
With the function
I've read one thing about it, but I don't know how to use it yet
Next task - I invite the knowledgeable to discuss.
How to have a transaction ticket(closed a position on TR) to return a position ticket that was closed by this transaction?
The thing is, I have a structure in which actual positions have to be stored. As they leave the game, they need to be cleaned up.
???
At least it is useful to talk about something, and you will find out later if the conversation is useful or not. So the most talkative people increase the minPolus by averaging, but decrease the maxPolus. That's a bit of a mouthful.
Are you thinking out loud or is that what you recommend me to do?
Not just recommending it, but returning a recently deleted line in my code.
With the function
You have to be careful, I've read a feature there, I don't know how to use it yet.
It depends on where you make the selection. There is no danger of that in OnTradeTransaction. In general, we should get into the habit of selecting it before accessing properties of an order, deal or position.
And do not forget that if after the selection the execution switches to some function and another selection is made in it, then upon return the list will contain the last selected option.
Next task - I invite the knowledgeable to discuss.
How to have a transaction ticket(closed a position on TR) to return a position ticket that was closed by this transaction?
The thing is, I have a structure in which actual positions have to be stored. As they leave the game, they need to be cleaned up.
???
Well, it's quite simple...
It depends on where you make the selection. There is no risk of that in OnTradeTransaction. In fact, we should get into the habit of selecting it before accessing properties of an order, deal or position.
And do not forget that if after the selection the execution goes to some function and it makes another choice, then on return in the list will be that which was selected last.
Man, how to comprehend all this is beyond abstraction for me.
I've just solved the above-mentioned problem with searching for a ticket of a position closed by a known trade - and I immediately requested it from the print, so I went right back to where I started - not all TakeProfits show up in the print.
It's as simple as that...
My God, you've had "my precious" all this time and you've been so modestly silent???
Thank you very much.
I've learned a lot. I could have just reposted it, that's all.
Oh my God, you've had "my precious" all this time and you've been so modestly silent???
Thank you very much.
I learned a lot, but I would have just reposted it and that was it.
Nothing happened. I just wrote it to check and ran it through debugger on historical data. Learn to use the debugger. It's a very useful skill.
I started programming in Excell in so-called VBA (visual VBA for applications) and got to know debugging there. After that it was hard for me to get used to printers to check received values... And when they introduced debugging in mql5 I was as happy as a child that my suffering was over.