What If You Were Guaranteed 10 Pips a Day PER PAIR

While looking at the 1D chart earlier i noticed something interesting. Every time a new bar forms (at the beginning of every day), it ranges at least 10-20 pips in either direction. So, if every day you placed a trade in either direction, you’re incredibly likely to gain at least ten pips no matter what direction you place it in. I’m going to start playin around with this strategy and ill let you all know how it goes. but any and all opinions are welcomed. good day :slight_smile:

1 Like

Its a great [B]system in theory[/B], and I had built an EA around this thought process. My original system based my buy/sell confirmation on the formation of the 1st hours candle, with extra confirmation on the 1 minutes candle. During forward demo testing in November, December and the beginning of January, the system worked well, there would be some loser but I had the EA tweaked (now I would consider it to be “curve fitted”) for each of the majors. All in all I was getting at least 100%200% growth with various S/L values at each pair

Well, that is the theory part. So starting in January, I decided to go live and demo, but wouldn’t you know, that is just about the time something changed in the market. I started loosing money and took the EA offline.

[B]Anyway, I have tweaked my original EA up for you here. This will open a 10pip buy at the 0000GMT assuming your brokers server is at GMT. feel free to modify as you need, including using stop losses and trailing stops. If you find a setup that is makes you money in the long run, please dont forget who gave you the code.
[/B]
The item in blue in the code can be changed to fit your brokers time. The code in red below will allow you to open a sell instead of a buy but you will have to remove th “//” from the two lines and add them to the lines before it.

If you want to try playing with stop losses, change the “UseStopLoss” to True and then figure out your risk tolerance.

Sorry the code is so extravagent, in order for my ea to work with my original rules I had to the the value of the first minute and hour candles which seems easy enough, but is not. I spent much time devising code to get this to work properly, since simply counting backwards does not work since Metatrader tends to drop candles especially 1 minute candles.

To use the code, Open notepad, paste the code below into notepad and save it as “Husky_EA.mq4” making sure to use the quotes. You will want to save it in C\program files\metatrader\experts\ (or wherever your metatrader experts directory is. Once saved in this location open the file in MetaEditor and compile. You can then start backtesting if you wish.

BTW, the current version works great in back testing until the market hits a high on dec 31 for e the EU, and you eventually get margin called. Anyway play with it, tweak it and have fun. If you have questions, let me know.


//+------------------------------------------------------------------+
//Husky_EA 

#define SIGNAL_NONE 0
#define SIGNAL_BUY   1
#define SIGNAL_SELL  2
#define SIGNAL_CLOSEBUY 3
#define SIGNAL_CLOSESELL 4


extern int MagicNumber = 22;
extern bool SignalMail = False;
extern bool EachTickMode = True;
extern double Lots = 1.00;
extern int Slippage = 10;
extern bool UseStopLoss = False;
extern int StopLoss = 100;
extern bool UseTakeProfit = True;
extern int TakeProfit = 10;
extern bool UseTrailingStop = False;
extern int TrailingStop = 30;

int BarCount;
int Current;
bool TickCheck = False;
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init() {
   BarCount = Bars;

   if (EachTickMode) Current = 0; else Current = 1;

   return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit() {
   return(0);
}
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start() {
   int Order = SIGNAL_NONE;
   int Total, Ticket;
   double StopLossLevel, TakeProfitLevel;



   if (EachTickMode && Bars != BarCount) TickCheck = False;
   Total = OrdersTotal();
   Order = SIGNAL_NONE;

   //+------------------------------------------------------------------+
   //| Variable Begin                                                   |
   //+------------------------------------------------------------------+

   string thisyear=Year();
   string thismonth=Month();
   string thisday=Day();
   string timeframe= StringConcatenate(thisyear,".",thismonth,".",thisday," 02:00");
   datetime todayinfo = StrToTime(timeframe);

double Buy1_1 = iOpen(NULL, PERIOD_M1, iBarShift(NULL,PERIOD_M1,todayinfo,false));
double Buy1_2 = iClose(NULL, PERIOD_M1, iBarShift(NULL,PERIOD_M1,todayinfo,false));
double Buy2_1 = iOpen(NULL, PERIOD_H1,iBarShift(NULL,PERIOD_H1,todayinfo,false));
double Buy2_2 = iClose(NULL, PERIOD_H1, iBarShift(NULL,PERIOD_H1,todayinfo,false));

double Sell1_1 = iOpen(NULL, PERIOD_M1, iBarShift(NULL,PERIOD_M1,todayinfo,false));
double Sell1_2 = iClose(NULL, PERIOD_M1, iBarShift(NULL,PERIOD_M1,todayinfo,false));
double Sell2_1 = iOpen(NULL, PERIOD_H1, iBarShift(NULL,PERIOD_H1,todayinfo,false));
double Sell2_2 = iClose(NULL, PERIOD_H1, iBarShift(NULL,PERIOD_H1,todayinfo,false));

double CloseBuy1_1 = iOpen(NULL, 0, Current + 0);
double CloseBuy1_2 = iOpen(NULL, 0, Current + 0);

double CloseSell1_1 = iOpen(NULL, 0, Current + 0);
double CloseSell1_2 = iOpen(NULL, 0, Current + 0);

   
   //+------------------------------------------------------------------+
   //| Variable End                                                     |
   //+------------------------------------------------------------------+

   //Check position
   bool IsTrade = False;

   for (int i = 0; i < Total; i ++) {
      OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
      if(OrderType() <= OP_SELL &&  OrderMagicNumber() == MagicNumber) {
         IsTrade = True;
         if(OrderType() == OP_BUY) {
            //Close

            //+------------------------------------------------------------------+
            //| Signal Begin(Exit Buy)                                           |
            //+------------------------------------------------------------------+

                   //  if (Hour()==22 && Minute()>=40 
                     //) Order = SIGNAL_CLOSEBUY;
                     


            //+------------------------------------------------------------------+
            //| Signal End(Exit Buy)                                             |
            //+------------------------------------------------------------------+

            if (Order == SIGNAL_CLOSEBUY && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) {
               OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, MediumSeaGreen);
               if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Bid, Digits) + " Close Buy");
               if (!EachTickMode) BarCount = Bars;
               IsTrade = False;
               continue;
            }
            //Trailing stop
            if(UseTrailingStop && TrailingStop > 0) {                 
               if(Bid - OrderOpenPrice() > Point * TrailingStop) {
                  if(OrderStopLoss() < Bid - Point * TrailingStop) {
                     OrderModify(OrderTicket(), OrderOpenPrice(), Bid - Point * TrailingStop, OrderTakeProfit(), 0, MediumSeaGreen);
                     if (!EachTickMode) BarCount = Bars;
                     continue;
                  }
               }
            }
         } else {
            //Close

            //+------------------------------------------------------------------+
            //| Signal Begin(Exit Sell)                                          |
            //+------------------------------------------------------------------+

                  //   if (Hour()==22  && Minute()>=40 ) Order = SIGNAL_CLOSESELL;


            //+------------------------------------------------------------------+
            //| Signal End(Exit Sell)                                            |
            //+------------------------------------------------------------------+

            if (Order == SIGNAL_CLOSESELL && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) {
               OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, DarkOrange);
               if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Ask, Digits) + " Close Sell");
               if (!EachTickMode) BarCount = Bars;
               IsTrade = False;
               continue;
            }
            //Trailing stop
            if(UseTrailingStop && TrailingStop > 0) {                 
               if((OrderOpenPrice() - Ask) > (Point * TrailingStop)) {
                  if((OrderStopLoss() > (Ask + Point * TrailingStop)) || (OrderStopLoss() == 0)) {
                     OrderModify(OrderTicket(), OrderOpenPrice(), Ask + Point * TrailingStop, OrderTakeProfit(), 0, DarkOrange);
                     if (!EachTickMode) BarCount = Bars;
                     continue;
                  }
               }
            }
         }
      }
   }

   //+------------------------------------------------------------------+
   //| Signal Begin(Entry)                                              |
   //+------------------------------------------------------------------+

   if (Hour()==02 && Minute()==01 //&& Buy1_1 < Buy1_2 && Buy2_1 < Buy2_2
   ) Order = SIGNAL_BUY;

//   if (Hour()==02 && Minute()==01 //&& Sell1_1 > Sell1_2 && Sell2_1 > Sell2_2
  // ) Order = SIGNAL_SELL;


   //+------------------------------------------------------------------+
   //| Signal End                                                       |
   //+------------------------------------------------------------------+

   //Buy
   if (Order == SIGNAL_BUY && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) {
      if(!IsTrade) {
         //Check free margin
         if (AccountFreeMargin() < (1000 * Lots)) {
            Print("We have no money. Free Margin = ", AccountFreeMargin());
            return(0);
         }

         if (UseStopLoss) StopLossLevel = Ask - StopLoss * Point; else StopLossLevel = 0.0;
         if (UseTakeProfit) TakeProfitLevel = Ask + TakeProfit * Point; else TakeProfitLevel = 0.0;

         Ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, StopLossLevel, TakeProfitLevel, "Buy(#" + MagicNumber + ")", MagicNumber, 0, DodgerBlue);
         if(Ticket > 0) {
            if (OrderSelect(Ticket, SELECT_BY_TICKET, MODE_TRADES)) {
                Print("BUY order opened : ", OrderOpenPrice());
                if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Ask, Digits) + " Open Buy");
            } else {
                Print("Error opening BUY order : ", GetLastError());
            }
         }
         if (EachTickMode) TickCheck = True;
         if (!EachTickMode) BarCount = Bars;
         return(0);
      }
   }

   //Sell
   if (Order == SIGNAL_SELL && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) {
      if(!IsTrade) {
         //Check free margin
         if (AccountFreeMargin() < (1000 * Lots)) {
            Print("We have no money. Free Margin = ", AccountFreeMargin());
            return(0);
         }

         if (UseStopLoss) StopLossLevel = Bid + StopLoss * Point; else StopLossLevel = 0.0;
         if (UseTakeProfit) TakeProfitLevel = Bid - TakeProfit * Point; else TakeProfitLevel = 0.0;

         Ticket = OrderSend(Symbol(), OP_SELL, Lots, Bid, Slippage, StopLossLevel, TakeProfitLevel, "Sell(#" + MagicNumber + ")", MagicNumber, 0, DeepPink);
         if(Ticket > 0) {
            if (OrderSelect(Ticket, SELECT_BY_TICKET, MODE_TRADES)) {
                Print("SELL order opened : ", OrderOpenPrice());
                if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Bid, Digits) + " Open Sell");
            } else {
                Print("Error opening SELL order : ", GetLastError());
            }
         }
         if (EachTickMode) TickCheck = True;
         if (!EachTickMode) BarCount = Bars;
         return(0);
      }
   }

   if (!EachTickMode) BarCount = Bars;

   return(0);
}
//+------------------------------------------------------------------+

By the way, I do think this could work given the right time settings and maybe some confirmation

As of recent I have seen (or was pointed to) a system that was built a few years ago by a very respected trader (the system was built by the trader, the EA was built by some others) that opens 2 orders around reversal time, in opposite directions, for 5 pips per trade. I played with the EA a bit, but at the end of the day the backtesting would get Margin Called because there was invariably a market turnaround. I even think the “system” originator did not recommend utilizing the EA as its not the way he trades.

Which makes me think that opening this type of trade should probably be manual and could be “safe” if you take into account the current market conditions.

Hi Husky,

Maybe you should try demo trading you EA now. Seems like the market has stabilized over the past month and a half. January was pretty bad for a lot of the EAs and even manual trading systems. I lost money in January with he EA that I am using, but the month of FEB was better and I made that money back. I think January was a bad month to go live on your EA since the market was so unpredictable and unstable.

With your encouragement I just tried some back testing which, based on my experience with this ea, seems to catch the same profits/losses as the forward testing and it was steadily gaining. I think the thing that got me off track is that it tended to lose more during this period than all my time of demo forward testing. Regardless with a 10% risk per trade, it was up 50% in 1.5 months, 3% was up 18%, 5% was up about 27%. This was based on the EURUSD, the other pairs did not fare so well. I am not sure the EA is working as I would like, but as you suggest maybe I will throw it in demo.

For those of you reading this thread THE EA POSTED ABOVE WAS FITTED FOR THE OP, AND NOT WHAT I WAS JUST TESTING.

Interesting… but what stop loss do you use for such a small gain (ie. 10p - 5p spread = 5p)… ??

Play with the ea I posted above and see what works best for you.

sir some times the day candel is shaven bottom (without tail candels) , in that candel how can we get 10 pips ( once if i put sell order the candel goes up with out tail ) so how reduce loss and how to trade

sir in day chart every day the candel starting time if i put buy order , the market suddenly goes down , after that the market not comming back , then how to take the profit , is there is any stoploss we should keep there. or any depends on trends or specfic days are there for trade, or any indicator is there. pls see in day chart so many days the market goes up or down only , how it is possible for atlest 10 pips profit. pls explain detail. :58:

I really like this idea. Does anyone have any idea what kind of stop loss one would use in this strategy?