Results 1 to 4 of 4
 1 Attachment(s)    

Thread: How to add pipstep or pip distance between orders

  1. #1

    Default How to add pipstep or pip distance between orders

    Can a programmer in this forum outline how to add pipstep or pip distance between suceeding orders?
    Thanks for your help.

  2. #2
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by tamaraofx View Post
    Can a programmer in this forum outline how to add pipstep or pip distance between suceeding orders?
    Thanks for your help.
    Hi tamaraofx,

    You need essentially this :

    Code:
    double lastbuyopenprice,lastsellopenprice;
    int i;
    Code:
       lastbuyopenprice=0;
       lastsellopenprice=0;
       if(OrdersTotal()>0){
          for(i=0;i<=OrdersTotal();i++){
             OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
             if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic && OrderCloseTime()==0){
                if(OrderType()==OP_BUY){
                   lastbuyopenprice=OrderOpenPrice();
                }
                if(OrderType()==OP_SELL){
                   lastsellopenprice=OrderOpenPrice();
                }
             }
          }
       }
    Code:
    lastbuyopenprice!=0 && Ask>=lastbuyopenprice+pipstep*pt
    lastsellopenprice!=0 && Bid<=lastsellopenprice-pipstep*pt

  3. #3
    Junior Member
    Join Date
    Jan 2010
    Posts
    21

    Default Cant add the code

    Hello,

    Im trying since this morning to add this simple code to the attached EA, but Im not able to.
    Can some experienced Coder add a Pipstep function to the Code? Thanks!

    Regards,
    Daldrar
    Attached Files Attached Files

  4. #4
    Junior Member
    Join Date
    Nov 2009
    Posts
    14

    Default

    HI,

    I am providing service for programming EA for MT4.
    Contact me privately if you need my help.

    thanks

Similar Threads

  1. Multiple position ea--pipstep
    By fxrock in forum MQL programming
    Replies: 0
    Last Post: 10-03-2012, 15:39
  2. Reverse Orders
    By IL_DUCA in forum MQL programming
    Replies: 0
    Last Post: 11-02-2010, 00:14
  3. Double orders
    By j_l in forum Trading discussion
    Replies: 5
    Last Post: 09-21-2010, 08:07
  4. Problem with Pipstep in Countertrend
    By Daldrar in forum MQL programming
    Replies: 0
    Last Post: 05-26-2010, 22:12
  5. Pipstep change as more orders are placed
    By BillR in forum MQL programming
    Replies: 9
    Last Post: 04-14-2009, 06:43

Tags for this Thread

add, how to, mt4, pips, programmer, programming, simple

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •