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 have sorted out the synchronization. Please advise if there is a way to freeze the terminal (so it will not accept quotes) while the script or Expert Advisor is working.
This is nonsense.
What's that for?
This is nonsense.
Why is it necessary?
To return to the TS not the bar number, but the opening time of the bar, but then it is a complication for the user
Well here is the first swallow of the multicurrency . I should warn you right away, it's not even a release, the code is not optimized and not fully debugged and there are bound to be bugs in it. If it is not difficult to look at and express your wishes, spit yet too early.
The tester is designed for multicurrency testing of a selected piece of history . All trading functions are taken from 4 . Detailed instructions after completion .
I forgot to add should be open all charts of interest on the same timeframes
First release
Good day to you a class for writing a multicurrency tester inside scripts, indicators or Expert Advisors .The testing is done by opening prices .
Class methods
void Initialization() ;// This method performs zeroization of variables.
void AddSymbol(string Symb) ;// method adding a symbol under test to the tester symbol must be loaded and the terminal must display a chart on the period under test .
bool SetBeginEnd( int Begined, int Ended) ;// set beginning and end of the history under test . Indexation starts from the end according to the standard. That's why the start bar of the history under test is larger than the end bar.
void Visualisation(true); // Enabling visualization of trades .
voidPrinting(true) ;//the output of trade results to the journal is disabled by default.
bool Start(datetime &IndexInstrum[]) this method checks end of the period being tested, and returns the array of bar start times for the instruments being tested . This is necessary to synchronize the testing of different instruments if there are gaps .
int GetBarsNambe(string GSimb,datetime TimeOpen);//returns the bar number by the selected symbol and bar open time.
void Vedenie_v() is the main method where we check all set orders for triggering, closing at stop or profit.
Testing is based on Mql4 rules, i.e. every order has its own life, so we can lock and open opposite orders.
All trading functions are also taken from Mql4. This was done to allow easy adaptation of EAs written in this language.
Please note that method OrderClose_v closes the selected position completely .
OrderCloseBy missing .
double OrderProfit_v( ) calculates profit without leverage, leverage may be different for different tested symbols .
The rest of the code remains unchanged, see documentation.
Order of application
First comes initialization . Then we select history under test . Then we add the instruments under test . Enable visualization if necessary . Enable report output if necessary .
Testing itself takes place inside the loopDo -While .
First comes the mandatory method
aaa=Test.Start(timeopen) ; Returns the end of testing and the array of bar open times for the instruments under test . The dimension of timeopen should coincide with the number of instruments under test . If for example timeopen[0] < 0, then this is a sign of missing in the history, see example .
After that the trading system itself has an unlimited number of bars. nambebars=Test.GetBarsNambe(Symbol(),timeopen[0]) ; where is the symbol of the trading symbol and bar open time. According to this number, you can calculate the values of indicators and set the trading signal according to the logic of TS.
At the very end must go method Vedenie_v .
After the end of testing (exiting the cycle) all trading history is available for all orders . See the description and forum of Mql4
You also need the HeadTester.mqh file to fully overlap the format of the Mql4 trading functions .
Good luck and prosperity .
First release
...
Good luck and prosperity .
Gentlemen PLZ. Somewhere I am slowing down very intensely. The question concerns SOM. If it is possible on a concrete example .
Suppose we have a map consisting of 50X60 neurons (rectangular cells). Let's take a random training vector, its dimension x1={x1,x2,x3,x4,x5}, let's assume the total length of training sample is 5000 vectors. Suppose that the neuron closest to the input vector has index 25,30 - I found it and my child is already studying geometry at school. And then my neural network is not optimized anymore. Actually further a bunch of questions.
1 How to calculate the indices of neurons to be trained at step 1.
2 How to calculate the indices of neurons to be trained at the 2nd step.
3 How many total training steps should there be for input vector X1.
4 If I am stuck with Kohonen's learning rule, I will ask more.
PS Read the article, read the supplementary literature, looked at the codes, the conclusion requires a pendel.
I think I have sorted out the vicinity of the winning neuron within which the learning takes place. Now the next question is.
Is there a criterion of how many times to train neurons in the vicinity? This question is poorly described, I cannot understand if we teach it once and then take the next vector. Or train until the average error is reduced to, say, 5%.
An algorithm for colouring the Kohonen map is needed. There is a great desire not to paint all the maps, but to do with one, respectively, each cluster should assign its own colour. How to do it mind is not.In the figure shows the map I have. The principle of coloring is that a vector with greater length is painted in the lightest colour. Although it is not correct vectors X1 = (1,1) and X2 = (-1,-1) have the same length but belong to different areas.