I'm not quite sure what you want to say with this preset. In my opinion, you want to get a set of functions that will calculate profit and mark entry/stop points on the chart at the same time? And the decision engine will be different for each of them?
And a couple of tips:
extern int BeginYear=2002
better to be replaced by
extern string BeginDate="2002.01.01 18:00"
- it is possible to work immediately with a construction of the type
Time[i] > StrToTime(BeginDate)
Yes and probably things like
double myOrderOpenPrice=0.0; double myOrderLots=0.0;
would also be more convenient to store as
#define LOTS 0; #define OPEN_PRICE 1; double MyOrder[2] = {0.0, 0.0}; ..................... MyOrder[OPEN_PRICE] = Open[i]; .....................
but that's just the little things...
?
#define LOTS 0;
This is the input variable for the tester.
Where did this come from?
#define OPEN_PRICE 1;
Have you noticed that all these variables (which might be better defined by functions)
double myOrderOpenPrice=0.0; double myOrderLots=0.0;
Are twins of the built in mql-4. I wrote that the goal is for our tester and the embedded tester to understand the
EA with minimal rework.
The decision engine is the EA code. And it will be easily integrated into this EA. And the engine of the tester is functions that I suggest
to "overrid" - i.e. we take the standard built-in function, for example OrderSend(), and using it, write a full similar function - myOrderSend(). And so on.
I will write this function tonight to make it clearer.
You have to be more thorough, more thorough... :)
This appeared not long ago. When transferring text from MQL, the Russian letters appear in this way. The same thing FronPage does with Russian letters.
and I'll post the link.
can't you erase the rubbish?
It's impossible to watch.
It must be a glitch of forum, hosting or MT when copying scripts with Russian text.
I have spent a couple of weeks on such tests. At first glance it seems simple. You get a set of standard functions and go.
But this set is nothing but a seed: opening/closing, profit/loss calculation, drawing arrows/dashes.
The main and most important is the algorithm of opening/closing, which, say, has already been described in some Expert Advisor. You cannot drag and drop this algorithm
in its entirety. You can only do it in parts. And then tracking "error-free" of the resulting code... Plus, all sorts of twists and turns associated with this process...
all sorts of tinkering... In short, we end up writing a separate program on the same subject from scratch for the second time. After all that, in 1 second you get
either an unsatisfactory result, or the arrows are in the wrong place, or closing in the wrong places. Then you go back to the program text and try again...
Your brain works instead of a debugger, you turn into a monitor for a while... Eventually, on the third day, the test runs
seems fine, but you become convinced that the strategy is "not good". And at this point, that's pretty much it! Because testing the next strategy in this way
there is no desire at all. Why have I written all this? The idea is appealing. And in principle, it works. But, believe me, it's not something
it's not going to work. If we're talking about a template, it has to be a very fundamental template, i.e. a very decent, well thought-out design. In general,
the programme is not the easiest. And if someone after reading this opus will not break a spear in the framework of the described, ie use this my
If someone uses my little, but nonetheless practical experience and moves on without wasting time, something may work out. Then all those who are suffering
(myself included) will chip in and build a monument to the author. :)
to use native Expert Advisors with some cosmetic modifications. The first "victim" is MACD_sample.mq4 .
It's impossible to watch.
It must be a glitch of forum, hosting or MT when copying scripts with Russian text.
"Garbage" was removed. Programmers probably know how boring it is to write (comments) :).
Does anyone know - I have correctly defined these constants based on standard?
int myOP_BUY=0; int myOP_SELL=1; int myOP_BUYLIMIT=2; int myOP_BUYSTOP=3; int myOP_SELLLIMIT=4; int myOP_SELLSTOP=5;
Meaning specific values.
int myOP_BUY=OP_BUY; int myOP_SELL=OP_SELL; int myOP_BUYLIMIT=OP_BUYLIMIT; int myOP_BUYSTOP=OP_BUYSTOP; int myOP_SELLLIMIT=OP_SELLLIMIT; int myOP_SELLSTOP=OP_SELLSTOP;
However, I don't know the compiler's reaction beforehand, will it let the trade constants in the indicator body through or not?
Most likely, it will.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
The template is written, it's necessary to implement trading functions by writing your own functions.
Who is good at it - join us. Trading functions through array manipulation. Also we need an expert in drawing of objects on the chart - use arrows/drawings to represent open, stop and take profit levels.
Also we need to organize the output of order history and numeric series in a file for opening charts in Excel. In general, everything is very serious :)
I have thought of everything in principle, but I am not a universalist.
I can suggest ideas, if someone would like to. Besides, it is possible that self-made variant in some cases of optimization by performance will be able to surpass built one.