[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 290

 
rid >> :
Load the history and (write) test the Expert Advisor by "Opening prices" on the timeframe, not less than Н1...

The tester does not emulate ticks but pseudo ticks so there will always be divergences, you just need to watch how critical the divergences are.

If not, then you can trust such tests, and if so, then ouch.

 

Just an EA written "based on opening prices" will show the performance more objectively!

Both on the backtest and on the forward test. Such an EA is much more resistant to different server's tricks and other glitches and fluctuations in quotes.

 

Can you tell me how I can move the moving average vertically?

horizontally, I understand this is MovingShift

double ma;
double ma2;
ma=iMA(NULL,0,MovingPeriod,MovingShift,MODE_EMA,PRICE_HIGH,0);
ma2=iMA(NULL,0,MovingPeriod2,MovingShift,MODE_EMA,PRICE_LOW,0);

and also

// purchase condition
if
Bid=ma prodaza ();

gives an error

at

Bid<ma or larger everything works

but how to do if = I can not find

 
rid >> :

Just an EA written "at opening prices" will show the performance more objectively!

Both on the backtest and on the forward test. Such an EA is much more stable to server's tricks and other glitches and fluctuations in quotes.

Yeah, that's what I'm saying, but it's probably not as clear as yours.

 
asd13 >> :

Can you tell me how I can move the moving average vertically?

horizontally I understand it is MovingShift

Add a coefficient to it and it shifts vertically.

 
granit77 >> :

Thank you for the offer. I liked your last sentence so much that I am returning it to you. My guess is that the library file is not written correctly, there's both #include and #import and a built-in function. It's buttery. Throw it away, read a textbook and write it again.

It turns out that the whole forum can't solve the simplest problem. >> Laughter.

I've removed #import, only #include left, still doesn't work. Details above on the thread.
 
gvi2504 >> :

It turns out that the whole forum can't solve the simplest problem. Laughter.

I removed #import, only #include left still doesn't work. Details above on the thread.

Are you sure that the whole forum is trying to solve the problem, I personally have not seen it and now do not understand the essence of what you ask?

 
Urain >> :

Add a coefficient to it and it will shift vertically.


just a number?

Bid<ma+0.001

like this ?

 
asd13 >> :

just a number?

Bid<ma+0.001

so ?

well, yes

extern double vertical_shift=0.0008;


ma=iMA(NULL,0,MovingPeriod,MovingShift,MODE_EMA,PRICE_HIGH,0)+vertical_shift;

 
gvi2504 >> :

So, the whole forum cannot solve the simplest task. Laughs.

I removed #import, only #include remained, it still doesn't work. Details above on the thread.

You are confusing the notion of "library" (from which functions are extracted using #import) and "include header file" (#include).


Libraries lie in the libraries folder, their sources have the extension *.mq4, like indicators and Expert Advisors. They are compiled into the *.ex4 file (from which the ready functions are then imported into other programs, like this

#import "PointZigZag.ex4"
   double PointZigZag();
#import

In order to compile the library correctly, as a rule, you should first write the #property library directive.

Include header files are used to include ready-made pieces of code into various programs. They are stored in the includes folder, have the *.mqh extension and are included into the text (in the text) of the program using the #include <...> directive; they do not have to be compiled separately, because they are compiled together with the main program.

Reason: