open orders with 10pip gap - page 5

 

ok GumRai you have the copy of the ea so you know everything 


1. this code below i use it to get and open sell at the highest bid price if am selling on the highest price on the chart

 Opn_S=Bid > High[1] && CurrentTime != Time[1];
   
CurrentTime= Time[1];



2. now the order is set and signal ready  highest_Ticket now highest ticket is gotten!. send out my order at the highest price in current chart.

if(highest_open_price==0 && Opn_S==true)               // No opened orders +
        {                                       // criterion for opening Sell
         RefreshRates();                   // Refresh rates     
         highest_Ticket=OrderSend(Symbol(),OP_SELL,mylot(),Bid,0,0,0,"My Comment",magic,0,Red);
         if( highest_Ticket<0)
      
           {
            Comment("FRONT-RUNNER Opened order Sell ","#",highest_Ticket);
            return(0);                                 // Exit start()
           }
         if("error report",GetLastError()) // Processing errors
            continue;                             // Retrying
         return(0);                                   // Exit start()
        }
      break;                                    // Exit while
     }
//--------------------------------------------------------------- 9 --------------------------------------
   return(0);                                       // Exit start()
  }



3. while my order conditions is now true  highest_open_price is succeded

   while(true) // Orders closing loop
     {
      if(highest_open_price==0 && Opn_S==true) // No new orders +



please GumRai please if am wrong please take it easy with me, i know am not yet a perfect coder but i know am improving

  please take it easy with my short comings for now,please put me through,i have to be away from the office to follow your reply

believing my question will end this week.thanks for willing to help.

 
Please am waiting
 
dan100:

ok GumRai you have the copy of the ea so you know everything 


 No I don't, I have already commented on the EA code that you uploaded

 I have shown you how to find the open order with the highest open price, yet you have not made any attempt to write code to open a trade at 10 pips higher.

You just keep posting modifications of code in an EA that has absolutely nothing to do with your request

Write a completely new EA from scratch 

 
GumRai:

 No I don't, I have already commented on the EA code that you uploaded

 I have shown you how to find the open order with the highest open price, yet you have not made any attempt to write code to open a trade at 10 pips higher.

You just keep posting modifications of code in an EA that has absolutely nothing to do with your request

Write a completely new EA from scratch 



GumRai there is no much work in writing ea from scratch but the problem is understanding my difficulties then it will be easy to fix it.the point is I dont know how loop through order to solve my problem.just give example,that's all, please help me loop the order with 10pips then I will completed the rest .like example after loop the order " Open Sell..." That's all I need.
 

I have already given you the answer

GumRai 2015.05.08 10:12 #

Well, I have given you the code to find the order with the highest open price.

It is now a simple matter of checking if price is at least 10 pips above this value and, if so, open another order

 
GumRai:

I have already given you the answer

GumRai 2015.05.08 10:12 #

Well, I have given you the code to find the order with the highest open price.

It is now a simple matter of checking if price is at least 10 pips above this value and, if so, open another order

 



GumRai: like i told you simple things are not simple to people who don't know it. GumRai i can write a simple ea and present now, why because i know it

but i can spend weeks on just a simple mistake, that i don't know how to correct,why? because i cant communicate with the understanding....

GumRai please give me example that's all and i will not bother you on this point again please. remember codes are on blocks and this block/loop,

only links to the reason why "sell are open with 10pips". please you have help already,please assist more,just add "if" function then "SELL..." Thanks for willing to help.

 
GumRai: I have already given you the answer
And so did I, days ago. You give one little piece, they always want the next piece. They will not learn or try. Thus my standard:
learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
 
 
WHRoeder:
And so did I, days ago. You give one little piece, they always want the next piece. They will not learn or try. Thus my standard:


ok....this code below i added && OrderType()>=OP_SELL and also  add 10*point  can this work.

pips2dbl------is just adjustment for five digit broker
  double highest_open_price=0;
   int    highest_Ticket=-1;
   for(int pos=OrdersTotal()-1; pos>=0; pos--)
      if(OrderSelect(0,SELECT_BY_POS,MODE_TRADES) // Only my orders w/
         && OrderMagicNumber()==0           // my magic number
         && OrderSymbol()==Symbol() // and my pair.
         && OrderOpenPrice()>=highest_open_price + 10*pips2dbl 
         && OrderType()>=OP_SELL
         )
        {
         highest_open_price=OrderOpenPrice();
         highest_Ticket=OrderTicket();
        }
 

and also check this condition i have added  if am right..............




 double highest_open_price=0;
   int    highest_Ticket=-1;
   for(int pos=OrdersTotal()-1; pos>=0; pos--)
      if(OrderSelect(0,SELECT_BY_POS,MODE_TRADES) // Only my orders w/
         && OrderMagicNumber()==0           // my magic number
         && OrderSymbol()==Symbol() // and my pair.
         && OrderOpenPrice()>=highest_open_price)
        {
         highest_open_price=OrderOpenPrice();
         highest_Ticket=OrderTicket();
        }
         RefreshRates();
          if (Bid>=highest_open_price+10*Point)
   highest_Ticket=OrderSend(Symbol(),OP_SELL,mylot(),Bid,0,0,0,"My Comment",0,0,Red);


     }
 
  1.          && OrderOpenPrice()>=highest_open_price + 10*pips2dbl 
    I asked for the code that finds the highest open price. Does this? Does it in the presence of slippage?
  2.          && OrderType()>=OP_SELL
    What do you think this means?
  3. I asked you so show the code that tests if Bid is 10 pips above last open.
              if (Bid>=highest_open_price+10*Point)
       highest_Ticket=OrderSend(Symbol(),OP_SELL,mylot(),Bid,0,0,0,"My Comment",0,0,Red);
    
    
         } // End of For
    Why are you opening a sell when the market is 10 points above any order (not the highest).
  4. Make up your mind, do you want 10 points or 10 pips.
Reason: