web statistics


Tanya script 5buy dan 5sell

Discussion in 'MetaTrader 4 dan MQL' started by sitriofx, Apr 28, 2015.

  1. sitriofx

    sitriofx
    Expand Collapse
    New Member

    Joined:
    Apr 16, 2015
    Messages:
    8
    Likes Received:
    0
    Saya mau pakai script untuk buy untuk 5 sekaligus nantinya 10 sekaligus, dan untuk sell begitu juga, tapi saya modif script dari forexindo malah ndak bisa di eksekusi mohon pencerahan dari master-master di sini supaya dapat menggunakan script ini :

    //====================================================
    //IA1_script_buy_multiple.mq4
    //depok.investor@gmail.com
    //Note: Adjust lot1,takeprofit1 and stoploss1 as u like
    //build:31/10/2011 taufik
    //====================================================
    [HASHTAG]#property[/HASHTAG] copyright "IA1_2011"
    [HASHTAG]#property[/HASHTAG] link "depok.investor@gmail.com"

    double lot1 =0.01;
    int total_entry =1;
    int takeprofit1 =150;
    int stoploss1 =99999;
    int slippage1 =50;
    int repeat =5;

    int start()
    {

    while (repeat<=total_entry)
    {
    buy(lot1,takeprofit1,stoploss1,slippage1);
    Sleep(1000);
    int err=GetLastError();
    if (err==0) {repeat++;}
    else {repeat=repeat;}
    }
    }
    void buy(double lot, double tp, double sl, int slip)
    {
    double askprice = Ask;
    if (tp>0)tp = askprice + (tp * Point);
    if (sl>0)sl = askprice - (sl *Point);
    OrderSend(Symbol(), OP_BUY, lot, askprice, slip, sl, tp, "IA1_Buy-"+repeat, 0, 0, Blue);
    return(0);
    }

    dan script yang sama utk sell :

    //====================================================
    //IA1_script_sell_multiple.mq4
    //depok.investor@gmail.com
    //Note: Adjust lot1,takeprofit1 and stoploss1 as u like
    //build:31/10/2011 taufik
    //====================================================
    [HASHTAG]#property[/HASHTAG] copyright "IA1_2011"
    [HASHTAG]#property[/HASHTAG] link "depok.investor@gmail.com"

    double lot1 =0.01;
    int total_entry =1;
    int takeprofit1 =150;
    int stoploss1 =99999;
    int slippage1 =50;
    int repeat =5;

    int start()
    {
    while (repeat<=total_entry)
    {
    sell(lot1,takeprofit1,stoploss1,slippage1);
    Sleep(1000);
    int err=GetLastError();
    if (err==0) {repeat++;}
    else {repeat=repeat;}
    }
    }

    void sell(double lot, double tp, double sl, int slip)
    {
    double bidprice = Bid;
    if (tp>0) tp = bidprice - (tp * Point);
    if (sl>0) sl = bidprice + (sl * Point);
    OrderSend(Symbol(), OP_SELL, lot, bidprice, slip, sl, tp, "IA1_Sell-"+repeat, 0, 0, Red);
    return(0);
    }

    Ini untuk metatrader lima digit
    Saya mau lot :0.01
    take profit : 15 pips
    stoploss : 250 pips
    slippage : 5 pips

    saya mau sekali klik 5 kali op dan 10 kali op

    apa ini salah modif?

    double lot1 =0.01;
    int total_entry =1;
    int takeprofit1 =150;
    int stoploss1 =99999;
    int slippage1 =50;
    int repeat =5;
     
    #1 sitriofx, Apr 28, 2015
    Last edited by a moderator: Apr 29, 2015
  2. sitriofx

    sitriofx
    Expand Collapse
    New Member

    Joined:
    Apr 16, 2015
    Messages:
    8
    Likes Received:
    0
    ndak ada yang bantu:(:(:(:(:(:mad::mad::mad::mad::mad:
     
  3. merapi3337

    merapi3337
    Expand Collapse
    Member

    Joined:
    Dec 4, 2008
    Messages:
    64
    Likes Received:
    0
    coba ini
     

    Attached Files:

  4. ianhai

    ianhai
    Expand Collapse
    New Member

    Joined:
    Apr 2, 2009
    Messages:
    2
    Likes Received:
    0
    thx bro...ini yg ane cari...
     

Share This Page