HELP WHO CAN !!! - page 7

 
HOW WILL IT GO THROUGH IF THERE IS NO ORDER? IT JUST LOOPS AND LEAVES THE LAST VALUE... THAT'S THE POINT.
 
sllawa3:
HOW WILL IT GO THROUGH IF THERE IS NO ORDER? IT JUST LOOPS AND LEAVES THE LAST VALUE... THAT'S THE POINT.
if there's an order don't worry, just write what I'm saying.
 
Techno:
there will be a warrant don't worry, write what I say.

I DON'T UNDERSTAND THE QUESTION. HOW TO WRITE? ( and spoops... WHAT IS THAT? )
 
sllawa3:

I DON'T UNDERSTAND THE QUESTION. HOW TO RECORD ?
just write an iterative loop where each found order saves its ticket and stops into variables
 
if(OrderType() == OP_BUY) {DS=1; Tbye = OrderTiktn()} well, the same for the others..right ?
 
Do you want to compare ticks on the pendulum and the market ticker?
 
sllawa3:
if(OrderType() == OP_BUY) {DS=1; Tbye = OrderTiktn()} so ?

well "so", but that's the small part, write the whole loop. (I don't just say do it, you use it in your EA)

No, I don't want to compare anything yet, I need to do everything sequentially. First the loop.

 
if(OrderType() == OP_BUYSTOP){ZB=1;TBS =OrderTicket();}
if(OrderType() == OP_SELLSTOP){ZS=1;TSS =OrderTicket();}
if(OrderType() == OP_BUY){DS=1;TB =OrderTicket();}
if(OrderType() == OP_SELL){DB=1;TS =OrderTicket();}
 
      if(OrderType() == OP_BUYSTOP){ZB=1;TBS =OrderTicket();}
      if(OrderType() == OP_SELLSTOP){ZS=1;TSS =OrderTicket();}
      if(OrderType() == OP_BUY){DS=1;TB =OrderTicket();}
      if(OrderType() == OP_SELL){DB=1;TS =OrderTicket();}
 

you should have written this

double DS[4],DB[4],ZB[4],ZS[4];


int start()
{
ArrayInitialize(DS,0); 
ArrayInitialize(DB,0); 
ArrayInitialize(ZB,0); 
ArrayInitialize(ZS,0); 

 for(int i=0;i<OrdersTotal();i++)
        {
          if(OrderSelect(i,SELECT_BY_POS)&&OrderSymbol()==Symbol()&&OrderMagicNumber()==MAGA)
          switch(OrderType())
          {
          case 0:DB[0]=OrderTicket();DB[1]=OrderOpenPrice();DB[2]=OrderTakeProfit();DB[3]=OrderStopLoss();break;
          case 1:DS[0]=OrderTicket();DS[1]=OrderOpenPrice();DS[2]=OrderTakeProfit();DS[3]=OrderStopLoss();break;
          case 4:ZB[0]=OrderTicket();ZB[1]=OrderOpenPrice();ZB[2]=OrderTakeProfit();ZB[3]=OrderStopLoss();break;
          case 5:ZS[0]=OrderTicket();ZS[1]=OrderOpenPrice();ZS[2]=OrderTakeProfit();ZS[3]=OrderStopLoss();break;
          }
        }
}