Download MetaTrader 5

open orders with 10pip gap

To add comments, please log in or register
chudanever
269
chudanever  

please help me with handy code to open position and open another one after 10pips.thanks


see what i have tried but no success with the code please help

if( ma1 > Ask + (10*Point)&& CurrentTime != Time[1])  {      Opn_B=true;     }
SYED NAUFAL GADDAFI
1399
SYED NAUFAL GADDAFI  
Create a pending order. Market order is not possible.
chudanever
269
chudanever  
deysmacro:
Create a pending order. Market order is not possible.

Deysmarco what I mean is not pending order but example when i open buy! wait 10pips before another buy other is opened
SYED NAUFAL GADDAFI
1399
SYED NAUFAL GADDAFI  
dan100:

Deysmarco what I mean is not pending order but example when i open buy! wait 10pips before another buy other is opened

What you want can be done but requires more coding in it to make it works.
chudanever
269
chudanever  
deysmacro:
What you want can be done but requires more coding in it to make it works.

Please can you help me with that.
chudanever
269
chudanever  
see picture10pip open of what i mean to code, please assist me with right way of doing it please.
chudanever
269
chudanever  

please i need your assistance



dan100:
see picture of what i mean to code, please assist me with right way of doing it please.
whroeder1
16349
whroeder1  
  1. Find the open trade with the highest open price.
  2. If market hasn't reached the price + 10 pips, return
  3. open a new order.
  4. 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.
chudanever
269
chudanever  
WHRoeder:
  1. Find the open trade with the highest open price.
  2. If market hasn't reached the price + 10 pips, return
  3. open a new order.
  4. 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.




please WHRoeder: i write my codes but not perfect though i try to learn more ,please if you can help me please i just want to put it

into my existing code please help. i have tried yet  not perfectly coded, though you have giving me formular. i have succeded in getting the high but its

not opening orders 10pips as i want.please help me with the 10pips order open bellow is what i have done so far.



chudanever
269
chudanever  
 if(ma1 > Price + (10*Point) && CurrentTime != Time[1])
  {
      Opn_S=true;
     } 
     else 
   if(ma1 < Price + (10*Point)&& CurrentTime != Time[1]) 
      {
      Opn_S=false;
     }
whroeder1
16349
whroeder1  
  1. I asked you to show your code that finds the highest open price. You didn't.
  2. I asked you to show your code that tests if the market has or has not reached that price + 10 pips. You didn't. You posted code that determines if a moving average (ma1) is above a price (Price) by 10 points. A pip is 10 points on a 5 digit broker.
  3. Your code
     Your code simplified.
     if(ma1 > Price + (10*Point) && CurrentTime != Time[1])
      {
          Opn_S=true;
         } 
         else 
       if(ma1 < Price + (10*Point)&& CurrentTime != Time[1]) 
          {
          Opn_S=false;
         }
    Opn_S= ma1 > Price + (10*Point) && CurrentTime != Time[1];
    
    Also what if CurrentTime == Time[1]? What is the value of Opn_S then?
To add comments, please log in or register