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

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
I'll post a section of my code later, but I think it would be cooler with checkboxes. how do I write them in mql4?
https://book.mql4.com/ru/variables/arrays
At the end of this section, the principle of using flags is very well described by the example of the fact of forming a new bar. Similarly, we create two variables of the bool type that will indicate the possibility to open trades of a certain type, for example Buy_Allowed and Sell_Allowed. By default, we assign values of true to these variables. If there is a Buy signal, in case of successful position opening we set Buy_Allowed=false; in this case before OrderSend() we add the condition of its execution for Buy deals only if Buy_Allowed==true. When a reverse signal is received, we discard the Buy_Allowed=true flag. The same scheme is used for Sell deals but with the Sell_Allowed flag.
https://book.mql4.com/ru/variables/arrays
At the end of this section the principle of using flags is very well described by the example of the fact of forming a new bar. By analogy, we create two variables of bool type that will indicate permissibility of opening deals of a certain type, for example Buy_Allowed and Sell_Allowed. By default, we assign values of true to these variables. If there is a Buy signal, in case of successful position opening we set Buy_Allowed=false; in this case before OrderSend() we add the condition of its execution for Buy deals only if Buy_Allowed==true. When a reverse signal is received, we discard the Buy_Allowed=true flag. The same scheme is used for Sell deals but with the Sell_Allowed flag.
Thank you. I posted some of the code in the last post.
I have already downloaded my Daydream EA from this site.When I tested it, the maximum lot taken in the test was 0.1 and the balance was 10,000. I tested it with GBPUSD 15 in Meta Trader 4 222.
Second question: what is the "error mismatch" in the test report?
The third question, why can't I get a signal? I have the impression that this is somehow related to the first question, that is, something is glitching in the program. I'm using EURUSD M1 MACD Sample (which comes as standard), I decreased the MACD OpenLevel to 1 and got nothing.
I do not know how to use it.
Thank you, I will educate myself. I posted some of the code in the last post.
Working version of your code. You should not have removed the check (OrderCloseTime()>time) because without it the whole sense would be lost - we are choosing the latest closed order comparing the closing time of each order being searched against the oldest time from the orders found earlier. You also had a condition on ORDprofit, but you can add that yourself. :)
yes i had a condition to prohibit opening in the same direction if the last order had a profit :)
thanks a lot!!!))
Second question: What are "discrepancy errors" in the test report?
It's been asked many times, it's easier for you to search...
I tried to use GBPUSD 15 on a Meta Trader 4 222. What`s interesting, the test with 1 lot on another computer was ok. What`s the trick?
Maybe MT4 on the other computer is attached to the account of another broker, different brokers, different trading conditions... Or maybe the EA determines the lot randomly?) You may need the code of the Expert Advisor, the statements, and you will get an accurate answer.
My impression is that it is somehow related to the first question, i.e., something is glitching in the program. I tried to use EURUSD M1 MACD Sample (which comes as standard), I decreased the MACD OpenLevel to 1 and got nothing.
Look at the tester's log, if you are talking about a tester. Post the set of parameters, and the result of the test EA (where there are no signals). It seems that all your clutches from lack of experience, and not from glitches in program...
One option :
Set the bool variable NeedAlert to true when you start trading.Thank you, and I thought it would not work - like the loop will not work - it turns out I forgot the curly bracket))
Thank you, I will educate myself. I posted some of the code in the last post.
This is about the errors in the tester.........
If anyone knows, please advise.....
What do the numbers 64.37 and 65.37 mean????????????