[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 233

 
Finish it in the programme:
ВерхняячертаBuffer1[0]=25;
ВерхняячертаBuffer1[1]=25;
ВерхняячертаBuffer1[2]=25;
ВерхняячертаBuffer1[3]=25;
ВерхняячертаBuffer1[4]=25;
ВерхняячертаBuffer1[5]=25;
ВерхняячертаBuffer1[6]=25;
ВерхняячертаBuffer1[7]=25;
ВерхняячертаBuffer1[8]=25;
ВерхняячертаBuffer1[9]=25;
ВерхняячертаBuffer1[10]=25;
ВерхняячертаBuffer1[11]=25;
...

and then think about what was missing
 
Ok, one more time. I set SetIndexStyle - to draw a line between two predefined points - like this
DRAW_SECTION 1 Line segments between non-empty line values
I've got it right, what the help says, right?
 
Yeah, I'll get right on that!!!
 
 for (int iiri=total-1; iiri>=0; iiri--)
   {if(OrderSelect(iiri, SELECT_BY_POS))
   {if(OrderSymbol  ()==Symbol()      )
   {  
   if(OrderType    ()==OP_BUY&&OrderMagicNumber()==Magic2 && Bid>OrderOpenPrice()+NormalizeDouble(profit*Point,Digits))
   {
    ObjectCreate("Line1112"+OrderTicket(),OBJ_HLINE,0,0,OrderOpenPrice());
    ObjectSet("Line1112"+OrderTicket(),OBJPROP_COLOR,Green);
    ObjectSet("Line1112"+OrderTicket(),OBJPROP_STYLE,0);
    ObjectSet("Line1112"+OrderTicket(),OBJPROP_WIDTH,1);
   }
   if (NormalizeDouble(ObjectGet("Line1112"+OrderTicket(),OBJPROP_PRICE1),Digits)!=NormalizeDouble(OrderStopLoss(),Digits)&&ObjectFind("Line1112"+OrderTicket())==0)
   {
   OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(ObjectGet("Line1112"+OrderTicket(),Digits),OBJPROP_PRICE1),OrderTakeProfit(),0,Blue);
   }

}}} 

why after dragging a line the terminal writes OrderModify error 1

and constantly makes an order with or without a stop?

 
Dimka-novitsek:
Ok, one more time. I set SetIndexStyle - to draw a line between two predefined points - like this
DRAW_SECTION 1 Line segments between non-empty line values
I've got it right, what the help says, right?
I useDRAW_LINE. I have some misunderstandingswith DRAW_SECTION.
 

how to properly install a new EA on the platform?

 

Can you tell me what may be the reason for the limitation of the indicator calculation by 31 candles. Everything was fine up to a certain point, but suddenly this annoying limitation appeared.

Code:

   int counted_bars=IndicatorCounted();
   int limit, i;


   if(counted_bars<0) return(-1);

   limit=(Bars-counted_bars)-1;
 
   for(i=0; i<=limit+2;i++)
     {  

.............
     
     }
 
dzhini:

Can you tell me what may be the reason for the limitation of the indicator calculation by 31 candles. Everything was fine up to a certain point, but suddenly this annoying limitation appeared.

Code:

This cannot be the case.

Look for an error in .............

 
VOLDEMAR:

why after dragging a line the terminal writes OrderModify error 1

and constantly places an order with and without a stop?

Apparently there is no reason to change the price and I created it at 1.3500 and then modify it to 1.3500.

ERR_NO_RESULT1No error, but the result is unknown

Before creating an object check for non-existence of the object.

  if(ObjectFind("Line1112"+OrderTicket())<0)
      ObjectCreate("Line1112"+OrderTicket(),OBJ_HLINE,0,0,OrderOpenPrice());
 
OKULENOK84:

how to properly install a new EA on the platform?

How to install an EA in MetaTrader 4?
Reason: