[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 42

 
xruss >> :

Theoretical issues:

1. How to write a function (where to read about it)?

2. With which extension should it be compiled and saved?

3. In which folder do I save it?

4. Will I need to write a separate script to run it (or will it run itself from the Expert Advisor)?

Many thanks to those who didn't pass by my question!))

Look it up in the tutorial. h ttps://book.mql4.com/ru/

About the functions: https://book.mql4.com/ru/basics/functions

 
ikatsko писал(а) >>

See here: https://www.mql5.com/ru/code/mt4/experts

Thank you! >> I'll have a look.

 
bool exit_for=false;
double max_1=0;
double max_2=0;
for(int k=0; k<Bars; k++)
{
	if(	iRSI(Symbol(),0, rsi_period,PRICE_CLOSE, k)<iRSI(Symbol(),0, rsi_period,PRICE_CLOSE, k+1)
		&& iRSI(Symbol(),0, rsi_period,PRICE_CLOSE, k+1)>iRSI(Symbol(),0, rsi_period,PRICE_CLOSE, k+2) 	)
	{
		//Если это первый максимум:
		if( max_1==0)
			max_1=iRSI(Symbol(),0, rsi_period,PRICE_CLOSE, k+1);//Записываем номер бара экстремума
		else
		//Если первый найден, записываем второй
		{	
                        max_2=iRSI(Symbol(),0, rsi_period,PRICE_CLOSE, k+1);
                        exit_for=true;
                } 
	}
        //Выход из цикла, когда найдены оба максимума
        if( exit_for==true) k=Bars+1;  
}
Good afternoon . Please advise. To my question about comparing the tops with RSI after its value exceeds 70, I was asked this solution (code above)

It does not work like this. As a result I get that I look for maxima in history (it finds maxima in previous day), but I need it to wait for fulfillment after this function takes action (like value on 1st bar > 70) ... If this condition is fulfilled (not before the bar > 70, but after) the 1st maci is lower than the 2nd one, then the order is closed

Any tips on what to change.

Thank you
 
alexey999 >> :

No. Thank you, I know how to use Photoshop.

I need such settings to visually separate groups of contracts of one instrument from another, for example. You're discussing "higher settings, EAs...." here on the forum. Can't someone tell me how to change the colour of the row in "Market Watch" ????!!!!

Well pros, hasn't anyone dug into the program settings and know how to do it?!!!!

 

Hello, I read the article My first "grail", tried to reproduce the example given by the method "Ctrl + C Ctrl + V" does not work, the error is "There were 1 passes done during optimization, 1 results have been discarded as insignificant".suggest where to check or how to cure it?

 
Gentlemen Experts! Help......
'MagicNumber' - variable not defined	C:\Program Files\MetaTrader - Alpari\experts\expertCCI_RSI.mq4 (40, 27)
What is this..... When compiling, the meta-editor gave out. The rest of the errors have been cleared by myself. Please....
 
igrok2008 >> :
Gentlemen specialists! Help...... What is it..... At compilation the meta-editor has given out. The rest of the errors were removed by myself. Please....

So along with the errors, I removed the type string:


extern int MagicNumber = 0;


I need to put it back in place.

 

alexey999 писал(а) >>


I need such settings to visually separate, for example, groups of contracts of one instrument from another.


Well pros, hasn't anyone dug into the program settings and known how to do it?!!!!

At the top of the table there is a column name labeled "Symbol". Try clicking on it.

 

Hello. Can you tell me how the visual tester can display charts of other timeframes in parallel with the current one?

 

Dear Mr. programmers, please help me to understand this, I've been puzzling my head for a week.

I have been working with iCustom function,

I cannot figure out how to properly declare an array for importing data from an array and specify a sliding average in it. Simple, averaging method can't figure out external variables, have already read this tutorial. I am interested in examples with Alligator and two moving averages that should be declared twice as different arrays or may be in one array, but what about the settings?

2. The function #include <Variables.mqh> is it necessary to use it? It's better to declare all variables in init ? And what does Variables have to do with logic, there is no reference to it, or I don't understand something.

3.#include <Terminal.mqh> Order Accounting is the same. Please explain the logic in my head is completely messed up.

Thank you in advance.