![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
...
p.s. those who tell me to use standard libraries please don't bother, I like to know what my expert is doing and not hope it doesn't flatten out later
I've been trying to do this for the last 6 hours and I'm inclined to think it's impossible
I won't use any of the standard ones, if you'll excuse me...
I've been trying to do this for the last 6 hours and I'm inclined to think it's impossible
I won't use anything standard, if you'll excuse me...
What is it about standard libraries that scares you so much? Look what is in the file Trade.mqh:
Function to open a position:
//---
You should agree that it is not that much different from what you are trying to do. Pay attention to function ClearStructures(). If the stops need to be set after the position has been opened, then the following function will help you with this:
//---
It is simple and everything works. And then you can add/change/experiment as you see fit.
I've been trying to do this for the last 6 hours and I'm inclined to think it's impossible
I won't use any of the standard ones, if you'll excuse me...
Especially for you:
To touch the unknown, simply insert this code into the script, compile, and then put the cursor on Buy and press Alt + G.
You will start to travel through the innards of all libraries. At the same time look at error handling.
Especially for you:
To touch the unknown, simply insert this code into the script, compile it, then place the cursor on Buy and press Alt+G.
You will start to travel through the innards of all libraries. At the same time look at error handling.
"Yeah, baby!"
You can even voice the above and everything will be fine. )))I take it there is no other way to do this, is there?
#include <trade\trade.mqh>
I take it there is no other way to do this, is there?
That's what I'm doing))... 6th hour... and I can't figure out where the error is
the reluctance to use standard libraries is due to the fact that flags and global variables are used within functions, and it doesn't seem reasonable to take apart trade.mqh and other parts
That's what I'm doing))... 6th hour... and I can't figure out where the error is
I don't want to use standard libraries because flags and global variables are used within functions, and it doesn't seem reasonable to break down trade.mqh and other functions by parts
On what server and what symbol are you trying?
I ran your code on MetaQuotes-Demo and the transaction was successful:
MetaQuotes-Demo
Login: 1219233
EURUSD
I have just tried it on the pound, same story. no stops. i do everything in the tester
Build 655 (if it helps)