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

 

That's what I would call cheating...

And then. What's night got to do with it? The time of writing the post, it's not nighttime.

 

I can't think of anything.

I want to draw a line to the future in the indicator.

What should I set as time coordinate in the future?

I determine the time with iTime(NULL,0, ????? ).

A negative number? (bars to the right go with a minus sign) - doesn't work, it sets 1970.01.01 00:00

 

alderru писал(а) >>

What should be the time coordinate in the future?

Time[0] + N*Period()*60. This is forward by N bars relative to the current one.
 
TheXpert писал(а) >>
Time[0] + N*Period()*60. This is forward by N bars relative to the current one.

Thank you. It's as simple as ever.

 
alderru >> :

I can't think of anything.

I want to draw a line to the future in the indicator.

What should I set as time coordinate in the future?

I determine the time with iTime(NULL,0, ????? ).

A negative number? (because bars to the right are equal to minus) - doesn't work, just puts 1970.01.01 00:00.

You can use this function instead of Time[].

// расчет времени будущих баров
datetime xTime(int i)
  {
   if( i<0) return(Time[0]- i*Period()*60);
   return(Time[ i]);
  }

Then the time of the 10th bar in future will be

datetime Future=xTime(-10);
 

Hello.

Can you advise whether it is possible for an Expert Advisor to open a trade by the market, for example, 3 points above (or below) the opening price of a candle?

 
int CndBars = 1000;
string CndTime[];
ArrayResize( CndTime,          CndBars); 
ArraySetAsSeries( CndTime,          false); // false - устанавливает нормальное состояние индексирования. первый элемент 
ArrayInitialize( CndTime,        "Sn"); // время открытия бара
// проверка инициализации массива
for(int zzz=0; zzz<ArraySize( CndTime); zzz++)   Print("ячейка - ", zzz,"       значение - ", CndTime[ zzz]);

Why can an array not be initialised? The cycle for checking the status of the values in the array produces an empty value.

 
KoDi писал(а) >>

Hello.

Can you advise whether it is possible for an Expert Advisor to open a trade by the market, for example, 3 points above (or below) the opening price of a candle?

If it is within the rules, you can.

 

how do I determine the price of a particular day of the week, based on the closing hours of the bar?

Let's say I need the closing price of a bar on H1 at 10:00 am last Friday, how do I calculate it?

 
What is the maximum percentage of drawdown allowed? I understand that everyone has their own opinion, but here's an approximation
Reason: