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

 
Fduch >> :

That's about right:

Very, very grateful. Thank you.

But it's a bit unclear how to compare these maxima. It turns out that after you get the bar numbers.

of 2 extrema, we should take RSI values from these bars again and compare them?

 
Itso >> :

Acceptable, although I would put more brackets - operations have different priorities in different languages - so as not to think about trivialities - something like:

>> thank you for your answer.

 
amur >> :

Very, very much appreciated. Thank you. (chuckles)

But it's a bit unclear how to compare these maxima. It turns out that we need to get the numbers of bars

To equate two extrema, take RSI values again, but from these bars and compare?

We may do it immediately - we need to equate max_1, max_2 with RSI values. But then the data type should be double, not int:

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;  
}
 
Fduch >> :

You can also do it immediately: equate max_1, max_2 to RSI values. But then data type must be double, not int:

Thank you. I will integrate it into my Expert Advisor. >> Thanks again.

 

error points to } in the middle of the EA code. writes that a left parenthesis is expected, and the 2nd error writes that a comma is expected. Question:

1. Am I correctly looking for the error above, not below the code?

2. What could be wrong in this case, apart from the birds?

 
xruss >> :

error points to } in the middle of the EA code. writes that a left parenthesis is expected, and the 2nd error writes that a comma is expected. Question:

1. Am I correctly looking for the error above, not below the code?

2. What could be wrong in this case, apart from the birds?

You have to check everything, very carefully, every line. I get this when I miss a parenthesis or a semicolon.

 

The question will not look silly in this thread:

How do I deposit/withdraw money from real money?

I can't remember how to deposit money from WebMoney to real money...

 

please advise, there is something of a crisis in my mind.

MM gives permission to open an order with 2.2 risk (usd of the base currency of the deposit) for 1 point of price change of the instrument. How to calculate the lot size for correct calculation on different currency pairs???

 
VIZA-1966 >> :

The question will not look silly in this thread:

How do I deposit/withdraw money from real money?

I can't remember how to deposit money from WebMoney to real, I can't remember...

Webmoney usually from the DC website... or directly to a wallet, DC account or whatever

 

How do I write a variable for the signal bar (which has crossed the MA) in the EA? When I write the price of the first bar high and low in the conditions

double Max_Price_1=High[1];

double Min_Price_1=Low[1]; // then on every new zero bar there is a shift of the first bar(((

how do i do it?:-(((((((

Reason: