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

 

Good afternoon again everyone,

I understand the built-in indicator (iFractals) is different from the classic condition:

(by bar numbers from zero) 1>=2, 2 >3, 3<4, 4<=5. Right? (yes, I'm all about mine :) ).

No one can describe then how the built-in indicator works?

I don't need a code, only a condition.

The question is off the table - found a matchmaker. Sorry for the off-topic.

 
//+------------------------------------------------------------------+
//|                                                         test.mq4 |
//|                      Copyright © 2011, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2011, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start()
  {
//----
   int bars = 9; // количество баров
   datetime some_time=D'2011.12.23 01:00';                  // время отсчета свечи
   int      start=iBarShift("GBPUSD",PERIOD_H1,some_time);  // нахождение нужной свечи по времени 
//+------------------------------------------------------------------+   
   double Shift_high = iHighest(NULL,PERIOD_H1,MODE_HIGH,bars,start); //поиск бара с максимальной ценой из bars начиная с 0-го бара
   double Price_high = iHigh   (NULL,PERIOD_H1,Shift_high); // присвоение переменной максимального значение цены
//+------------------------------------------------------------------+   
   Alert("max = ", Price_high); // максимум за 9 баров


//----
   return(0);
  }
//+------------------------------------------------------------------+

This is the second time I'm writing this, maybe nobody noticed it the first time ?!

did so, but there is a binding to the date (day) and I need to check just an hour, the variable start was equal to 1 hour, no matter what day

found int Hour() but did not understand how to use it int start = int Hour(1) tried to write it does not work, please help

 
frixer:

This is the second time I'm writing this, maybe nobody noticed it the first time ?!

I did it like this, but it is binding to a date (day). I need it to check only an hour, i.e. the variable start was equal to 1 hour, no matter what day it was

found int Hour() but did not understand how to use it int start = int Hour(1) tried to write it does not work, please help

What's the problem? too lazy to look at the Hour function?

You can get the date in different ways. For example, if you take the start of the day and add seconds to the hour, it will be iTime[Symbol(),PERIOD_D1,0]+1*60*60

 
splxgf:

What's the problem? Are you too lazy to look at the Hour function?

You can get the date in different ways. For example, if you take the start of the day and add seconds to the hour, you get iTime[Symbol(),PERIOD_D1,0]+1*60*60

I was not lazy, I was dumb and this method may be correct, but it is a bit complicated, I've done if (Hour()==1){Alert("OK");} and to read, I wouldn't ask if I'd found it, but thanks anyway...
 

Question, I'm confused about something,

How do I determine the value of a fractal (using the iFractals function), i.e., do I only want to seek/define/assign either the upper or the lower value of the fractal?

 
Is FileFlush the same as saving a file?
 
sss2019:
Is FileFlush the same as saving a file?
It is resetting it from the buffer to disk.
 
DOCTORS:

Question, I'm confused about something,

How do I determine the value of a fractal (using the iFractals function), i.e., do I only want to seek/define/assign either the upper or the lower value of the fractal?

 double Fractal(int OP){
   double Fractal=0;
   static double FractalUPP;
   static double FractalLOW;

   double NewFractalUPP =iFractals(NULL, 1, MODE_UPPER, 2);
   double NewFractalLOW =iFractals(NULL, 1, MODE_LOWER, 2);
   if(NewFractalUPP!=0)FractalUPP=NewFractalUPP;
   if(NewFractalLOW!=0)FractalLOW=NewFractalLOW;
   if(OP==OP_BUY)Fractal=FractalLOW;//-Spread*Point
   if(OP==OP_SELL)Fractal=FractalUPP;//+Spread*Point
   
 return(Fractal);}
Do some magic with this function
 

Professionals, please help. I want to calculate the breakeven line for buy and sell orders in the indicator.

I have this problem, with the same buy and sell volumes LOCK should appear.

Because there really is a lock situation here, but instead I get a huge number in the line,

I can't get rid of it. I'm hoping for your help.

 
TEXX:

There is a problem, with the same buy and sell volumes LOCK should appear.

because there really is a lock situation here, but instead I get a huge number in the line,


normalise your _lots
Reason: