OnTester Events are called in a different instance than OnTick is.
The Strategy Tester will run your EA and test the Market data by utilizing your OnTick function (and other events related to trading)
Then, when a test has completed, the main Tester will call a second instance of your EA and send the OnTester Events to it.
I don't see how you would be able to pass data between the two instances.
There would be an external data exchange required to do this task. (Like a Database).
Dominik Egert #:
OnTester Events are called in a different instance than OnTick is.
The Strategy Tester will run your EA and test the Market data by utilizing your OnTick function (and other events related to trading)
Then, when a test has completed, the main Tester will call a second instance of your EA and send the OnTester Events to it.
I don't see how you would be able to pass data between the two instances.
There would be an external data exchange required to do this task. (Like a Database).
You mean this should be done from the OnTick event, right?
What if I call void OnTick from the OnTester event, would be some way to make it work through the whole SymbolList?
Let's say you open two instances of a text editor. How do you make them sync the inputs?
That's what you are facing.
Dominik Egert #:
Let's say you open two instances of a text editor. How do you make them sync the inputs?
That's what you are facing.
Ok, I tried to apply the code into I was looking for the multipair test operation and I'm near to the solution but still having issues. This is the code:
string SName=SymbolName(s,true); if(ManageAll==false){SName=_Symbol;} else if(Multipair==true){ ushort sep=StringGetCharacter(",",0); StringSplit(SymbolList,sep,symbolList); int TotalSymbols=ArraySize(symbolList); // Get the number of how many symbols are in the symbolList array //ArrayResize(symbolListFinal,numSymbols); // Resize finals symbol list to correct size for(int i=0;i<TotalSymbols;i++){ // Combines postfix, symbol, prefix names together /*symbolListFinal[i]=symbolPrefix+symbolList[i]+symbolSuffix; if(NewBar(symbolListFinal[i])){ Trade(symbolListFinal[i]); }*/ SName=symbolList[i]; // Here I'm trying to get the input list as operation symbol with testing purpose. } }
Trying to test on 3 different pairs (EURUSD/GBPUSD/EURGBP) from EURUSD chart, the advisor is only trading EURGBP.
This means it's only trading the last symbol from the list, some help on this matter?
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 there community, I'd like to take a step forward into my coding knowledge with your well appreciated help.
The main idea besides on the possibility of taking multipair tests through the 'SymbolList' input, I've been checking some samples but still need some help to fit this into my own way of coding.
As this is intended just for testing purpose, I'm trying to fit the proper lines into the OnTesterPass void but don't even know how or if it's correct. By this template you can see how I'm trying to make this work:
Along the inputs you can see the ManageAll function which's fair implemented into the OnTick event, then I wrote the Multipair testing option with its correspondant 'SymbolList'.
Then, into the code, used the OnTesterPass function with the hope to call the OnTick event from the specified symbols.
Still have not the proper advisor but just for educational purpose, any help is welcome.