Results 1 to 4 of 4

Thread: Cara menukar EA untuk menggunakan Banyak Separuh

  1. #1
    Bolehkah ia mengubah EA untuk beroperasi dengan Sebahagian Separuh? Platform dagangan saya membolehkan .1, .2, .3 dan sebagainya. Terdapat bahagian Tutup pesanan di X pip dalam EA ini tetapi anda perlu berdagang sekurang-kurangnya dua lot untuk tujuan bekerja.

    Adakah ini sesuatu yang boleh saya ubah?




    // ----------------------------------------------- -------------------
    //| editor visual luktom.mq4 |
    //| luktom :: #ukasz Tomaszkiewicz |
    //|
    http://luktom.biz/|
    // ----------------------------------------------- -------------------
    #property copyright luktom :: #ukasz Tomaszkiewicz
    #property link
    http://luktom.biz/
    #include lt; stderror.mqhgt;
    #include lt; stdlib.mqhgt;
    extern bool use_timer = true;
    extern int default_sl_level = 10;
    extern int default_tp_level = 500;
    warna luar sl_color = Merah;
    extern int sl_style = STYLE_DASH;
    warna luar tp_color = Aqua;
    extern int tp_style = STYLE_DASH;
    warna luar be_color = Kuning;
    extern int be_style = STYLE_DASH;
    extern int be_offset = 1;
    warna luar cl_color = Ungu;
    extern int cl_style = STYLE_DASH;
    extern bool use_cp = false;
    warna luar cp_color = Biru;
    extern int cp_style = STYLE_DASH;
    extern int cp_level = 0;
    extern int cp_closedlevel = 0;
    extern double cp_lots = 0;
    warna luar ol_sell_color = Jeruk;
    extern int ol_sell_style = STYLE_DASH;
    warna luar ol_buy_color = Biru;
    extern int ol_buy_style = STYLE_DASH;
    extern bool use_be = false;
    extern int default_be_level = 10;
    extern bool use_cl = false;
    extern int default_cl_level = 0;
    extern bool delete_on_deinit = true;
    void init ()

    jika (use_timer)
    pemasa ();




    batal pemasa ()
    sementara (benar)
    Tidur (1000);

    jika (IsStopped ())
    kembali;


    mulakan ();



    tidak sah deinit ()

    jika (delete_on_deinit)
    untuk (int I = 0; ilt; ObjectsTotal (); I )
    nama rentetan = ObjectName (I);

    jika (String Substr (nama, 0,4) == cinta)
    ObjectDelete (nama);





    tidak sah mula () {
    untuk (int I = 0; ilt; OrdersTotal (); I ) {
    jika (OrderSelect (I, SELECT_BY_POS)) {
    jika (OrderSymbol () == Simbol ()) {
    int dgts = MarketInfo (OrderSymbol (), MODE_DIGITS);

    jika (ObjectFind (lvoe_ol_ OrderTicket ()) == - 1) lain

    jika (OrderStopLoss () gt; 0 || default_sl_levelgt; 0)
    jika (ObjectFind (lvoe_sl_ OrderTicket ()) == - 1)

    jika (OrderStopLoss () == 0)
    ObjectCreate (lvoe_sl_ OrderTicket (), OBJ_HLINE, 0, Masa [0], OrderOpenPrice () - orderDir (OrderType ()) * default_sl_level * Point);
    lain
    ObjectCreate (lvoe_sl_ OrderTicket (), OBJ_HLINE, 0, Time [0], OrderStopLoss ());

    ObjectSet (lvoe_sl_ OrderTicket (), OBJPROP_COLOR, sl_color);
    ObjectSet (lvoe_sl_ OrderTicket (), OBJPROP_STYLE, sl_style);
    ObjectSetText (lvoe_sl_ OrderTicket (), # OrderTicket () pengurangan berhenti, 11);

    lain
    align (lvoe_sl_ OrderTicket ());
    jika (NormalizeDouble (OrderStopLoss (), dgts)!) = NormalizeDouble (ObjectGet (lvoe_sl_ OrderTicket (), OBJPROP_PRICE1), dgts))
    jika (! OrderModify (OrderTicket (), OrderOpenPrice (), ObjectGet (lvoe_sl_ OrderTicket (), OBJPROP_PRICE1), OrderTakeProfit (), OrderExpiration (), CLR_NONE)
    //Alert (ErrorDescription (GetLastError ()));

    berterusan;



    lain
    jika (ObjectFind (lvoe_sl_ OrderTicket ())!) = -1)
    ObjectDelete (lvoe_sl_ OrderTicket ());



    jika (OrderTakeProfit () gt; 0 || default_tp_level)
    jika (ObjectFind (lvoe_tp_ OrderTicket ()) == - 1)

    jika (OrderTakeProfit () == 0)
    ObjectCreate (lvoe_tp_ OrderTicket (), OBJ_HLINE, 0, Masa [0], OrderOpenPrice () orderDir (OrderType ()) * default_tp_level * Point);
    lain
    ObjectCreate (lvoe_tp_ OrderTicket (), OBJ_HLINE, 0, Masa [0], OrderTakeProfit ());

    ObjectSet (lvoe_tp_ OrderTicket (), OBJPROP_COLOR, tp_color);
    ObjectSet (lvoe_tp_ OrderTicket (), OBJPROP_STYLE, tp_style);

    lain
    align (lvoe_tp_ OrderTicket ());
    jika (NormalizeDouble (OrderTakeProfit (), 4)! = NormalizeDouble (ObjectGet (lvoe_tp_ OrderTicket (), OBJPROP_PRICE1), 4))
    jika (! OrderModify (OrderTicket (), OrderOpenPrice (), OrderStopLoss (), ObjectGet (lvoe_tp_ OrderTicket (), OBJPROP_PRICE1), OrderExpiration (), CLR_NONE)
    //Alert (ErrorDescription (GetLastError ()));

    berterusan;



    lain
    jika (ObjectFind (lvoe_tp_ OrderTicket ())!) = -1)
    ObjectDelete (lvoe_tp_ OrderTicket ());



    jika (use_cp cp_levelgt; 0)
    jika (ObjectFind (lvoe_cp_ OrderTicket ()) == - 1)
    jika (OrderType () == OP_BUY lain
    jika (OrderType () == OP_BUY)
    jika (MarketInfo (OrderSymbol (), MODE_BID) gt; ObjectGet (lvoe_cp_ OrderTicket (), OBJPROP_PRICE1))
    jika (OrderClose (OrderTicket (), cp_lots, MarketInfo (OrderSymbol (), MODE_BID), 0))
    ObjectSet (lvoe_cp_ OrderTicket (), OBJPROP_PRICE1, MarketInfo (OrderSymbol (), MODE_BID) cp_closedlevel * MarketInfo (OrderSymbol (), MODE_POINT));

    berterusan;


    jika (OrderType () == OP_SELL)
    jika (MarketInfo (OrderSymbol (), MODE_ASK) lt; ObjectGet (lvoe_cp_ OrderTicket (), OBJPROP_PRICE1))
    jika (OrderClose (OrderTicket (), cp_lots, MarketInfo (OrderSymbol (), MODE_ASK), 0))
    ObjectSet (lvoe_cp_ OrderTicket (), OBJPROP_PRICE1, MarketInfo (OrderSymbol (), MODE_ASK) -cp_closedlevel * MarketInfo (OrderSymbol (), MODE_POINT));

    berterusan;





    jika (use_be) {
    jika (ObjectFind (lvoe_be_ OrderTicket ()) == - 1) else {
    jika (OrderType () == OP_BUY) {
    jika (MarketInfo (OrderSymbol (), MODE_BID) gt; ObjectGet (lvoe_be_ OrderTicket (), OBJPROP_PRICE1)) {
    ObjectSet (lvoe_sl_ OrderTicket (), OBJPROP_PRICE1, OrderOpenPrice () be_offset * MarketInfo (OrderSymbol (), MODE_POINT));
    /*
    jika (! OrderModify (OrderTicket (), OrderOpenPrice (), OrderOpenPrice (), OrderTakeProfit (), OrderExpiration (), CLR_NONE))
    //Alert (ErrorDescription (GetLastError ()));

    *
    berterusan;
    }
    }
    jika (OrderType () == OP_SELL)
    jika (MarketInfo (OrderSymbol (), MODE_ASK) lt; ObjectGet (lvoe_be_ OrderTicket (), OBJPROP_PRICE1))
    ObjectSet (lvoe_sl_ OrderTicket (), OBJPROP_PRICE1, OrderOpenPrice () - be_offset * MarketInfo (OrderSymbol (), MODE_POINT));
    /*
    jika (! OrderModify (OrderTicket (), OrderOpenPrice (), OrderOpenPrice (), OrderTakeProfit (), OrderExpiration (), CLR_NONE))
    //Alert (ErrorDescription (GetLastError ()));

    *
    berterusan;


    }
    }

    jika (use_cl)
    jika (ObjectFind (lvoe_cl_ OrderTicket ()) == - 1)
    jika (OrderType ()!) = OP_BUY OrderType ()! = OP_SELL)
    lain OrderType () == OP_SELLSTOP)
    jika (MarketInfo (OrderSymbol (), MODE_ASK) gt; ObjectGet (lvoe_cl_ OrderTicket (), OBJPROP_PRICE1))
    OrderDelete (OrderTicket ());


    jika (OrderType () == OP_BUY


    }

    }
    }

    untuk (I = 0; ilt; PerintahHistoryTotal (); I )
    jika (OrderSelect (I, SELECT_BY_POS, MODE_HISTORY))
    jika (ObjectFind (lvoe_ol_ OrderTicket ())!) = -1)
    ObjectDelete (lvoe_ol_ OrderTicket ());

    jika (ObjectFind (lvoe_tp_ OrderTicket ())!) = -1)
    ObjectDelete (lvoe_tp_ OrderTicket ());

    jika (ObjectFind (lvoe_sl_ OrderTicket ())!) = -1)
    ObjectDelete (lvoe_sl_ OrderTicket ());

    jika (ObjectFind (lvoe_be_ OrderTicket ())!) = -1)
    ObjectDelete (lvoe_be_ OrderTicket ());

    jika (ObjectFind (lvoe_cl_ OrderTicket ())!) = -1)
    ObjectDelete (lvoe_cl_ OrderTicket ());

    jika (ObjectFind (lvoe_cp_ OrderTicket ())!) = -1)
    ObjectDelete (lvoe_cp_ OrderTicket ());



    }
    tidak sah jajaran (nama rentetan)
    ObjectSet (tajuk, OBJPROP_PRICE1, NormalizeDouble (ObjectGet (tajuk, OBJPROP_PRICE1), Digit));

    int orderDir (int oType)

  2. #2
    Sila padamkan kod anda dalam tag kod. Atau cukup pasang fail mq4 anda. Ia sangat membosankan bagi sesiapa sahaja untuk membaca kod yang tidak disengajakan atau diindentikasi.

  3. #3

  4. #4
    Adakah terdapat sebahagian kod yang menentukan jika EA akan mempunyai keupayaan untuk beroperasi dalam pip?

Kebenaran Posting

  • Anda tidak boleh menghantar thread baru
  • Anda tidak boleh membalas kiriman
  • Anda tidak boleh mengedit siaran anda
  • Anda tidak boleh menyiarkan lampiran
  •  
  • Kod BB Hidup
  • Smilies Hidup
  • Kod [IMG] adalah Hidup
  • Kod [VIDEO] adalah Hidup
  • Kod HTML Tidak Hidup
Polisi Kuki
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.