- You aren't changing the externs, so there is no difference.
- Don't change externs. They are initialized once when the EA is loaded. If you change pairs, TFs, or broker changes other chart values, you go through a deinit/init cycle and your externals will be changed again (+1, +2... or *10 *100...).
I know what you write is the normal case.
As there are (now b600+) two typed of variables: extern (can be changed) and input (cannot be changed) I got a slight hope that the changed variables are printed in the optim.-line.
I asked this first at the service desk but I got a strange answer ("input int somevar -variables cannot be defined in OnInit(). It causes compiler errors". It is correct but not what I asked).
This misunderstanding might be caused by a surprising lack of any edit tool at the service desk: no SRC-, no link-button and no other stuff to edit ones text :(
gooly: This misunderstanding might be caused by a surprising lack of any edit tool at the service desk: no SRC-, no link-button and no other stuff to edit ones text :(
My service desk show the same buttons as this forum. Exactly like Get in touch with developers using Service Desk! - Traders' Forum
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Hi,
If I vary extern variables by the strategy-tester and check them within the EA again and may be re-set them in order not to be trapped by swapping in and out again and again - so I do:
My questions:
1) What will be written in the strategy tester optimization result for the extern variables in the line of the optim.-result:
a) The 'old' values set by the strategy tester or
b) the 'new' values set by the check-up in OnInit()?
a) and b) might depend on when and from where the values are taken and written: before the optim.-run (=> before OnInit might have changed them)
or after the optim-run just like the results of the optim.-run or like OnTester(). In this case the modified values could be taken for the line in the otim.-list.