Questions from Beginners MQL4 MT4 MetaTrader 4 - page 108

 
STARIJ:

OnTick - conditionally this is a new, fancy name for the old Start function - you should put the cursor on the function name (and any other word) and press F1


Thank you very much for the reply and the tip onF1! As I understand there is no tutorial for new, fancy names and everything should be studied through the reference book, right?

 
Anton80: Thank you very much for the reply and the tip onF1! As I understand there's no tutorial for new, fancy names and everything has to be studied through a reference book, right?

There is a more reliable way - I write simple scripts and use them to check individual points

 
STARIJ:

There is a more reliable way - I write simple scripts and use them to check individual points


Very grateful for the clarification!

 

Good afternoon.

I'm trying to create an include file (*.mqh) named svuForm.

The MQL Wizard easily creates it and puts it in Include folder, it compiles without errors.

In indicator that uses it (sviForm's name) I put line #include <svuForm>.

When compiling an indicator, I get an error:

can't open "C:\Users\Victor\AppData\Roaming\MetaQuotes\Terminal\6FD550DEB09C314A5BB58C5F67757D8B\MQL4\include\svuForm" include file sviForm.mq4 12 11

If you use File -> Open data directory, in the folder C:\Users\Victor\AppData\Roaming\MetaQuotes\Terminal\6FD550DEB09C314A5BB58C5F67757D8B\MQL4\Include

svuForm.mqh file is there and opens without any problems.


What am I doing wrong?


 
sable57fx:

Good afternoon.

I'm trying to create an include file (*.mqh) named svuForm.

The MQL Wizard easily creates it and puts it in Include folder, it compiles without errors.

In indicator that uses it (sviForm's name) I put line #include <svuForm>.

When compiling an indicator, I get an error:

can't open "C:\Users\Victor\AppData\Roaming\MetaQuotes\Terminal\6FD550DEB09C314A5BB58C5F67757D8B\MQL4\include\svuForm" include file sviForm.mq4 12 11

If you use File -> Open data directory, in the folder C:\Users\Victor\AppData\Roaming\MetaQuotes\Terminal\6FD550DEB09C314A5BB58C5F67757D8B\MQL4\Include

svuForm.mqh file is there and opens without any problems.

What am I doing wrong?

1. #include <svuForm.mqh>

2. #include "svuForm.mqh" and place the included file in the folder with the indicator

 
Thanks, got it - didn't specify an extension - assumed it was the default.
 
sable57fx: Thanks, I got it - I didn't specify an extension - I figured it was the default.
Include includes file with absolutely any extension, for example #include <AAA.aaa> is quite acceptable, I checked ...
 

Hello! Help me make the MACD logic

Have a standard code:


MACD_Main = iMACD(NULL, 0, fast_ema_period, slow_ema_period, signal_period, PRICE_CLOSE, MODE_MAIN, i);

MACD_MainPrevious = iMACD(NULL, 0, fast_ema_period, slow_ema_period, signal_period, PRICE_CLOSE, MODE_MAIN, i+1);

//----

MACD_Signal = iMACD(NULL, 0, fast_ema_period, slow_ema_period, signal_period, PRICE_CLOSE, MODE_SIGNAL, i);

MACD_SignalPrevious = iMACD(NULL, 0, fast_ema_period, slow_ema_period, signal_period, PRICE_CLOSE, MODE_SIGNAL, i+1);

//----


help me do the following!!! That when the red line goes over zero up or down there would be some action!


 
sviter-pro: Hi, can you help me with the MACD logicI have a standard code:
MACD_Main = iMACD(NULL, 0, fast_ema_period, slow_ema_period, signal_period, PRICE_CLOSE, MODE_MAIN, i);
MACD_MainPrevious = iMACD(NULL, 0, fast_ema_period, slow_ema_period, signal_period, PRICE_CLOSE, MODE_MAIN, i+1);
//----
MACD_Signal = iMACD(NULL, 0, fast_ema_period, slow_ema_period, signal_period, PRICE_CLOSE, MODE_SIGNAL, i);
MACD_SignalPrevious = iMACD(NULL, 0, fast_ema_period, slow_ema_period, signal_period, PRICE_CLOSE, MODE_SIGNAL, i+1);
//----
help me do the following!!! That when the red line goes over zero up or down there would be some action!

We should probably take 0 and 1 instead of the historical i and i+1 - we are interested in the latest values, the current moment, now. Then three cases are possible in one direction. 1) SignalPrevious < MainPrevious && Signal > Main and 2 more cases: 2) was at the bottom and equalized, 3) were equal and diverged, and 3 more cases in the other direction...

Happy New Year and Happy New Luck! Raise lots of Profits and lots of Loses!!!

 

I will give them here

Magic=0; this is magic number 0 or no magic number

extern differs from input

terminal cannot be started- initialization error 2 or initialization error 4 appears

what is the reason and what is the solution


and last - build a Renco chart

as if the iMA parameter is unequal to the data array from the Renco cube

Reason: