[ASK] fixing grid order problem

[Deleted]  

how to make better grid EA using direct order ?

current problem is i can't reorder for targeted price.

i have two way to make grid order :

1.

if ( bid == pricetarget ) { ordersend();}  // it will not retrace / reorder in same pricetarget

2.

if ( bid >= pricetarget )  { ordersend();} // it will retrace / reorder in same pricetarget

but both way have same problem sometimes stopped when making grid order.

ex. current price 1.6000 but EA only open 1.5910, 1.5920, 1.5930 then stopped

but these not always happened sometimes working normally.

for debugging i use this way :

if ( ticket!= OrderTicket()) ordersend(); // reorder in targeted price


thanks for your help

[Deleted]  
bump
[Deleted]  

bump

 
  1. if ( bid == pricetarget ) {
    Doubles are rarely EXACTLY equal
    if ( MathAbs(bid - pricetarget) < pip2dbl ) { // Approximately equal
  2. The rest of the post is unintelligible.