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
Good afternoon!
After upgrading to 420 release I started to test my EA and noticed that it started "losing" for some reason. I analyzed my trades and noticed that stop loss is triggered at non-existent prices. For example, I set stop loss at 1.06520 on EURUSD, but it works, although the maximal price is 1.05920. When I look further, I see a lot of such deals. Take Profit is triggered by the same principle (at non-existing prices) - the delta is the same - 600 points. In the tester on the chart the up and down arrows "hang" in the air, far from bars.
A screenshot is attached.
Run tests on MetaQuotes-Demo, please. Alpari has a blatantly wrong (in spreads) chart history.
A couple of questions are of interest.
1. If indicators are used in the strategy tester, how does the system work? First, all indicators for which handles are calculated and only then OnTick is launched?
2. If yes, it would be good to start OnTick first and then run a command to calculate the attached indicators. Thus, for example I don't need to calculate indicators on every five-digit tick, but only on four-digit. When I start OnTick, I check the current and previous price and decide whether to start calculation of indicators or not.
Because if there are a lot of them and they are quite "heavy", they consume resources in optimization mode...
Although, you may try to create handles in ontick and delete indicators at the end and at the next start of ontick (if necessary) create handles again - and it's not clear whether it will improve performance...
A couple of questions are of interest.
1. If indicators are used in the strategy tester, how does the system work? First, all indicators for which handles are calculated and only then OnTick is run?
Yes. The more general answer - all indicators values are calculated before each call of the event handler:
2. If yes, then it would be very useful to run OnTick first and then run the calculation of attached indicators with this command. For example I don't need to calculate indicators on every five-digit tick, but only on four-digit. When I start OnTick I check the current and previous price and decide whether to start calculation of indicators or not.
Because if there are a lot of them and they are quite "heavy", they eat up resources in optimisation mode...
You can't do that. You can use faster tick generation modes for testing:
You can't do it this way. You can use faster tick generation modes for testing:
Help out, data conversion functions don't want to work, wrote a simple script to test it. Build 420, 64 bit OS.
Help out, data conversion functions don't want to work, wrote a simple script to test it. Build 420, 64 bit OS.
Get rid of the inverted commas at any stage....
How do you do this?
Either make sure they are not initially in the file, or apply an additional function when reading, for example: