Questions from Beginners MQL5 MT5 MetaTrader 5 - page 701

 
Vitalie Postolache:

Why all? Complete information for 100 bars at a time (of course, you can specify fewer or more bars). Handy when you need more than just High.

Well, if it's an indicator ... If it's an indicator and if it's an EA, then at every tick to update the array (or overwrite at a new bar) - what's the idea, it's just not clear...

Vitaly Muzichenko:

OK, you have solution for current symbol, I have multisymbols.

I'm trying to re-do the indicator, it has multitimescale - but I'm confused by the calculation of time....

Renat Akhtyamov:

Got this.

At first, it's a bit squirmy. However, rewriting from MT4 is no problem.

I just hate that I have to waste my time on something that has already been done... You don't understand some things right away, it's not so easy.

Here's how to understand - the indicator draws on one instrument, but does not want to draw on another... There are no errors in log...

 
-Aleks-:

I just hate that I have to kill time on something that has already been done... And some things are not so easy to understand on the fly.

How do you understand - the indicator draws on one instrument, but does not want to on the other... and there are no errors in the log...

without a code snippet we can't help either
 

The line from a four

int limit=((TimeFrames*60)/(_Period*60));

is the same as a five, or am I missing something?

int limit=((PeriodSeconds(TimeFrames)/60)/(_Period*60));

TimeFrames - can be any.

 
-Aleks-:

The line from a four

int limit=((TimeFrames*60)/(_Period*60));

is the same as a five, or am I missing something?

int limit=((PeriodSeconds(TimeFrames)/60)/(_Period*60));

TimeFrames can be anything.

maybe it would be better to learn something from this opera?

https://www.mql5.com/ru/forum/162673

Как получить из индикатора цену на определенном таймфрейме?
Как получить из индикатора цену на определенном таймфрейме?
  • www.mql5.com
Здравствуйте! Идея следующая: мы должны сравнивать в определенном формате данные с предыдущей и предпредыдущей свечи...
 
Renat Akhtyamov:

maybe something better to learn from this op-ed?

https://www.mql5.com/ru/forum/162673

It's not really about that, or I haven't found a solution...

I can't figure it out - it occasionally swears that division by zero in d1 , but is that possible?

         int limit=((TimeFrames*60)/(_Period*60));
         double d1=(delta_price_high-center_line_point)/(limit/2);


 
-Aleks-:

It's not really about that, or I haven't found a solution...

I can't figure it out - it occasionally swears that division by zero in d1 , but is that possible?

         int limit=((TimeFrames*60)/(_Period*60));
         double d1=(delta_price_high-center_line_point)/(limit/2);


Apparently it is possible if the current TF and the estimated one are the same...

 

About number of seconds and timeframes:

PeriodSeconds
PeriodSeconds Returns the number of seconds in a period. int PeriodSeconds ( ENUM_TIMEFRAMES period=PERIOD_CURRENT // graph period ); Parameters period=PERIOD_CURRENT [in] Value of graph period from ENUM_TIMEFRAMES enumeration. If the parameter is not specified, the number of seconds of the current chart period, at which the program is running, is returned. Returned value Number of seconds in the specified period. See also _Period, Graph periods, Date and time, Object visibility

Documentation | 2015.12.03 13:33

 
How do I delete a product draft in the marketplace?
 
What does trailing stop, from the standard library in mt5 return(-1); ?
 
Renat Akhtyamov:
How do I delete a product draft in the marketplace?
Go to your product settings, then the "Management" tab, then "Moderator comments" and write a request for deletion.
Reason: