Rating: Full Star Full Star Full Star Empty Star Empty Star
I will program your PROFITABLE trading system into an EA for free!
Previous 1 2 3 4 5 Next
mondalsys

Member Since Mar 24, 2010  2 posts Trust no indicator - Trust the market - Trade only grid! (mondalsys) Apr 15 2013 at 07:52
Hello Freefox,

can you sent me your emailadress per PM? I have an interesting strategy that i personally trade.
I have started a new demo at the beginning of this month:
https://www.myfxbook.com/members/mondalsys/spt-system-2013/538506

If you are interested please contact me.

Thanks

mondalsys

Freefox

Member Since Sep 12, 2012  12 posts Freefox Apr 18 2013 at 08:14
Hi Mondalsys,

Sent my email via PM.

Burnedlink

Member Since Feb 19, 2014  1 posts Burnedlink Feb 19 2014 at 21:57
I Have a wery good momentum pa strategy i managed to make up its rather new for me if you are intressted and have time over send a Pm .

But iam not sure how advanced a Ea can be made.

Security ofcourse of highest priority only between programer and me .

Take care and bless.

ejhc842NFL

Member Since Nov 22, 2013  1 posts ejhc842NFL Apr 08 2014 at 07:02
Can you please make a simple modification to an EA ?
-------------------------------------------------------------------------

Hello.
Can you please make a small modification to the EA below ?
Can you please make, that instead of opening a BUY Trade, it will open a SELL Trade, and instead of opening a SELL Trade, it will open a BUY Trade ?
Another problem with this EA: Sometimes it doesn't trade at all for hours or more.
can you tell me why, and how to correct this problem ?
Thank you.



//----------------------- INCLUDES
#include <stdlib.mqh>


//----------------------- EA PARAMETER
extern string
         Expert_Name = '---------- Price Cross MA v0.3';
extern double
         StopLoss = 30,
         TakeProfit = 25,
         TrailingStop = 25;

extern string
         MA_Setting = '---------- Moving Average Setting';
extern int
         MAPeriod = 30,
         MAMethod = 0, //0:SMA 1:EMA 2:SMMA 3:LWMA
         MAPrice = 0; //0:CLOSE 1:OPEN
        
extern string
         Order_Setting = '---------- Order Setting';
extern int
         NumberOfTries = 5,
         Slippage = 5;
extern bool
         StopAndReverse = true; // if signal change, exit and reverse order

extern string
         Time_Parameters = '---------- EA Active Time';
extern bool
         UseHourTrade = false;
extern int
         StartHour = 10,
         EndHour = 11;
        
extern string
         MM_Parameters = '---------- MoneyManagement by L.Williams';
extern double
         Lots = 1;
extern bool
         MM = true, //Use Money Management or not
         AccountIsMicro = false; //Use Micro-Account or not
extern int
         Risk = 10; //10%

extern bool
         Show_Settings = true;


//----------------------- GLOBAL VARIABLE
static int
         TimeFrame = 0;
string
         TicketComment = 'PriceCrossMA v0.3';
int
         MagicNumber = 20060410;




//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
   return(0);
}

//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
 
//----------------------- PREVENT RE-COUNTING WHILE USER CHANGING TIME FRAME
//----------------------- SOURCE : CODERSGURU
   TimeFrame=Period();
   return(0);

}


//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start()
{

   double
         OpenPricePrevious,
         ClosePricePrevious,
         OpenPriceCurrent,
         MAValuePrevious,
         MAValueCurrent;
                 
   int
         cnt,
         ticket,
         total;
        
//----------------------- TIME FILTER
   if (UseHourTrade)
   {
      if(!(Hour()>=StartHour && Hour()<=EndHour))
      {
         Comment('Non-Trading Hours!');
         return(0);
      }
   }

        
//----------------------- CHECK CHART NEED MORE THAN 100 BARS
   if(Bars<100)
   {
      Print('bars less than 100');
      return(0);
   }


//----------------------- ADJUST LOTS IF USING MONEY MANAGEMENT
   if(MM==true) Lots = subLotSize();


//----------------------- ENTRY

//----------------------- TOTAL ORDER BASE ON MAGICNUMBER AND SYMBOL
   total = subTotalTrade();

//----------------------- SET VALUE FOR VARIABLE
      OpenPricePrevious = iOpen (NULL,TimeFrame,1);
      ClosePricePrevious = iClose(NULL,TimeFrame,1);
      OpenPriceCurrent = iOpen (NULL,TimeFrame,0);
      MAValuePrevious = iMA (NULL,TimeFrame,MAPeriod,0,MAMethod,MAPrice,1);
      MAValueCurrent = iMA (NULL,TimeFrame,MAPeriod,0,MAMethod,MAPrice,0);


//----------------------- IF NO TRADE
   if(total < 1)
   {
//----------------------- BUY CONDITION
      if(OpenPricePrevious<MAValuePrevious &&
         OpenPriceCurrent >MAValueCurrent)
      {
         ticket = subOpenOrder(OP_BUY); // open BUY order
         subCheckError(ticket,'BUY');
         return(0);
      }

//----------------------- SELL CONDITION
      if(OpenPricePrevious>MAValuePrevious &&
         OpenPriceCurrent <MAValueCurrent)
      {
         ticket = subOpenOrder(OP_SELL); // open SELL order
         subCheckError(ticket,'SELL');
         return(0);
      }
      return(0);
   }
  
//----------------------- CHECK OPEN ORDER
//----------------------- FOR SIGNAL CHANGE - STOP AND REVERSE
//----------------------- AND TRAILING STOP
   total = OrdersTotal();

   if(TrailingStop>0 ||
      StopAndReverse)
   {
      for(cnt=0;cnt<total;cnt++)
      {
         OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);

         if(OrderType()<=OP_SELL &&
            OrderSymbol()==Symbol() &&
            OrderMagicNumber()==MagicNumber)
         {
            if(OrderType()==OP_BUY) // buy position is opened
            {
               if(StopAndReverse) // signal change, close order and open new one
               {
                  if(OpenPricePrevious>MAValuePrevious &&
                     OpenPriceCurrent <MAValueCurrent)
                  {
                     OrderClose(OrderTicket(),OrderLots(),Bid,Slippage,Violet); // close buy order
                     ticket = subOpenOrder(OP_SELL); // open sell order
                     subCheckError(ticket,'SELL');
                     return(0);
                  }
               }
               if(TrailingStop>0) // trailing stop
               {
                  if(Bid-OrderOpenPrice()>Point*TrailingStop &&
                     OrderStopLoss()<Bid-Point*TrailingStop)
                  {
                     OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderTakeProfit(),0,Green);
                     return(0);
                  }
               }
            }
            if(OrderType()==OP_SELL) // sell position is opened
            {
               if(StopAndReverse) // signal change, close order and open new one
               {
                  if(OpenPricePrevious<MAValuePrevious &&
                     OpenPriceCurrent >MAValueCurrent)
                  {
                     OrderClose(OrderTicket(),OrderLots(),Ask,Slippage,Violet); // close sell order
                     ticket = subOpenOrder(OP_BUY); // open buy order
                     subCheckError(ticket,'BUY');
                     return(0);
                  }
               }
               if(TrailingStop>0) // trailing stop
               {
                  if(OrderOpenPrice()-Ask>Point*TrailingStop)
                  {
                  if(OrderStopLoss()>Ask+Point*TrailingStop || OrderStopLoss()==0)
                  {
                     OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderTakeProfit(),0,Red);
                     return(0);
                  }
                  }
               }
            }
         }
      }
   }
   return(0);
}

//----------------------- END PROGRAM

//+------------------------------------------------------------------+
//| FUNCTION DEFINITIONS
//+------------------------------------------------------------------+

//----------------------- MONEY MANAGEMENT FUNCTION
//----------------------- SOURCE : CODERSGURU
double subLotSize()
{
     double lotMM = MathCeil(AccountFreeMargin() * Risk / 1000) / 100;
     
      if(AccountIsMicro==false) //normal account
      {
         if (lotMM < 0.1) lotMM = Lots;
         if ((lotMM > 0.5) && (lotMM < 1)) lotMM=0.5;
         if (lotMM > 1.0) lotMM = MathCeil(lotMM);
         if (lotMM > 100) lotMM = 100;
      }
      else //micro account
      {
         if (lotMM < 0.01) lotMM = Lots;
         if (lotMM > 1.0) lotMM = MathCeil(lotMM);
         if (lotMM > 100) lotMM = 100;
      }
     
      return (lotMM);
}

//----------------------- NUMBER OF ORDER BASE ON SYMBOL AND MAGICNUMBER FUNCTION
int subTotalTrade()
{
   int
      cnt,
      total;
   for(cnt=0;cnt<OrdersTotal();cnt++){
      if(OrderSelect(cnt,SELECT_BY_POS)){
         if(OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber){
            total++;
         }
      }
   }
   return(total);
}

//----------------------- OPEN ORDER FUNCTION
//----------------------- SOURCE : CODERSGURU
int subOpenOrder(int type)
{
   int
         ticket = 0,
         err = 0,
         c = 0;
        
   double
         aStopLoss = 0,
         aTakeProfit = 0,
         bStopLoss = 0,
         bTakeProfit = 0;

   if(StopLoss!=0)
   {
      aStopLoss = Ask-StopLoss*Point;
      bStopLoss = Bid+StopLoss*Point;
   }
  
   if(TakeProfit!=0)
   {
      aTakeProfit = Ask+TakeProfit*Point;
      bTakeProfit = Bid-TakeProfit*Point;
   }
  
   if(type==OP_BUY)
   {
      for(c=0;c<NumberOfTries;c++)
      {
         ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,aStopLoss,aTakeProfit,TicketComment,MagicNumber,0,Green);
         err=GetLastError();
         if(err==0)
         {
            break;
         }
         else
         {
            if(err==4 || err==137 ||err==146 || err==136) //Busy errors
            {
               Sleep(5000);
               continue;
            }
            else //normal error
            {
               break;
            }
         }
      }
   }
   if(type==OP_SELL)
   {
      for(c=0;c<NumberOfTries;c++)
      {
         ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,bStopLoss,bTakeProfit,TicketComment,MagicNumber,0,Red);
         err=GetLastError();
         if(err==0)
         {
            break;
         }
         else
         {
            if(err==4 || err==137 ||err==146 || err==136) //Busy errors
            {
               Sleep(5000);
               continue;
            }
            else //normal error
            {
               break;
            }
         }
      }
   }
   return(ticket);
}

//----------------------- CHECK ERROR CODE FUNCTION
//----------------------- SOURCE : CODERSGURU
void subCheckError(int ticket, string Type)
{
    if(ticket>0)
    {
      if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print(Type + ' order opened : ',OrderOpenPrice());
    }
    else Print('Error opening ' + Type + ' order : ', ErrorDescription(GetLastError()));
}


//----------------------- END FUNCTION

swarajthakur

Member Since Aug 08, 2013  3 posts Nicholii (swarajthakur) Apr 08 2014 at 15:17
Simply change 'OP_BUY' with 'OP_SELL' and 'OP_SELL' with 'OP_BUY' in the code as seen below..

----------------------- BUY CONDITION
      if(OpenPricePrevious<MAValuePrevious &&
         OpenPriceCurrent >MAValueCurrent)
      {
         ticket = subOpenOrder(OP_BUY); // open BUY order
         subCheckError(ticket,'BUY');
         return(0);
      }

//----------------------- SELL CONDITION
      if(OpenPricePrevious>MAValuePrevious &&
         OpenPriceCurrent <MAValueCurrent)
      {
         ticket = subOpenOrder(OP_SELL); // open SELL order
         subCheckError(ticket,'SELL');
         return(0);
      }
      return(0);
   }

ejhc842NFL posted:
Can you please make a simple modification to an EA ?
-------------------------------------------------------------------------

Hello.
Can you please make a small modification to the EA below ?
Can you please make, that instead of opening a BUY Trade, it will open a SELL Trade, and instead of opening a SELL Trade, it will open a BUY Trade ?
Another problem with this EA: Sometimes it doesn't trade at all for hours or more.
can you tell me why, and how to correct this problem ?
Thank you.



//----------------------- INCLUDES
#include <stdlib.mqh>


//----------------------- EA PARAMETER
extern string
         Expert_Name = '---------- Price Cross MA v0.3';
extern double
         StopLoss = 30,
         TakeProfit = 25,
         TrailingStop = 25;

extern string
         MA_Setting = '---------- Moving Average Setting';
extern int
         MAPeriod = 30,
         MAMethod = 0, //0:SMA 1:EMA 2:SMMA 3:LWMA
         MAPrice = 0; //0:CLOSE 1:OPEN
        
extern string
         Order_Setting = '---------- Order Setting';
extern int
         NumberOfTries = 5,
         Slippage = 5;
extern bool
         StopAndReverse = true; // if signal change, exit and reverse order

extern string
         Time_Parameters = '---------- EA Active Time';
extern bool
         UseHourTrade = false;
extern int
         StartHour = 10,
         EndHour = 11;
        
extern string
         MM_Parameters = '---------- MoneyManagement by L.Williams';
extern double
         Lots = 1;
extern bool
         MM = true, //Use Money Management or not
         AccountIsMicro = false; //Use Micro-Account or not
extern int
         Risk = 10; //10%

extern bool
         Show_Settings = true;


//----------------------- GLOBAL VARIABLE
static int
         TimeFrame = 0;
string
         TicketComment = 'PriceCrossMA v0.3';
int
         MagicNumber = 20060410;




//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
   return(0);
}

//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
 
//----------------------- PREVENT RE-COUNTING WHILE USER CHANGING TIME FRAME
//----------------------- SOURCE : CODERSGURU
   TimeFrame=Period();
   return(0);

}


//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start()
{

   double
         OpenPricePrevious,
         ClosePricePrevious,
         OpenPriceCurrent,
         MAValuePrevious,
         MAValueCurrent;
                 
   int
         cnt,
         ticket,
         total;
        
//----------------------- TIME FILTER
   if (UseHourTrade)
   {
      if(!(Hour()>=StartHour && Hour()<=EndHour))
      {
         Comment('Non-Trading Hours!');
         return(0);
      }
   }

        
//----------------------- CHECK CHART NEED MORE THAN 100 BARS
   if(Bars<100)
   {
      Print('bars less than 100');
      return(0);
   }


//----------------------- ADJUST LOTS IF USING MONEY MANAGEMENT
   if(MM==true) Lots = subLotSize();


//----------------------- ENTRY

//----------------------- TOTAL ORDER BASE ON MAGICNUMBER AND SYMBOL
   total = subTotalTrade();

//----------------------- SET VALUE FOR VARIABLE
      OpenPricePrevious = iOpen (NULL,TimeFrame,1);
      ClosePricePrevious = iClose(NULL,TimeFrame,1);
      OpenPriceCurrent = iOpen (NULL,TimeFrame,0);
      MAValuePrevious = iMA (NULL,TimeFrame,MAPeriod,0,MAMethod,MAPrice,1);
      MAValueCurrent = iMA (NULL,TimeFrame,MAPeriod,0,MAMethod,MAPrice,0);


//----------------------- IF NO TRADE
   if(total < 1)
   {
//----------------------- BUY CONDITION
      if(OpenPricePrevious<MAValuePrevious &&
         OpenPriceCurrent >MAValueCurrent)
      {
         ticket = subOpenOrder(OP_BUY); // open BUY order
         subCheckError(ticket,'BUY');
         return(0);
      }

//----------------------- SELL CONDITION
      if(OpenPricePrevious>MAValuePrevious &&
         OpenPriceCurrent <MAValueCurrent)
      {
         ticket = subOpenOrder(OP_SELL); // open SELL order
         subCheckError(ticket,'SELL');
         return(0);
      }
      return(0);
   }
  
//----------------------- CHECK OPEN ORDER
//----------------------- FOR SIGNAL CHANGE - STOP AND REVERSE
//----------------------- AND TRAILING STOP
   total = OrdersTotal();

   if(TrailingStop>0 ||
      StopAndReverse)
   {
      for(cnt=0;cnt<total;cnt++)
      {
         OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);

         if(OrderType()<=OP_SELL &&
            OrderSymbol()==Symbol() &&
            OrderMagicNumber()==MagicNumber)
         {
            if(OrderType()==OP_BUY) // buy position is opened
            {
               if(StopAndReverse) // signal change, close order and open new one
               {
                  if(OpenPricePrevious>MAValuePrevious &&
                     OpenPriceCurrent <MAValueCurrent)
                  {
                     OrderClose(OrderTicket(),OrderLots(),Bid,Slippage,Violet); // close buy order
                     ticket = subOpenOrder(OP_SELL); // open sell order
                     subCheckError(ticket,'SELL');
                     return(0);
                  }
               }
               if(TrailingStop>0) // trailing stop
               {
                  if(Bid-OrderOpenPrice()>Point*TrailingStop &&
                     OrderStopLoss()<Bid-Point*TrailingStop)
                  {
                     OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*TrailingStop,OrderTakeProfit(),0,Green);
                     return(0);
                  }
               }
            }
            if(OrderType()==OP_SELL) // sell position is opened
            {
               if(StopAndReverse) // signal change, close order and open new one
               {
                  if(OpenPricePrevious<MAValuePrevious &&
                     OpenPriceCurrent >MAValueCurrent)
                  {
                     OrderClose(OrderTicket(),OrderLots(),Ask,Slippage,Violet); // close sell order
                     ticket = subOpenOrder(OP_BUY); // open buy order
                     subCheckError(ticket,'BUY');
                     return(0);
                  }
               }
               if(TrailingStop>0) // trailing stop
               {
                  if(OrderOpenPrice()-Ask>Point*TrailingStop)
                  {
                  if(OrderStopLoss()>Ask+Point*TrailingStop || OrderStopLoss()==0)
                  {
                     OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderTakeProfit(),0,Red);
                     return(0);
                  }
                  }
               }
            }
         }
      }
   }
   return(0);
}

//----------------------- END PROGRAM

//+------------------------------------------------------------------+
//| FUNCTION DEFINITIONS
//+------------------------------------------------------------------+

//----------------------- MONEY MANAGEMENT FUNCTION
//----------------------- SOURCE : CODERSGURU
double subLotSize()
{
     double lotMM = MathCeil(AccountFreeMargin() * Risk / 1000) / 100;
     
      if(AccountIsMicro==false) //normal account
      {
         if (lotMM < 0.1) lotMM = Lots;
         if ((lotMM > 0.5) && (lotMM < 1)) lotMM=0.5;
         if (lotMM > 1.0) lotMM = MathCeil(lotMM);
         if (lotMM > 100) lotMM = 100;
      }
      else //micro account
      {
         if (lotMM < 0.01) lotMM = Lots;
         if (lotMM > 1.0) lotMM = MathCeil(lotMM);
         if (lotMM > 100) lotMM = 100;
      }
     
      return (lotMM);
}

//----------------------- NUMBER OF ORDER BASE ON SYMBOL AND MAGICNUMBER FUNCTION
int subTotalTrade()
{
   int
      cnt,
      total;
   for(cnt=0;cnt<OrdersTotal();cnt++){
      if(OrderSelect(cnt,SELECT_BY_POS)){
         if(OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber){
            total++;
         }
      }
   }
   return(total);
}

//----------------------- OPEN ORDER FUNCTION
//----------------------- SOURCE : CODERSGURU
int subOpenOrder(int type)
{
   int
         ticket = 0,
         err = 0,
         c = 0;
        
   double
         aStopLoss = 0,
         aTakeProfit = 0,
         bStopLoss = 0,
         bTakeProfit = 0;

   if(StopLoss!=0)
   {
      aStopLoss = Ask-StopLoss*Point;
      bStopLoss = Bid+StopLoss*Point;
   }
  
   if(TakeProfit!=0)
   {
      aTakeProfit = Ask+TakeProfit*Point;
      bTakeProfit = Bid-TakeProfit*Point;
   }
  
   if(type==OP_BUY)
   {
      for(c=0;c<NumberOfTries;c++)
      {
         ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,aStopLoss,aTakeProfit,TicketComment,MagicNumber,0,Green);
         err=GetLastError();
         if(err==0)
         {
            break;
         }
         else
         {
            if(err==4 || err==137 ||err==146 || err==136) //Busy errors
            {
               Sleep(5000);
               continue;
            }
            else //normal error
            {
               break;
            }
         }
      }
   }
   if(type==OP_SELL)
   {
      for(c=0;c<NumberOfTries;c++)
      {
         ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,bStopLoss,bTakeProfit,TicketComment,MagicNumber,0,Red);
         err=GetLastError();
         if(err==0)
         {
            break;
         }
         else
         {
            if(err==4 || err==137 ||err==146 || err==136) //Busy errors
            {
               Sleep(5000);
               continue;
            }
            else //normal error
            {
               break;
            }
         }
      }
   }
   return(ticket);
}

//----------------------- CHECK ERROR CODE FUNCTION
//----------------------- SOURCE : CODERSGURU
void subCheckError(int ticket, string Type)
{
    if(ticket>0)
    {
      if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print(Type + ' order opened : ',OrderOpenPrice());
    }
    else Print('Error opening ' + Type + ' order : ', ErrorDescription(GetLastError()));
}


//----------------------- END FUNCTION

Stationdealer

Member Since Apr 14, 2014  3 posts Stationdealer Apr 14 2014 at 19:08
are you available on skype?

my ID is whitebliss. Add me on skype and i can i explain some of my strategies i want to be coded.

Thanks


Freefox

Member Since Sep 12, 2012  12 posts Freefox Apr 16 2014 at 21:40
Message me first with the details. If you meet the criteria previously posted then we can go from there.

tynamite

Member Since Mar 25, 2014  2 posts tynamite Apr 20 2014 at 18:21
I would like to get an own-created EA being transformed to Ninjatrader 7.

Do you can help me or know anybody who could this job for me ?

Kind regards, Thomas.

iw2ktl61

Member Since Apr 01, 2014  11 posts GIULIO MAVER (iw2ktl61) Apr 21 2014 at 11:54
Hello, I wanted to know if you were able to converetire and in a mql4 in MQL5

thanks giulio

The money never sleep
thefx717

Member Since Jul 03, 2013  4 posts thefx717 Apr 28 2014 at 19:18
Look sound interesting. What kind platform you can do?

Previous 1 2 3 4 5 Next
CFTC Gold NC net positions (24 min)
Moneyism: Melania Trump’s Inauguration D...(7 min ago)
EURUSD 1.06956 GBPUSD 1.23699
USDJPY 114.453 USDCAD 1.33176
FxPro

Tools

Community

Reviews

Brokers

Platform

Support


Twitter |  Facebook |  Site Map  |  Terms  |   Privacy Policy
©2014 Myfxbook Ltd. All Rights Reserved.
HIGH RISK WARNING: Foreign exchange trading carries a high level of risk that may not be suitable for all investors. Leverage creates additional risk and loss exposure. Before you decide to trade foreign exchange, carefully consider your investment objectives, experience level, and risk tolerance. You could lose some or all of your initial investment; do not invest money that you cannot afford to lose. Educate yourself on the risks associated with foreign exchange trading, and seek advice from an independent financial or tax advisor if you have any questions. Any data and information is provided 'as is' solely for informational purposes, and is not intended for trading purposes or advice.