ORDER MANAGEMENT FOR EA DEVELOPMENT – v1.5

0
(0)
Name:
ORDER MANAGEMENT FOR EA DEVELOPMENT - v1.5
Author: ardi_nunu (2011.04.06 14:59)
Downloaded: 4022
Download:
ORDER MANAGEMENT FOR EA DEVELOPMENT - v1.5 1
 ARD ORDER MANAGEMENT v1.5.mq4 (9.2 Kb) View
ORDER MANAGEMENT FOR EA DEVELOPMENT - v1.5

ORDER MANAGEMENT FOR EA DEVELOPMENT - v1.5 2

1 comment  To post a new comment, please log in or register

  1. stoploss = NormalizeDouble(Bid-sl*Point,Digits);
    takeprofit = NormalizeDouble(Ask+tp*Point,Digits);

    Does not adjust for 5 digit brokers (TP, SL, AND slippage)

    //++++ These are adjusted for 5 digit brokers.
    double  pips2points,    // slippage  3 pips    3=points    30=points
            pips2dbl;       // Stoploss 15 pips    0.0015      0.00150
    int     Digits.pips;    // DoubleToStr(dbl/pips2dbl, Digits.pips)
    int     init(){
        if (Digits == 5 || Digits == 3){    // Adjust for five (5) digit brokers.
                    pips2dbl    = Point*10; pips2points = 10;   Digits.pips = 1;
        } else {    pips2dbl    = Point;    pips2points =  1;   Digits.pips = 0; }
        // OrderSend(... Slippage.Pips * pips2points, Bid - StopLossPips * pips2dbl

    On ECN brokers you must orderSend and then set tp/sl


  2.              for(i=0; i<total; i++)
                  {
                 if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==true)
                      {
                         if(Symbol() == OrderSymbol())

    When closeing in the presence of multiple orders (multiple charts) you MUST count down.

        for(pos = OrdersTotal()-1; pos >= 0 ; pos--) if (
            OrderSelect(pos, SELECT_BY_POS)                 // Only my orders w/
        &&  OrderMagicNumber()  == magic.number             // my magic number
        &&  OrderSymbol()       == Symbol() ){              // and my pair.

  3. Doesn't use a magic number, so in incompatible with all other EAs and manual trading.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?



Author: Forex Wiki Team
We are a team of highly experienced Forex Traders [2000-2023] who are dedicated to living life on our own terms. Our primary objective is to attain financial independence and freedom, and we have pursued self-education and gained extensive experience in the Forex market as our means to achieve a self-sustainable lifestyle.