Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1487

 
MakarFX:

If you need the previous day, see previous post,

and if it's the current day, correct it.

Corrected. This is not right. The maximum and minimum have been changing since the beginning of the day. I want to get this broken line.

 
ifitstrue:

Corrected. That's not what it looks like. The maximum and minimum have been changing since the beginning of the day. That's the broken line I want to get.

Then ask the right question! What do you want?

ifitstrue:

The indicator, should draw the High and Low lines of the day on each bar of the smaller timeframe.

or what do you want?

 
MakarFX:

Then ask the right question! What do you want

or what do you want?

Please look at the picture.

The indicator starts drawing from the beginning of the current day.

For example, let's turn on timeframe M5. The indicator draws lines on each M5 bar according to the high and low of the day at the current time.

Files:
2.png  31 kb
 
ifitstrue:

just remember the best highs and lows of the day

MqlDateTime date;
double day_high=0, day_low=EMPTY_VALUE;
int day=-1;

int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
   {
   for(int i=..............
      {
      TimeToStruct(time[i],date);
      if(day!=date.day)
         {
         day=date.day;
         day_high=high[i];
         day_low=low[i];
         }
      if(high[i]-day_high>0) day_high=high[i];
      if(day_low-low[i]>0) day_low=low[i];
 
      buffer_high[i]=day_high;
      buffer_low[i]=day_low;
      }
   return(rates_total);
   }
 
Aleksei Stepanenko:

just remember the best highs and lows of the day

Thank you, it was helpful to me too)
 

Gentlemen (and ladies), can you suggest a class that saves and reads order details from a file?

Something simple, which I already think it should be. I don't want to write it myself.

Something with the ability to search by ticket, etc...

 
Aleksei Stepanenko:

just remember the best highs and lows of the day

Got it. Thank you!
 

Greetings.

How do I get the line values from thehttps://www.mql5.com/ru/code/23312 indicator for the EA ?

iCustom() doesn't seem to work here. Or am I wrong ?

Tymen_STARC_Bands_MTF
Tymen_STARC_Bands_MTF
  • www.mql5.com
Индикатор Multi timeframe Tymen STARC Bands
 
de_leonid:

Greetings.

How do I get the line values from thehttps://www.mql5.com/ru/code/23312 indicator for the EA ?

iCustom() doesn't seem to work here. Or am I wrong ?

herehttps://www.mql5.com/ru/forum/291099#comment_22606959 added horizontal lines - to make it easier, expert from levels to perform operations.

(read your question and decided to add Horizontal lines to the indicator - now you can open or close with expert (which works from objects))

Индикаторы: Tymen_STARC_Bands_MTF
Индикаторы: Tymen_STARC_Bands_MTF
  • 2018.11.20
  • www.mql5.com
Статьи и техническая библиотека по автоматическому трейдингу: Индикаторы: Tymen_STARC_Bands_MTF
 
SanAlex:

herehttps://www.mql5.com/ru/forum/291099#comment_22606959 I have added horizontal lines - to make it easier to perform operations by expert from levels.

(read your question and decided to add Horizontal Lines to the indicator - now you can use an Expert Advisor (which works from objects) to open or close)

Thanks for the help. Can I also ask for an example of an EA (part of the code) how to get the value from these lines in the EA.