[Archive!] I will write any expert or indicator for free. - page 37

 
Folks, please send me plzzz.... I'd like a simple EA on an indicator to open on its signals, with stop and profit ... grateful in advance (mona and trailing to try ;)
 
Eroha >>:
Народ, чирканите plzzz.... простейшего советника по индюку, шоб открывался по сигналам его, с стопом и профитом...заранее благодарен (мона и трейлинг опробывать ;)

redrawn

 
Kubodel >>:
Добрый день, если у вас есть торговая система и вы хотите ее автоматизировать или же вам нужен индикатор, то я с удовольствием помогу вам.

Advisor on the i-CAi indicator

In the settings of the advisor must be
Order volume
Stop level
If 0, then minimal possible stop is exposed
Opening of pending orders is set in points from the current price if 0 then pending orders are not set


When the indicator line is broken, a market order is placed according to the set conditions. If this condition is met, the stopper is moved to the unlossed position and remains there until the order is closed.
To close the order, the order is placed when the price crosses the line of the indicator or at the stop.
After the closing process, when the price crosses the indicator line, a new market order is opened in the other direction under the same conditions.
Not more than one order can be opened in one direction.
This EA must be multi-currency.
When you close the order manually, the advisor must not open an order at the current price, and must wait for the conditions (price crossing the line of the indicator).

The Expert Advisor shall open pending orders on SELL STOP and BUY STOP at the level (set in the settings) of points from the current price, opening orders in random order in a specified range. The lifetime of a pending order starting from (to be set in settings) minutes in a random order.

After each profit more or equal (set in the settings advisor) pips advisor opens a market order of minimum volume in any direction, the lifetime of the order from 2-3 minutes the lifetime of the order is selected randomly from the specified interval.

//+------------------------------------------------------------------+
//|                                                         e-CA.mq4 |
//|                      Copyright © 2007, MetaQuotes Software Corp. |
//|                                       http://www.metaquotes.net/ |
//+------------------------------------------------------------------+

extern double  TakeProfit  = 60000;
extern int     StopLoss    = 250;
extern double  Lots        = 1.0;
extern int     Trailing    = 250;
extern int     Step        = 0;
extern int     MAGIC       = 121;
extern int     MAGIC1      = 122;
extern int     MAGIC2      = 123;
extern int     MAGIC3      = 124;

extern int MA.Period = 35;
extern int MA.method = 0;//MODE_SMA
extern int sigma_b=5;
extern int sigma_s=5;
int br=0;
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start()
  {
   int cnt, ticket, total, MAGIC, MAGIC1, MAGIC2, MAGIC3;
   
   if(Bars<100)
     {
      Print("bars less than 100");
      return(0);  
     }
//   if(TakeProfit<10)
//     {
//      Print("TakeProfit less than 10");
//      return(0);  // check TakeProfit
//     }
     
//double zz=iCustom(NULL,NextTF,"HiLo_Act_Next_Profi2",Range,0,1);
double zz1=iCustom(NULL,0,"i-CA",MA.Period,MA.method,0,0);
     
   total=OrdersTotal();
   if(total<1) 
     {
      // no opened orders identified
      if(AccountFreeMargin()<(1000*Lots))
        {
         Print("We have no money. Free Margin = ", AccountFreeMargin());
         return(0);  
        }
      // check for long position (BUY) possibility
      if((Ask>=(zz1+sigma_b*Point))&&(Close[1]<zz1)&& br<Bars)//||(Close[3]<zz1))
        {
         ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Ask-StopLoss*Point,Ask+TakeProfit*Point,"0",MAGIC,0,Green);
         br=Bars;
         if(ticket>0)
           {
            if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice());
           }
         else Print("Error opening BUY order : ",GetLastError()); 
         return(0); 
        }
      // check for short position (SELL) possibility
      if((Bid<=(zz1-sigma_s*Point))&&(Close[1]>zz1)&& br<Bars)//||(Close[3]>zz1))
        {
         ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Bid+StopLoss*Point,Bid-TakeProfit*Point,"0",MAGIC1,0,Red);
         br=Bars;
         if(ticket>0)
           {
            if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("SELL order opened : ",OrderOpenPrice());
           }
         else Print("Error opening SELL order : ",GetLastError()); 
         return(0); 
        }
      return(0);
     }
   for(cnt=0;cnt<total;cnt++)
     {
      OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
      if(OrderType()<=OP_SELL &&   // check for opened position 
         OrderSymbol()==Symbol())  // check for symbol
        {
         if(OrderType()==OP_BUY)   // long position is opened
           {
         if(Trailing>0)  
              {                 
               if(Bid-OrderOpenPrice()>Point*Trailing)
                 {
                  if((OrderStopLoss()<Bid-Point*Trailing && (Bid-Point*Trailing)-OrderStopLoss()>Step*Point) || OrderStopLoss()==0)
                    {
                     if(Bid-Point*Trailing!=OrderStopLoss()) OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*Trailing,OrderTakeProfit(),0);
                     return(0);
                    }
                 }
              }
           }
         else
           {
            if(Trailing>0)  
              {                 
               if((OrderOpenPrice()-Ask)>(Point*Trailing))
                 {
                  if((OrderStopLoss()>(Ask+Point*Trailing) && (OrderStopLoss()-(Ask+Point*Trailing)>Step*Point)) || OrderStopLoss()==0)
                    {
                     if(Ask+Point*Trailing!=OrderStopLoss()) OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*Trailing,OrderTakeProfit(),0);
                     return(0);
                    }
                 }
              }
           }
        }
     }
}
Files:
i-cai_2.mq4  3 kb
e-ca-5_2.mq4  5 kb
 
Forextd >>:

Советник на индикаторе i-CAi

В настройках советника должно быть
Объем ордера
Уровень стопа
колво пунктов установки безубытка если 0 то выставляется минимальны возможный стоп
Открытие отложек установливается в пунктах от текущей цены если 0 то отложки не выставляются


При пробое линии индикатора выставляется рыночный ордер по заданным условиям, если выполняется условие то стоп переносится в без убыток и остается там до закрытия ордера.
Закрытие ордера происходит при пересечении ценой линии индикатора или по стопу.
После закрытия при пересечении ценой линии индикатора откроывается новый рыночный ордер в другом направлении и по тем же условиям.
В одном направлении может быть открыто не более одного ордера.
Советник должен быть мультивалютный.
При закрытии ордера вручную советник не должен открывать ордер по текущей цене а дождаться выполнения условий (пересечение ценой линии индикатора).

Советник должен открывать отложенные ордера на SELL STOP и BUY STOP на уровне (задается в настройках) пунктов от текущей цены, открытие ордеров в случайном порядке в указанном диапазоне. Время жизни отложеного ордера от (задается в настройках) минут в случайном порядке.

После каждого профита более или равным (задается в настройках советника) пунков советник открывает рыночный ордер минимально допустимым объемом в любую сторону, время жизни ордера от 2-3 минут время жизни ордера выбирается случайно из указанного интервала.

The topic is alive at all ???????

 

The subject is alive and well - it's a free dream.
And the author, he may have found what he was looking for and is now soaking his heels in a sea of molten water.

 
Nibbler писал(а) >>

The subject is alive and well - it's a free dream.
And the author, he may have found what he was looking for and is now soaking his heels in a sea of molten water.


Just don't look for a freebie, pay the money, we'll write it for you.
 

Author

 

window view

 
Techno >>:


просто не нужно искать халяву, платите деньги, мы вам все напишем.

How much does it cost?

 
//+------------------------------------------------------------------+
//|                                               В одну сторону.mq4 |
//|                      Copyright © 2010, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

//---- input parameters
extern int       prof  = 50,
                 shift = 50,
                 stop  = 10000;
extern double    lot   = 0.1;
int tip;
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
   OrderSend(Symbol(),OP_SELL,lot,Bid,3,
               NormalizeDouble(Ask + stop*Point,Digits),
               NormalizeDouble(Bid - prof*Point,Digits)," ",777,Blue);
   OrderSend(Symbol(), OP_SELLLIMIT,lot, 
               Ask+Point*shift, 0, Ask+Point*shift+Point*stop, 
               Ask+Point*shift-Point*(prof+2)); 
   OrderSend(Symbol(), OP_SELLLIMIT,lot, 
               Ask+Point*(shift*2), 0, Ask+Point*(shift*2)+Point*stop, 
               Ask+Point*(shift*2)-Point*(prof+2));            
   OrderSend(Symbol(), OP_SELLSTOP,lot, 
               Bid-Point*shift, 0, Bid-Point*shift+Point*stop, 
               Bid-Point*shift-Point*prof); 
                                                          
}
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
   {
   for (int i=3; i<OrdersTotal(); i++){   
      if (OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==true){
         if (OrderSymbol()==Symbol()){
            tip = OrderType();
            lot = OrderLots();return;}}}
   
   if (tip==1)
               OrderSend(Symbol(), OP_SELLLIMIT,lot, 
               Ask+Point*shift, 0, Ask+Point*shift+Point*stop, 
               Ask+Point*shift-Point*prof);
   return(0);
}
//+------------------------------------------------------------------+

Please help with the code to make the EA constantly update the triggered pending orders. I am just beginning to learn the language, I really hope for some help))

Files:
Reason: