[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 619

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
rigonich
Well, it's finally starting to make sense. So, the short strings in curly braces are function calls, and the functions themselves need to be placed somewhere.
Now in order.
I add a call of the first function to the init, I do it immediately after starting the init function, i.e. just like this, it will be correct, right?
Similarly, I add the call of the second function to the start block. If I do this immediately after the calculation of the variables, would this be correct? For example like this:
Are these first 2 steps correct?
Well, I actually told him thanks for that right away.Almost. In the inite remove the first { that you had before inserting the call, in the start -- both{} before and after the call. Now you only need to copy the function code, put it after all your EA code and compile the EA.
Sorry, my mistake, it's hard when there's no code in front of my eyes.There you go.
rigonich
I removed the brackets to leave an even number of brackets. That is, both functions are inserted without curly brackets.
The result is as follows:
Then after all the EA code I inserted
I take it so, after the last curly bracket, in fact, separately from the EA. Is it correct?
If it's right, then this is what you get after compilation:
If the code were short, I would post it here and all my problems would be solved quickly. BUT the EA has 1700 lines, plus 3 more external indicators, in which most of the calculation is done... So only by mail, but it's obviously not done for free anymore.rigonich
I removed the brackets to leave an even number of brackets. That is, both functions are inserted without curly brackets.
The result is as follows:
Then after all the EA code I inserted
I take it so, after the last curly bracket, in fact, separately from the EA. Is it correct?
If it's right, then this is what you get after compilation:
These warnings say that the function and variable in your EA have already been defined before. see if you forgot to delete the code you inserted before? if not -- send me the owl code and I'll paste the functions into it for you.
Exactly. You must first take the ticket of the last closed position GetTicketLastPos , and then use the standard functions to take out what you need from this ticket.
Thank you.
Darn... there's no such function as GetTicketLastPos,
there isa GetTicketLastPos ticket for the last open position...
rigonich
I removed the brackets to leave an even number of brackets. That is, both functions are inserted without curly brackets.
The result is as follows:
Then after all the EA code I inserted
I take it so, after the last curly bracket, in fact, separately from the EA. Is it correct?
If it's right, then this is what you get after compilation:
If the code were short, I would have posted it here and all my problems would have been solved quickly. BUT the EA has 1700 lines, plus 3 more external indicators, in which most of the calculation is done... So only by mail, but it's obviously not done for free anymore.I think this makes more sense:
crap...there is no such function asa ticket for the last closed position,
there isa GetTicketLastPos ticket for the last open position...
the ticket of the last closed position is in the history.
Maybe there really is one left somewhere.
I inserted it into another, clean EA, which didn't have my experiments, and it gave out other errors:
Anyway, I email ed
I'm looking carefully - I've done exactly as you've written.
But I have no return or deinit in my EA. Is it all right? I still get errors.
I'm looking carefully - I've done exactly as you've written.
But I have no return or deinit in my EA. Is it all right? I still get errors.
In my post, there's no cussing.
the last closed ticket is in history.
Can you teach me how to access the history?
how do I get the last ticket out of there?