[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 172

 
001:
If you can be more specific, I couldn't figure it out. Need to find the highest value between High[i] and High[1]. Thank you!

Better define the bar number or the highest value.

int MaxBar=0;
double MaxValue=0; 
for(int c=1; c<=i;c++)
if (High(c)>MaxValue) {MaxValue=High(c); MaxBar=c;}

 
001:
If you can be more specific, I couldn't figure it out. I need to find the highest value in the range from High[i] to High[1].

MetaEditor --> MQL4 Reference --> Timestamp Access --> iHighest:

Example:

double val;
  // расчет максимального значения цены на 20 последовательных барах
  // с индекса 4 по индекс 23 включительно на текущем графике
  val=High[iHighest(NULL,0,MODE_HIGH,20,4)];

 

Newbie help!!!


avatar
1
ingener 13.09.2011 14:11
Help me change the code of the advisor so that it could be attached to different currency pairs with the condition that for each pair, it opened only one order. I would be very thankful!!!
Files:
 

Gentlemen programmers, help me change one condition in an indicator :(


avatar
17
LeRoi 13.09.2011 11:55

The indicator (attached) draws waves of different levels on HI/LOW... help please... Change the condition in it to draw at close prices. Thanks a lot ...

Attached files:
SMS_SW5_4.mq4 (29.63 KB) delete

avatar 128
borilunad 13.09.2011 13:39

And better to open it so it does not overdraw and is applicable to advisors working on the opening bars!

 

Good afternoon.

Quick question: is it possible to get the script to trade? Right now it's giving out error 4109.

 
Solree:

Good afternoon.

Quick question: is it possible to get the script to trade? Right now it's giving out error 4109.


https://docs.mql4.com/ru/constants/errors
 
I know what an error means. So I'm asking, is there any way around it?
 
Solree:
So, how do you solve it...? The window, like in Expert Advisor, where this is set up, does not pop up, i.e. it is not possible to tick the "Trade, ..." box.

Terminal-->Service-->Settings-->Advisors-->Allow EAs to Trade
 
Thanks, it's working :)
 

Hello!

Can you tell me what the error means when compiling the EA:

\end_of_program' - unbalanced left parenthesis

Regards.

Reason: