[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 84
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
As you may have noticed, the real reason is not to look at the code, but to understand how it works. If you trust the Expert Advisor, I wish you success and everything will work out)
I personally invented a bicycle and wrote my owl from scratch, but I know where and how things work and know why they don't work and where to look for errors)
that's about it)
Thank you. I'm already on the right track!))) I had to dig around, but I implemented what I wanted (at least it works somehow :))) ).
Do you know how to set up order number control? I agree, the question probably causes an undisguised smile, turning into laughter in some places)))) But I've only been poking around in mt-sh codes for about a week now. I still do not know all the words )))) smart )))
i can't call myself an expert)))
I'm not quite sure what number control means? If you need to open an order twice under certain conditions, you need to create this condition.
In general, I started writing my own program about half a year ago, and one simple detail has helped me: think about what you want the EA to do or a specific piece of code.
In this case, it may be easier to give an example, and then I will be able to say more specifically what to do and how to do it, if I know the solution:)
example on page 83, task from sergeev
The code worked - thank you. But when experienced people say such words, you begin to wonder what's wrong.
)))
example on page 83, task from sergeev
The code worked - thank you. But when experienced people say such words, you begin to wonder what's wrong.
)))
If the code does what it's supposed to do - then that's it))) what I probably meant was that the code can open orders non-stop, but we did it so that everything opened and deferred once. so it's OK)
If the code does what it's supposed to do, then it's OK)) what I probably meant was that the code can open orders non-stop, but we've done it once per opening and deferring.)
Good. Thank you again.
By the way, I recommend to put something like
if ( OrdersTotal()!=0)
{
BUY = false;
BUY_STOP = false;
BUY_LIMIT = false;
SELL = false;
SELL_STOP = false;
SELL_LIMIT = false;
}
this is a protection in case you have open positions in case you need to restart the client, otherwise it will reopen a whole order batch
i also recommend to ask: think logically about each line - what can prevent it from working.
Here's a slightly outdated version of what I'm currently working on. The author drknn gave me permission to upload it.
He didn't just give permission to put it out there, he openly gave permission to change the code however you want, sell it and even copyright it to whoever you want :)
Just don't get into a fight over rights there :)
via indicator https://docs.mql4.com/ru/indicators/iBandsOnArray
By the way, I recommend to put something like
if ( OrdersTotal()!=0)
{
BUY = false;
....
this is a protection in case you have open positions in case you need to restart the client. otherwise, it will reopen a whole order batch
Thank you - this is an important point. I have solved this problem and added counters (thanks to sergeev).
The code now looks as follows (it does not open unnecessary data when restarting the terminal):
+ appropriate counters.
Thank you.