I need someone to program an EA - page 2

 

hello tutisanyi and zzuegg.

do u know what the demika means?

sory, maybe i am misunderstanding what demika want..

i make that ea based of macd bar from <0 to >0, then ea open buy..

when macd previous bar >macd current bar, so position will be closed on next bar..

this bar is macd histogram, not candlestick bar..

thx..

 

Unfortunately, it fails

 
qjol:

Van egy javaslatom az Ön számára, próbáld https://www.mql5.com/go?link=http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/


Unfortunately, it fails
 
qjol:

Van egy javaslatom az Ön számára, próbáld https://www.mql5.com/go?link=http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/


Unfortunately, it fails
 
hardyyanto:

hello tutisanyi and zzuegg.

do u know what the demika means?

sory, maybe i am misunderstanding what demika want..

i make that ea based of macd bar from <0 to >0, then ea open buy..

when macd previous bar >macd current bar, so position will be closed on next bar..

this bar is macd histogram, not candlestick bar..

thx..


1step BUY tp=20 sl=0 lots=0.1
2step Buy Limit Ask -20 tp= 20 sl = 0 lots=0.2
3step Buy Limit Ask -40 tp= 20 sl = 0 lots=0.3
4step Buy Limit Ask -70 tp= 40 sl = 0 lots=0.4
if you delete the rest from a sealed
and restarts

HELP

 
int init(){
Pip = Point;
if(Digits==3||Digits==5)Pip*=10;
TakeProfit *= Pip;
StopLose *= Pip;
}
Init is called on initial load and each time the time frame or pair is changed, EA is recompiled, or chart is refreshed. Therefor StopLose becomes 10X 100X 1000X etc.
//++++ 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
 

oh...

tutisanyi, u want to make ea like martiangle right..

dangerous type... win little pips, but sacrifice all margin..

better using on usdjpy from 6 morning-12 afternoon... because usdjpy always zigzag..

 
hardyyanto:

oh ...

tutisanyi, u akar tenni, mint martiangle ea jobb ..

Veszélyes típus ... győzelem kevés maggal, hanem áldozat minden különbözetet ..

jobb kihasználása révén, az USDJPY 6-tól délelőtt 12 - délutáni ... mert USDJPY mindig cakk ..


help me to write?
 
hardyyanto: because usdjpy always zigzag..
if thats true, we all would be rich ;)
 

ya, zzuegg..

but in 1 year, there is 1 or 2 month that can lose.. because sometimes in the morning, usdjpy can moving more than 150 pips in 5 minutes, if our ea open wrong position, so say good bye to margin.. hehe..

averaging and hedging ( martiangle) is the patner like brother sister that have opposite weakness, but that method that very many people using that for keep ea still longer profit..


tutisanyi,

wah..

like this:

int start()
{
   double pivot=iMA(NULL,1,16,0,MODE_SMMA,0,0);
   int total=OrdersTotal(),i,range=20,sl=0,slippage=10;
   if (total<1)
      {
      if (Ask>pivot) OrderSend(Symbol(),OP_BUY,0.1,Ask,0,0,Ask+range*Point,"Order Buy 1",11111,0,Blue);
      if (Ask<pivot) OrderSend(Symbol(),OP_SELL,0.1,Bid,0,0,Bid-range*Point,"Order Sell 1",11111,0,Red);
      }
   else
      {
         OrderSelect(total-1, SELECT_BY_POS, MODE_TRADES);
         if (OrderType()==OP_BUY)
         {
         if  ((Ask+1*Point >= (OrderOpenPrice()-range*Point)) && (Ask-1*Point <= (OrderOpenPrice()-range*Point)))
            {
               if (Ask>pivot) OrderSend(Symbol(),OP_BUY,OrderLots()*2,Ask,slippage,0,Ask+range*Point,"Double Lot Buy",11111,0,Blue);
               else 
               {
               OrderSend(Symbol(),OP_SELL,0.2,Bid,slippage,0,Bid-range*Point,"Hedging",11111,0,Red);
               OrderSend(Symbol(),OP_BUY,OrderLots()*2,Ask,slippage,0,Ask+range*Point,"Double Lot Buy",11111,0,Blue);               
               }
            }
         else if ((Ask+1*Point >= (OrderOpenPrice()+range*Point)) && (Ask-1*Point <= (OrderOpenPrice()+range*Point))) closebuy();
         }
      
         if (OrderType()==OP_SELL)
         {
         if ((Bid+1*Point >= (OrderOpenPrice()+range*Point)) && (Bid-1*Point <= (OrderOpenPrice()+range*Point)))
            {
               if (Bid<pivot) OrderSend(Symbol(),OP_SELL,OrderLots()*2,Bid,slippage,0,Bid-range*Point,"Double Lot Sell",11111,0,Red);
               else 
               {
                  OrderSend(Symbol(),OP_BUY,0.2,Ask,slippage,0,Ask+range*Point,"hedging",11111,0,Blue);
                  OrderSend(Symbol(),OP_SELL,OrderLots()*2,Bid,slippage,0,Bid-range*Point,"Double Lot Sell",11111,0,Red);                
               }
            }
         else if ((Bid+1*Point >= (OrderOpenPrice()-range*Point)) && (Bid-1*Point <= (OrderOpenPrice()-range*Point))) closesell();
         }
      }   
   return(0);
}
void closebuy()
{
int total=OrdersTotal(),i;
for(i=total-1; i>=0; i--)
  {
     OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
     if (OrderType()==OP_BUY) OrderClose(OrderTicket(),OrderLots(),Bid,5,CLR_NONE);
  }
   return(0);
}
void closesell()
{
int total=OrdersTotal(),i;
for(i=total-1; i>=0; i--)
  {
     OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
     if (OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),Ask,5,CLR_NONE);
  }
   return(0);
}



it's can profit too in september.. open untill 5 times, almost lose.. hehe..

ok, u can learn that code one by one and..... prepared to be rich....

the next explanation of coding, by master zzuegg....

hehe....