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

 
AlexPORT:
How does it (indicator) manage to do that? Can I see the code? What are the objects and how does it create them...?

The indicator draws dots and arrows (no source) :

graphic objects

 
tuner:

The indicator draws dots and arrows (no source) :


iCustom() will help you
 
Vinin:
iCustom() will help you

Well, I need to delete all graphical objects created by this indicator on the chart. How can I do it, ifObjectFind() returns 4202?

iCustom() is not suitable for this purpose, if I understand correctly

 

Hello, esteemed specialists of this forum. I set out to create an indicator that shows the maximum equity drawdown.

The calculation is as follows:

double de;
double dw;

if (AccountProfit() < 0)
{
de = (AccountProfit() * (-1) * 100) / AccountBalance();
} else de = 0;

if (de > dw)
dw = de;

Print value of dw. All it shows correctly, but there are problems: 1 - when changing timeframe starts calculation anew, when restarting the terminal it zeroes out, when starting the indicator on another chart it also zeroes out.

What can I do to make the maximum equity drawdown indicator update when it reaches a new maximum and maintain the value under the above conditions?

 
tuner:

Well, I need to delete all graphical objects created by this indicator on the chart. How can I do it, if ObjectFind() returns 4202?

iCustom is not suitable for this purpose, if I understand correctly

There are no objects. There are indicator buffers. You can assign a background colour to them
 
Is it possible to put an AccountEquity() indicator that works in real time on the chart? Where can I get it?
 
Vinin:
There are no objects. There are indicator buffers. You can assign a background colour to them
Unexpected. In principle, if there are arrows on the chart, but they are not in the list of objects, it is logical that this means that the arrows are not objects. How can it be implemented through indicator buffers?
 
tuner:
Unexpected. Basically, if there are arrows on the chart, but they are not in the list of objects, it is logical that this means that the arrows are not objects. How can this be implemented through indicator buffers?

https://docs.mql4.com/ru/customind

https://docs.mql4.com/ru/customind/setindexarrow

 
Vinin:
Thank you, it all makes sense now.
 

Guys, I'm getting error 130, please advise me if I can. Please don't criticise too much, I'm a beginner.

.
.
.
   double step = 0.0005;
   double val,c,r,res;
   string str;
   int i; //цикличесская
   int stp=5;
.
.
.
   c=(Ask+Bid)/2;
   r=(MathRound(c*1000))/1000;
   if((r-c)==0){
      res=r;
   }
   else{
      if((r-c)>0){
         res=r-step;
      }
      else {
         res=r+step;
      }
   }
.
.
.
      ResetLastError();
      OrderSend(Symbol(),OP_BUYLIMIT,0.01,res-stp*(i+1)*Point,3,res-(stp*(i+1)-100)*Point,res-(stp*(i+1)+5)*Point,"|",0,0,CLR_NONE);
      Print("98-",GetLastError());
.
.
...