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
If I could just get a little more direction, I'd be fine! Everyone says write the codes, write the codes. I couldn't agree more! There's a way out! I need some exercises to practice!!! If someone had given them to me and I had written them and showed them to them for verification, I would have been able to write five codes by myself!
If I could just get a little more direction, I'd be fine! Everyone says write the codes, write the codes. I couldn't agree more! There's a way out! I need some exercises to practice!!! If someone gave them to me, I would write them and show them to check them.
So here on the forum there are topics like "I'll write something for free", that's the problem.
OK, here's the challenge. Write an advisor. Is in the market all the time. Opens sell, buy, sell, etc. The type of the first order is arbitrary. There is a SL and TP to each order. It should be placed in the entry parameters. As soon as there are no orders in the market, this EA checks the type of the last closed order and places the opposite order at the current price. When testing in the tester/demo there should be no errors. Lot - minimum for the account.
Write and I will check it. If it doesn't work by code - just even write your thoughts, how would you think, solving this problem. Where would you start, etc.
Please check what's wrong with the errors, I can't find anywhere.
OnInit() has no closing parenthesis.
Please post the code instead of an image - it's hard to compile a picture.)
Please see what's wrong with the errors, I can't seem to find where.
Hello! I don't quite understand where to write void, where to write simply return; where return(0), when I should write simply OnTicK(). I used to write int start() everything was clear. Now everything is mixed up, with this fucking update.... I'm learning by Kovalev, but it's outdated, what should I do? I can't ask anyone, they were almost born with this knowledge! How can I learn the whole thing......................
If the function starts with void, it does not return values, so exit with return.
In almost all other cases, you need to apply reurn(x), where x is the value returned by the function.
The template for the Expert Advisor has three functions in its simplest form:
int OnInit()
{
return(INIT_SUCCEEDED);
}
void OnDeinit(const int reason)
{
}
void OnTick()
{
}
Template for an advisor
int OnInit()
{
return(INIT_SUCCEEDED);
}
void OnDeinit(const int reason)
{
}
void OnTick()
{
}