[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 714

 
artmedia70:

Friends, a question like this:

How to check the existence of an object already built on the graph, in this case

ObjectCreate("Trend_Line_DN",OBJ_TREND,WinID,TimeDN[1],PeakDN[1],TimeDN[0],PeakDN[0]);


see https://www.mql5.com/ru/forum/111497/page709 just in case

I have laid out the code for deleting objects, you can redo it for counting, etc.

 
IgorM:


see https://www.mql5.com/ru/forum/111497/page709 just in case

I posted the code for deleting objects there, you can redo it for counting, etc.

Ok Igor, thanks, I'll take a look...
 

Please tell me which indicator should be used on the minute charts?

 
Yuri_vk:

Please tell me which indicator should be used on the minute charts?


Which one do you want to use?
 

Are you saying that the indicators work equally on both the daily and minute charts?

 
Yuri_vk:

Are you saying that the indicators work equally on both the daily and minute charts?


I mean use the indicators you know and feel comfortable with.
 

Hello! Please help a "dummie"! How to make the OrderTakeProfit () function output five decimal places. The code is below. Thank you.

double TakeProfitLastClosePos(string sy="", int op=-1, int mn=-1) {
  datetime t;
  double   r=-1;
  int      i, k=OrdersHistoryTotal();

  if ( sy=="0") sy=Symbol();
  for ( i=0; i< k; i++) {
    if (OrderSelect( i, SELECT_BY_POS, MODE_HISTORY)) {
      if (OrderSymbol()== sy || sy=="") {
        if (OrderType()==OP_BUY || OrderType()==OP_SELL) {
          if ( op<0 || OrderType()== op) {
            if ( mn<0 || OrderMagicNumber()== mn) {
              if ( t<OrderCloseTime()) {
                t=OrderCloseTime();
                r=OrderTakeProfit();
              }
            }
          }
        }
      }
    }
  }
  return( r)

}

 
dimon74:

Hello! Please help a "dummie"! How to make the OrderTakeProfit () function output five decimal places. The code is below. Thank you.

}


Who's to say this function doesn't give the right number of characters. It gives even more.
 

Hello.

The essence of the question:

In file 1.csv the current value of four variables is written

int a1, double punkt, double nn, double mm .

int handle=FileOpen("1.csv",FILE_READ|FILE_WRITE,';');
FileSeek(handle,0, SEEK_END);
FileWrite(handle,a1,punkt,nn,mm);
FileClose(handle);

This is what we get:

2;0.4;1000;1000
2;0.4;1000;1000
2;0.4;904;1000
2;0.4;904;1000
3;0.4;1128;1000
3;0.4;1128;1000

The variables must take the last value as a result of accessing the file:
a1==3, punkt==0.4, nn==1128, mm==1000.

All seems to be easy - but I do not understand it.
Please help.
 
Vinin:

Who's to say that this function doesn't give you the right number of characters. It gives even more.
This is how it works for me. A position is closed by TP, while a new pending order needs the value of TP+n*Point to be set. Here we get a discrepancy: OrderTakeProfit () gives me four characters (we can see it in Alert) and my brokerage company wants five characters.I have tried many things, but it seems there is more to come. If you have any idea, please give me some ideas. Thanks in advance!