A trend-following strategy. - page 11

 
JLY:

The crosses are the end of the trend line. The trend lines are drawn manually, the indicator takes the coordinates and calculates everything itself, I just need to draw a line in the right place.

I just need to know where and how to draw the lines

Where is the right place?

where and how to do it right ?

 
For new versions of the mt4 indicator and discussion, seehttps://www.mql5.com/ru/forum/145415
Конец тренда (индикатор) - MQL4 форум
  • www.mql5.com
Конец тренда (индикатор) - MQL4 форум
 
pako:

where is the right place?

where and what is the right place ?

the line is built on the flat, on the beaten or unbeaten line
 
JLY:
the line is drawn on a flat, on a beaten or unbeaten basis...

How do you not get confused with trending flotsam, trending flotsam, trending flotsam, trending flotsam???

I'll give you a couple more, they'll come in handy: terminal, profit shedding... well, there's another one: the profit margin drain... although there's also one: plunge profit, profit profit...

In short: loss loss, set-up...

 
It's like that video: overbought oversold, it's all ridiculous.
 

I'm rewriting indicator for 5, can you help me, it keeps getting confusing when compiling. I can't help you.

Files:
TimeEnd.mq5  11 kb
 
artmedia70:

How do you not get confused with trending flotsam, trending flotsam, trending flotsam, trending flotsam???

I'll give you a couple more, they'll come in handy: terminal, profit shedding... there's one more: profit loss... although there's another one: loss of loss, profit of profit...

In short: loss of loss, set-up of set-up...

No, now there is only a flat, and a combination of flat, there are no trends...
 
JLY:

I'm rewriting indicator for 5, can you help me, it keeps getting confusing when compiling. I can't help you.

string name;
long time1NEW,time2NEW,time3,time3OBRAT;
double   price1NEW,price2NEW,price3,price3OBRAT;
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   for(int i=0;i < ObjectsTotal(0,0,-1);i++)
      {
        if(ObjectGetInteger(0,ObjectName(0,i,0,-1),OBJPROP_TYPE,0)==OBJ_TREND)
          {
            name = ObjectName(0,i,0,-1);
            price1NEW = ObjectGetDouble(0,name,OBJPROP_PRICE,0);
            price2NEW = ObjectGetDouble(0,name,OBJPROP_PRICE,1);
            price3=price2NEW-(price1NEW-price2NEW);
            time1NEW  = ObjectGetInteger(0,name,OBJPROP_TIME,0);
            time2NEW  = ObjectGetInteger(0,name,OBJPROP_TIME,1);
            time3=time2NEW+(time2NEW-time1NEW);
            
            price3OBRAT=price1NEW+(price1NEW-price2NEW);
            time3OBRAT=time1NEW-(time2NEW-time1NEW);
                     
            ObjectCreate(0,name,OBJ_TREND,0,time1NEW,price1NEW,time2NEW,price2NEW);
            ObjectSetInteger(0,name,OBJPROP_COLOR,Lime);
            ObjectSetInteger(0,name,OBJPROP_WIDTH,1);
            ObjectSetInteger(0,name,OBJPROP_RAY_RIGHT,true);
          }
      }
etc.
 
pako:
etc.

The timing needs to be calculated in bars. In 4, it was necessary to calculate in bars because of output gaps, i.e. not to take them into account. If there is such a problem in the 5th, then the end time should also be calculated in bars.

There is an error during compilation, just in this place.

 

I made it draw by seconds, there are gaps in the weekends, so I have to count by bars after all.

And how do I remove the icons if there is no line?

Files: