Mulai trading tanpa
risiko dan investasi
Dengan Bonus Permulaan 1000$
Dapatkan bonus
55%
ke akun anda!
Reply to Thread
Results 1 to 1 of 1

Thread: [Help] Menyelesaikan EA untuk pribadi kalo mau pakai silahkan

  1. #1
    Orang Asing
    ----
     
    sinzdnozzo is an unknown quantity at this point sinzdnozzo's Avatar
    Join Date
    Nov 2017
    Posts
    8
    Accumulated bonus
    0.63 USD (What is this?)
    Thanks
    4
    Thanked 3 Times in 3 Posts

    [Help] Menyelesaikan EA untuk pribadi kalo mau pakai silahkan

    Mohon bantuannya dong aku kesulitan dalam menambahkan stop profit dan pengaktifan Ea nya berdasarkan tanggal

    contohnya gini
    ketika profit yang di inginkan telah tercapai maka ea akan mati dan tidak akan open posisi lagi sampai pada tanggal yang ditentukan

    berikut ini ea buatan pribadi yang Namanya EA AdrenalinV14

    maklum baru pemula


    Spoiler Spoiler:
    extern int MagicNumber=10001;
    extern double Lots =0.01;
    extern double StopLoss=5;
    extern double TakeProfit=5;
    extern int TrailingStop=0;
    extern int Slippage=3;
    //+------------------------------------------------------------------+
    // expert start function
    //+------------------------------------------------------------------+
    int start()
    {
    double MyPoint=Point;
    if(Digits==3 || Digits==5) MyPoint=Point*10;

    double TheStopLoss=0;
    double TheTakeProfit=0;
    if( TotalOrdersCount()==0 )
    {
    int result=0;
    if((iMA(NULL,0,100,0,MODE_EMA,PRICE_CLOSE,2)<iMA(N ULL,0,50,0,MODE_EMA,PRICE_CLOSE,3))&&(iStochastic( NULL,0,5,3,3,MODE_EMA,1,MODE_MAIN,1)>20)&&(iStocha stic(NULL,0,5,3,3,MODE_EMA,1,MODE_SIGNAL,1)>20)&&( iStochastic(NULL,0,5,3,3,MODE_EMA,1,MODE_MAIN,0)<2 0)&&(iStochastic(NULL,0,5,3,3,MODE_EMA,1,MODE_SIGN AL,0)<20)) //
    {
    result=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage ,0,0,MagicNumber,0,Blue);
    if(result>0)
    {
    TheStopLoss=0;
    TheTakeProfit=0;
    if(TakeProfit>0) TheTakeProfit=Ask+TakeProfit*MyPoint;
    if(StopLoss>0) TheStopLoss=Ask-StopLoss*MyPoint;
    OrderSelect(result,SELECT_BY_TICKET);
    OrderModify(OrderTicket(),OrderOpenPrice(),Normali zeDouble(TheStopLoss,Digits),NormalizeDouble(TheTa keProfit,Digits),0,Green);
    }
    return(0);
    }
    if((iMA(NULL,0,50,0,MODE_EMA,PRICE_CLOSE,3)<iMA(NU LL,0,100,0,MODE_EMA,PRICE_CLOSE,2))&&(iStochastic( NULL,0,5,3,3,MODE_EMA,1,MODE_MAIN,1)>80)&&(iStocha stic(NULL,0,5,3,3,MODE_EMA,1,MODE_SIGNAL,1)>80)&&( iStochastic(NULL,0,5,3,3,MODE_EMA,1,MODE_MAIN,0)<8 0)&&(iStochastic(NULL,0,5,3,3,MODE_EMA,1,MODE_SIGN AL,0)<80)) //
    {
    result=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippag e,0,0,MagicNumber,0,Red);
    if(result>0)
    {
    TheStopLoss=0;
    TheTakeProfit=0;
    if(TakeProfit>0) TheTakeProfit=Bid-TakeProfit*MyPoint;
    if(StopLoss>0) TheStopLoss=Bid+StopLoss*MyPoint;
    OrderSelect(result,SELECT_BY_TICKET);
    OrderModify(OrderTicket(),OrderOpenPrice(),Normali zeDouble(TheStopLoss,Digits),NormalizeDouble(TheTa keProfit,Digits),0,Green);
    }
    return(0);
    }
    }

    for(int cnt=0;cnt<OrdersTotal();cnt++)
    {
    OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
    if(OrderType()<=OP_SELL &&
    OrderSymbol()==Symbol() &&
    OrderMagicNumber()==MagicNumber
    )
    {
    if(OrderType()==OP_BUY)
    {
    if(TrailingStop>0)
    {
    if(Bid-OrderOpenPrice()>MyPoint*TrailingStop)
    {
    if(OrderStopLoss()<Bid-MyPoint*TrailingStop)
    {
    OrderModify(OrderTicket(),OrderOpenPrice(),Bid-TrailingStop*MyPoint,OrderTakeProfit(),0,Green);
    return(0);
    }
    }
    }
    }
    else
    {
    if(TrailingStop>0)
    {
    if((OrderOpenPrice()-Ask)>(MyPoint*TrailingStop))
    {
    if((OrderStopLoss()>(Ask+MyPoint*TrailingStop)) || (OrderStopLoss()==0))
    {
    OrderModify(OrderTicket(),OrderOpenPrice(),Ask+MyP oint*TrailingStop,OrderTakeProfit(),0,Red);
    return(0);
    }
    }
    }
    }
    }
    }
    return(0);
    }

    int TotalOrdersCount()
    {
    int result=0;
    for(int i=0;i<OrdersTotal();i++)
    {
    OrderSelect(i,SELECT_BY_POS ,MODE_TRADES);
    if (OrderMagicNumber()==MagicNumber) result++;

    }
    return (result);
    }

  2. <a href="http://indo.mt5.com/">Forex Portal MT5</a>
Reply to Thread

Posting Permissions

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