[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 13
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
The thing is that the OrderClose() function that closes the order takes the order number as the first parameter, and the order number can only be obtained by calling OrderSelect() on existing orders, so in the general case the closing looks like this...
If OrdersTotal() = 0, i.e., if there are no open orders, then the for loop is immediately finished.
Thanks for the answer, can you write the beginning of the OrderSend function? it should go right after the last brackets????
Thanks for the answer, can you write the beginning of the OrderSend function? it should go right after the last brackets????
Well, here's an example
Can you tell me which function returns the value of the margin level (in percent) for open orders, which is shown in the "Trade" tab ?
In Help, none of the functions listed returns this value.
AccountMargin
AccountFreeMargin
AccountFreeMarginCheck
AccountFreeMarginMode
The Damiani_Volt indicator can be used.
Interesting stuff, thank you.
there it is
Thank you
I don't know why you think I'm angry.
It's just my way of explaining that
by taking any sign of inequality and running
>> in the tester you can get a positive
the result with some level, and it doesn't matter which level
positive or negative. And when asked
whether to take the level with or without the minus,
there's no clear distinction, unfortunately.
I may have made a mistake..........
The issue is that the beginner is asking what he DOES NOT KNOW. This example codes serves to understand the structure (correct structure) of the EA.
And what's embedded in this piece of code is built on a CLASSICAL trading principle. Both the Expert Advisor itself and the code samples are used to study the principles, and not to poke someone or catch him at something....... What I'm asking means that it's not clear. After all, you MUST understand theoretically what and how. And then create, sculpt, invent........
1. this is an error... you have to declare res as int and add another variable of bool type to return the value of success/failure to open the order...
2. I also used one of implementations of Igor's OpenPosition() function earlier, but later changed the function to make it easier to catch and report errors...
the result is the following structure