help me :(

 

for example these r my ea's orders.

 1 order is long at 1.30000

2. order is long at 1.29700

3. order is short at 1. 2960.

4. order is short at 1.2940

5. order is long at 1.2920

now all five order not close yet. i want write a code that ;

when 6. order will open, ea will check 5. orders open price,

when 7. order will open, ea will check 3. orders open price,

 

how can i do that ? i can't use OrderOpenPrice () ; because it will be the last price.

i try this :

 

 

 

 

if (etc.)

{

OrderSend(Symbol(),OP_BUY ,xlot,Ask,Slip,0,0,"Buy ",0,0,Green);

 lastpriceA= OrderOpenPrice () ;

 } 

 

if (etc2)

 {

OrderSend(Symbol(),OP_SELL ,xlot,Ask,Slip,0,0,"Buy ",0,0,Green);

lastpriceB= OrderOpenPrice () ;

 } 

//Then...

 

if ((lastpriceA-Ask>=xpips*etc3)&&etc4)

 {

OrderSend(Symbol(),OP_BUY ,xlot,Ask,Slip,0,0,"Buy ",0,0,Green);

 } 

//and

 if((Bid-lastpriceB>=xpips*etc3)&&etc5)  

{

OrderSend(Symbol(),OP_SELL ,xlot,Ask,Slip,0,0,"Buy ",0,0,Green); 

 //but it doesn't work, 

what can i do then ?

please help  

 
yilmazkahya:

for example these r my ea's orders.

 1 order is long at 1.30000

2. order is long at 1.29700

3. order is short at 1. 2960.

4. order is short at 1.2940

5. order is long at 1.2920

now all five order not close yet. i want write a code that ;

when 6. order will open, ea will check 5. orders open price,

when 7. order will open, ea will check 3. orders open price,

 

how can i do that ? i can't use OrderOpenPrice () ; because it will be the last price.

i try this :

 <CODE DELETED>


Please   edit   your post . . .   or have it removed ! ! !     please use the   SRC   button to post code: How to use the   SRC   button. 

 
sorry boss :(
 
Why say "sorry?" Why didn't you do what was asked?
 
i edit this. is there anything wrong still ?
 
You keep posting new entry's. You haven't edited anything. Go back to the first post and EDIT it.
Reason: