[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 628
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
for statement without a parameter? - the second is that there are global variables for the EA - not for the terminal, they are described at the very beginning of the code before all functions, including the start() function, as you have written - at every tick the start() function is called, you flagchange = false; and then you try to compare this flag with the previous state, but its state will always be false
If you are just starting to try your hand - take any ready-made Expert Advisor from Kodobase and change the conditions for entering the market to your own - it will be faster.
What is the purpose of the loop?
You mean that the start() function is executed at every tick? Then the loop is really unnecessary.
MarkTrade:
So the start() function is executed at every tick? Then a loop is really unnecessary.https://book.mql4.com/ru/programm/special
Interesting how the girls dance... Standing in unison and singing...
Tested and tested, added/changed functions/conditions/data based on the results, got more or less good results in terms of profitability and drawdown... without optimisation. Reloaded the whole story and it started to plummet, no - Plum, not even - Big Plum...
If before I reloaded quotes' history(I had a preloaded EURUSD history before testing, I reloaded it just in case - I had errors in modeling quality since 2010 for some reason...)... Before reloading the history the Expert Advisor successfully, well almost successfully withstood different back-and-forth tests, successfully traded on three-year history, but after reloading quotes started to have drawdowns two or three times a month and did not work for more than two-three months after the test started ... I didn`t change any conditions, only the history...
It turns out that on the server history is being rewritten? As for centuries in the Soviet Union?
What's the point of it all, then?
The girls dance interestingly... stood up together and sang...
Tried and tested, added/created functions/conditions/data, got more or less good results in terms of profitability and drawdown... without optimisation. I reloaded the entire history and it started to go down, no, it was a BIG BLEEP, not even a BIG BLEEP...
If before reloading quotes history(before testing I had all EURUSD history preloaded, just to be safe I reloaded it, but for some reason I had errors in modeling quality since 2010)... Before reloading the history the Expert Advisor successfully, well almost successfully withstood different back-and-forth tests, successfully traded on three-year history, but after reloading quotes started to have drawdowns two or three times a month and did not work for more than two-three months after the test started ... I haven't changed any conditions, only the history...
It turns out that on the server history is rewritten? As time immemorial in the USSR?
And then the point of all this?
If your MT is still not disconnected from the server then it's time to do it (and do not connect it unnecessarily again) - every time you start tester or optimization, MT gets a spread (etc.) from the server. So, when the spread is 1 pip, everything will be super-awesome, but if at another time it increases to 4-5 - the Expert Advisor will probably start to lose money. Naturally, it is better to optimize at worst conditions, because they are more likely to occur in real trading.
Here's a bit of a rework.
Still doesn't trade :(
If your MT is still not disconnected from the server it is time to do so (and no longer connect it unnecessarily) - every time you run a tester or optimise the MT receives a spread (etc.) from the server. So, when the spread is 1 pip, everything will be super-awesome, but if at another time it increases to 4-5 - the Expert Advisor will probably start to lose money. Naturally, it is better to optimize at worst conditions, because they are more likely to occur in real trading.
It's all clear and long understood... But it's Saturday... Can the spread change today? No... It's probably minimal now, i.e. the best conditions... No... Even with any spread, the EA was trading well... before the history reset.
Well, if you look at the trading progress on the chart, what has changed?
Here's a bit of a rework.
Still not trading :(
There must be an error somewhere in the conditions / logic
because MetaEditor does not have a debugger, so I do this:
add at the end of the code
Comment( "flag= ", flag, " PrevFlag=", PrevFlag, ......);
return(0);
}
and in the visualization mode in the tester at low speed see what changes and what doesn't
Equity drawdown has increased many times over... It turns out that the conditions for opening positions have increased. He actually opens more positions...