Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 785

 
AlexeyVik:

It will be simple if you define the depth to be searched. You can use CopyLow and ArrayMinimum() instead of iLowest



Thank you! But that's the problem, that by setting the depth we find the midpoint, but in fact there can be several ABC formations.
 
Forexman77:
Thank you! That's just the problem, that by setting the depth, we find the midpoint, but in fact there may be several ABC formations.

What was the question, was the answer.

If you don't find what you want, you're not looking for it that way. Change your approach to the problem.

Unfortunately I do not understand from your text what you are looking for and what you find.

 

I made an indicator: find the maximum, check for a decrease by a certain number of points from the maximum.

The question is how to go back after the event and put the arrow on the maximum.

#property indicator_chart_window
#property indicator_buffers 3
#property  indicator_color1 Magenta
#property  indicator_color2 Aqua
#property  indicator_color3 Lime
//--- input parameters
extern int       Period_=5;
extern double       Rmax=0.005;
//--- buffers
double Max[];
double Min[];
double RazmahMax[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   IndicatorBuffers(3);
   SetIndexBuffer(1,Max);
   SetIndexBuffer(2,Min);
   SetIndexBuffer(0,RazmahMax);
   SetIndexStyle(0,DRAW_ARROW);
   SetIndexArrow(0,226);
   SetIndexEmptyValue(0,0.0);
   IndicatorDigits(Digits+1);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
    int counted_bars=IndicatorCounted(),limit, i;
    double minimum,maximum,spuskMax;
   if(counted_bars>0)
      counted_bars--;  
   limit=Bars-counted_bars;
   for(i=0;i<limit;i++)
   {
      maximum=High[iHighest(NULL,0,MODE_HIGH,Period_,i)];//ЗДЕСЬ НУЖНА СТРЕЛКА, ЕСЛИ СРАБОТАЛО СОБЫТИЕ НА ВТОРОМ ЦИКЛЕ
      minimum=Low[iLowest(NULL,0,MODE_LOW,Period_,i)];
      Max[i]=maximum;
      Min[i]=minimum;
   }
   for(i=0;i<limit;i++)
   {
   spuskMax=Max[i]-Low[i];
   if (spuskMax > Rmax && Close[i] < Open[i])RazmahMax[i]=High[i];//падение от max на определенное кол-во пунктов
   }
   return(0);
  }
//+------------------------------------------------------------------+
 
AlexeyVik:

What was the question, was the answer.

If you don't find what you want, you're not looking for it that way. Change your approach to the problem.

Unfortunately I do not understand from your text what you are looking for and what you find.


We are looking for the formation ABC between maximum and minimum and do not forget that there may be more than one inside these formations .

So after finding the extremes:

1. We shall make sure that there are three waves or there are several of them (the most unclear is how to identify the formations)

2.If there are several movements, we must narrow down the search.

P.S. So I ask, in what direction to change the approach? And about understanding. I do not know English very well, but I always have a good understanding in a foreign forum.

This is often the classic "you're a fool").

 
Forexman77:

We look for an ABCformation between a maximum and a minimum, bearing in mind that there may be more than one within these formations .

So after finding the extrema:

1. We shall make sure that there are three waves or there are several of them (the most unclear thing here is how to identify formations)

2.If there are several movements, we must narrow down the search.

P.S. So I ask, in what direction to change the approach? And about understanding. I do not know English very well, but I always have a good understanding in a foreign forum.

This is often the classic "you're a fool").

Maybe I would understand it but I don't know any English. I do not know English, except for some words applicable to programming.

Well, if they understand it in that language, why haven't they solved the problem? Maybe because understanding theoretically is different from understanding mathematically? What's the use of understanding ABC formation if it must be described by prices and bars instead of such words? If I personally have never done wave analysis and am not interested in it, then to understand you I have to study these waves first and then imagine how to describe it all. Wouldn't it be better for you to describe more concretely and briefly yourself what is not working? I don't want to talk about all or at least most of them, but personally I don't want to look for errors in other people's code. Reading 7-10 lines is one thing, and 70-100 is quite another.

Don't be sorry, it has nothing to do with the classic "you're a fool".

 

I confess I am not a proponent of wave analysis myself. What I am trying to identify now are formations with 3 or 4 extrema.

In two pictures the main problem is to detect MAX1 and MIN2 in them programmatically. Any ideas, variants, how it may be done?

 
 

Please advise!!! how to fix the statement.htm submission error on myfxbook.com

Example error:

2014.11.21 15:01:41.020 Publisher: failed

2014.11.21 15:01:41.020 FTP: cannot open file [C:\Program Files\MetaTrader 4 - RoboForex\profiles\statement.htm]

2014.11.21 15:01:40.270 Publisher: error opening the file

2014.11.21 15:01:40.270 Publisher: starting

At first, I thought it was a server and broker problem. But when I downloaded other brokers' terminals, the same error started to pop up!

What to do?

 
Forexman77:

I confess I am not a proponent of wave analysis myself. What I am trying to identify now are formations with 3 or 4 extrema.

In two pictures the main problem is to detect MAX1 and MIN2 in them programmatically. Any ideas, variants, how to do it?

There is another problem. There is no unambiguity in your drawings. Between MIN2 in the first picture and MIN2 in the second picture I see at least five similar minima. How do you explain that these minima have to be ignored?

Otherwise as I suggested at first CopyLow and from the resulting array ArrayMinimum and ArrayMaximum. Then change from which bar and how much to copy and again look for maximum and minimum.

 

Hello. There is a virtual stop. Which closes part of the lot at a certain distance from the price. How to make it close each time the price moves further bystep1 pips. That is, if the price moves one morestep1 point, it will close again and so on...

SL_VirtualBuy = orderprisebuy-step1*Point;

   if (Ask<SL_VirtualBuy)

   {

   for(int j=OrdersTotal()-1; j>=0; j--)

if(OrderSelect(j,SELECT_BY_POS))   

if (OrderType() == OP_BUY){

  OrderClose(OrderTicket(),0.1, Bid, 3,clrIvory );  

}

   }
Reason: