[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 31

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
You have to look at the advisor. There's no way to tell.
Guys, can I get help or is this question not for this topic? Art. 29 (at the top)
Open Buy at Ask price, close it at Bid price.
Open Sell at Bid price, close it at Ask price.
Read the rules for trading operations.
But don't forget about slippages, requotes and the like...
Something is wrong .............. I choose one parameter (MA period), set optimization for just one day. It shows a horizontal line on the result chart, although there should be both negative and positive trades. I set any of them to test on the same day (upon which I optimized) and show...- in terminal - "Waiting for update", but in log: 2011.01.28 11:19:16 TestGenerator: no history data 'GBPUSD1'.
No history data. Where is the Expert Advisor located?
There is no historical data. Where does the councillor lie?
Open Buy at Ask price, close it at Bid price.
Open Sell at Bid price, close it at Ask price.
Read the rules of trade operations.
But don't forget about slippages, requotes and so on...
How should I represent it programmatically?
I was also thinking of something else. Take, for example, BUY and jump from it, i.e. set a parameter that will check >= 150, but then I don't know how to implement it, but if the condition is true, then close all open orders, but how to do it programmatically, I have no idea.... I tried through OrderClose, but it did not work.
This is how I see it.
What do you think about it?
Z.I. The code was written quickly, there might be mistakes, but the sense will be clear, in fact the upper part checks the condition, and we need the lower part of the code
.
And the advisor is here: https: //www.mql5.com/ru/forum/131277/page28
Can I attach it as a single file, or do I have to build it as well?
Can I attach it as a single file or do I have to assemble it too?
Yes, of course !
The Expert Advisor works, it is optimised. I only had a problem with the lot size
How do you do it programmatically?
I was also thinking about something else. Take for example BUY and jump from it, i.e. set a parameter that will check >= 150, but then I do not know how to implement it, but if the condition is true, then close all open orders, but how to do it programmatically, I have no idea.... tried through OrderClose, but it did not work.
This is how I see it.
What do you think about it?
Z.I. The code was written quickly, there may be errors, but the meaning will be clear, in fact the upper part checks the condition, and we need the lower part of the code
What can I tell you. All the fishing rods have long been made. If you want to learn how to code, start by reading the tutorial, it contains an example of how to create a ready-made Expert Advisor, and look through ready-made functions for all occasions.
That way, you will be able to write what you need. But if you just want to quickly create here and there, the knowledge will not increase. Of course, they will help you sort out your code and do what you need, but... Do you need it? IMHO of course, not for me to judge.
By the way, I still don't know what you're comparing to and what you're trying to get. 150 says nothing...
- Petya, instruments!?
- 200 !!!
- 200 what???
- What about the instruments???