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

 
gheka:

How do I get the penultimate and penultimate-to-last bar information?

Let's say the maximum and minimum price of the penultimate and penultimate bar.

Please give me a hint.

double High0 = iHigh(Symbol(),Period(),0); // максимальная цена текущего бара для текущего символа (Symbol()) и текущего таймфрейма (Period())
double High1 = iHigh(Symbol(),Period(),1); // максимальная цена предпоследнего бара для текущего символа (Symbol()) и текущего таймфрейма (Period())
double High2 = iHigh(Symbol(),Period(),2); // максимальная цена предпредпоследнего бара для текущего символа (Symbol()) и текущего таймфрейма (Period())

double Low0 = iLow(Symbol(),Period(),0); // минимальная цена текущего бара для текущего символа (Symbol()) и текущего таймфрейма (Period())
double Low1 = iLow(Symbol(),Period(),1); // минимальная цена предпоследнего бара для текущего символа (Symbol()) и текущего таймфрейма (Period())
double Low2 = iLow(Symbol(),Period(),2); // минимальная цена предпредпоследнего бара для текущего символа (Symbol()) и текущего таймфрейма (Period())

... and so on...

Instead of Symbol() and Period you can use constants:

for both 0 or NULL - the current symbol and the current chart.

Or use a specified symbol for a symbol (e.g. EURUSD, USDJPY, etc.)

And for a period, insert either a constant: PERIOD_M1, PERIOD_M5, PERIOD_M15..., ... PERIOD_H4 etc., or their values: 1, 5, 15, ..., ... 240 etc.

 
Thank you!!!
 

Hi all!

Taking my first steps in programming. Tried to combine the idea of moving average crossover and martingale, using 2 source EAs Universum_v1 and VR---BUCH-MA.

I can not figure out where the error lies. Please help me to understand all errors! All files are in archive.

Files:
 

if (OrderCloseTime()>=TimeCurrent() - 900)

Is this line correct to check if orders are closed in the next 15 minutes or not? (60*15=900)

if not, how should i implement it?

 

Does anyone have an EA on limit orders?

 
marten82:

Hi all!

Taking my first steps in programming. Tried to combine the idea of moving average crossover and martingale, using 2 source EAs Universum_v1 and VR---BUCH-MA.

I can not figure out where the error lies. Please help me to understand all errors! All files are in archive.



Just don't spam. Remove your posts with the same content from other threads
 

#property copyright "Copyright © 2010, MetaQuotes Software Corp."
#property link "https://www.metaquotes.net//"

int A;
int B;
int C;


int start()
{
Comment(C);
return(0);
}

A=3;
B=8;
C=A+B;

My first piece of work. It's giving out five prizes. Can you please tell me why?

 
Question: WindowScreenshot() takes a screenshot of a chart, Sendmail() sends an email. Is there any way to send the screenshot itself to the mail?
 

eevviill:

My first piece of work. It's giving out five prizes. Can you please tell me why?

warnings
 
eevviill:
eevviill:

 

Мой первый труд. Выдаёт 5 придуприждений. Скажите пожалуйста почему?

int A;
int B;
int C;
int start()
{
   A=3;
   B=8;
   C=A+B;
   Comment(C);
   return(0);
}