Sunday, February 7, 2021

XM BROKER -Get $30 free and withdraw profits

Did you know that you can grab  your self a no deposit  bonus just by getting your account verified with XM Broker  

Requirements to get the bonus

(if you have not already done so)


Once you have traded the required lots you can with your profits in no time 

information:


Get $30 NOW get now

MACD SIGNAL INDICATOR

 /---- input parameters

extern double TakeProfit = 10;

extern double Lots = 10;

extern double TrailingStop = 25;

extern int Pfast = 9;

extern int Pslow = 15;

extern int Psignal = 8;

extern double LEVEL = 0.004;

double Points;

//+------------------------------------------------------------------+

//| expert initialization function |

//+------------------------------------------------------------------+

int init()

  {

   Points = MarketInfo(Symbol(), MODE_POINT);

//----

   return(0);

  }

//+------------------------------------------------------------------+

//| expert deinitialization function |

//+------------------------------------------------------------------+

int deinit()

  {

   return(0);

  }

//+------------------------------------------------------------------+

//| expert start function |

//+------------------------------------------------------------------+

int start()

  {

   double MacdCurrent = 0, MacdPrevious = 0, SignalCurrent = 0;

   double SignalPrevious = 0, MaCurrent = 0, MaPrevious = 0;

   int cnt = 0, total;

   int i1, pp, shift;

   double Tv[2][500] ;

   double Range, rr, Delta, Delta1, val3;

// первичные проверки данных

// важно удостовериться что эксперт работает на нормальном графике и

// пользователь правильно выставил внешние переменные (Lots, StopLoss,

// TakeProfit, TrailingStop)

// в нашем случае проверяем только TakeProfit

   if(Bars < 100)

     {

       Print("bars less than 100");

       return(0); // на графике менее 100 баров

     }

   if(TakeProfit < 10)

     {

       Print("TakeProfit less than 10");

       return(0); // проверяем TakeProfit

     }

   Range = iATR(NULL, 0, 200, 1);

   rr = Range*LEVEL;

   Delta = iMACD(NULL, 0, Pfast, Pslow, Psignal, PRICE_CLOSE, MODE_MAIN, 0)-

           iMACD(NULL, 0, Pfast, Pslow, Psignal, PRICE_CLOSE, MODE_SIGNAL, 0);

   Delta1 = iMACD(NULL, 0, Pfast, Pslow, Psignal, PRICE_CLOSE, MODE_MAIN, 1)-

            iMACD(NULL, 0, Pfast, Pslow, Psignal, PRICE_CLOSE, MODE_SIGNAL, 1);

// теперь надо определиться - в каком состоянии торговый терминал?

// проверим, есть ли ранее открытые позиции или ордеры?

   if(OrdersTotal() < 1) 

     {

       // нет ни одного открытого ордера

       // на всякий случай проверим, если у нас свободные деньги на счету?

       // значение 1000 взято для примера, обычно можно открыть 1 лот

       if(AccountFreeMargin() < (1000*Lots))

         {

           Print("We have no money");

           return(0); // денег нет - выходим

         }

       // проверим, не слишком ли часто пытаемся открыться?

       // если последний раз торговали менее чем 5 минут(5*60=300 сек)

       // назад, то выходим

       // If((CurTime-LastTradeTime)<300) return(0);

       // проверяем на возможность встать в длинную позицию (BUY)

       if(Delta > rr && Delta1 < rr )

         {

           OrderSend(Symbol(), OP_BUY, Lots, Ask, 3, 0, Ask + TakeProfit*Points, 

                     "macd signal", 16384, 0, Red); // исполняем

           if(GetLastError() == 0)

               Print("Order opened : ", OrderOpenPrice());

           return(0); // выходим, так как все равно после совершения торговой операции

           // наступил 10-ти секундный таймаут на совершение торговых операций

         }

       // проверяем на возможность встать в короткую позицию (SELL)

       if(Delta < -rr && Delta1 > -rr )

         {

           OrderSend(Symbol(), OP_SELL, Lots, Bid, 3, 0, Bid - TakeProfit*Points, 

                     "macd sample", 16384, 0, Red); // исполняем

           if(GetLastError() == 0)

               Print("Order opened : ", OrderOpenPrice());

           return(0); // выходим

         }

       // здесь мы завершили проверку на возможность открытия новых позиций.

       // новые позиции открыты не были и просто выходим по Exit, так как

       // все равно анализировать нечего

       return(0);

     }

   // переходим к важной части эксперта - контролю открытых позиций

   // 'важно правильно войти в рынок, но выйти - еще важнее...'

   total = OrdersTotal();

   for(cnt = 0; cnt < total; cnt++)

     {

       OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);

       if(OrderType() <= OP_SELL && // это открытая позиция? OP_BUY или OP_SELL 

          OrderSymbol()==Symbol())  // инструмент совпадает?

         {

           if(OrderType() == OP_BUY) // открыта длинная позиция

             {

               // проверим, может уже пора закрываться?

               if(Delta < 0)

                 {

                   // закрываем позицию

                   OrderClose(OrderTicket(), OrderLots(), Bid, 3, Violet); 

                   return(0); // выходим

                 }

               // проверим - может можно/нужно уже трейлинг стоп ставить?

               if(TrailingStop > 0) // пользователь выставил в настройках трейлингстоп

                 { // значит мы идем его проверять

                   if(Bid - OrderOpenPrice() > Points*TrailingStop)

                     {

                       if(OrderStopLoss() < Bid - Points*TrailingStop)

                         {

                           OrderModify(OrderTicket(), OrderOpenPrice(), 

                                       Bid - Points*TrailingStop, 

                                       OrderTakeProfit(), 0, Red);

                           return(0);

                         }

                     }

                 }

             }

           else // иначе это короткая позиция

             {

               // проверим, может уже пора закрываться?

               if(Delta > 0)

                 {

                   // закрываем позицию

                   OrderClose(OrderTicket(), OrderLots(), Ask, 3, Violet); 

                   return(0); // выходим

                 }

               // проверим - может можно/нужно уже трейлинг стоп ставить?

               if(TrailingStop > 0) // пользователь выставил в настройках трейлингстоп

                 { // значит мы идем его проверять

                   if((OrderOpenPrice() - Ask) > (Points*TrailingStop))

                     {

                       if(OrderStopLoss() == 0.0 || OrderStopLoss() > 

                          (Ask + Points*TrailingStop))

                         {

                           OrderModify(OrderTicket(), OrderOpenPrice(), 

                                       Ask + Points*TrailingStop, 

                                       OrderTakeProfit(), 0, Red);

                           return(0);

                         }

                     }

                 }

             }

         }

     }

   return(0);

  }

// the end.

//+------------------------------------------------------------------+


ADX trading system

 extern double TakeProfit = 100;

extern double Lots =1;

extern double TrailingStop = 0;

extern double StopLoss = 30;

//+------------------------------------------------------------------+

//|                                                                  |

//+------------------------------------------------------------------+

int start()

  {

    double ADXP, ADXC, ADXDIPP;

    double ADXDIPC, ADXDIMP, ADXDIMC;

    int cnt, ticket, total;

    if(Bars < 100)

      {

        Print("bars less than 100");

        return(0);  

      }

    if(TakeProfit < 10)

      {

        Print("TakeProfit less than 10");

        return(0);  // check TakeProfit

      }

    ADXP = iADX(NULL, 0, 14, PRICE_CLOSE, MODE_MAIN, 2);

    ADXC = iADX(NULL, 0, 14, PRICE_CLOSE, MODE_MAIN, 1);

    ADXDIPP = iADX(NULL, 0, 14, PRICE_CLOSE, MODE_PLUSDI, 2);

    ADXDIPC = iADX(NULL, 0, 14, PRICE_CLOSE, MODE_PLUSDI, 1);  

    ADXDIMP = iADX(NULL, 0, 14, PRICE_CLOSE, MODE_MINUSDI, 2);

    ADXDIMC = iADX(NULL, 0, 14, PRICE_CLOSE, MODE_MINUSDI, 1);  

    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((ADXP < ADXC) && (ADXDIPP < ADXP) && (ADXDIPC > ADXC))

          {

            ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, 3, Bid - StopLoss*Point, 

                               Ask + TakeProfit*Point, "adx sample", 16384, 0, Green);

            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((ADXP < ADXC) && (ADXDIMP < ADXP) && (ADXDIMC > ADXC))

          {

            ticket = OrderSend(Symbol(), OP_SELL, Lots, Bid, 3, Ask + StopLoss*Point, 

                               Bid - TakeProfit*Point, "adx sample", 16384, 0, Red);

            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(ADXP > ADXC && ADXDIPP > ADXP && ADXDIPC < ADXC)

                  {

                    OrderClose(OrderTicket(), OrderLots(), Bid, 3, Violet); // close position

                      return(0); // exit

                  }

                if(TrailingStop > 0)  

                  {                 

                    if(Bid - OrderOpenPrice() > Point*TrailingStop)

                      {

                        if(OrderStopLoss() < Bid - Point*TrailingStop)

                          {

                            OrderModify(OrderTicket(), OrderOpenPrice(), 

                                        Bid - Point*TrailingStop, OrderTakeProfit(), 

                                        0, Green);

                            return(0);

                          }

                      }

                  }

              }

            else 

              {

                if(ADXP > ADXC && ADXDIMP > ADXP && ADXDIMC < ADXC)

                  {

                    OrderClose(OrderTicket(), OrderLots(), Ask, 3, Violet); // close position

                    return(0); // exit

                  }

                if(TrailingStop > 0)  

                  {                 

                    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);

  }

//+------------------------------------------------------------------+


Head and Shoulders Pattern

 

  • Forex Head and Shoulders

This chart pattern i was widely used buy so many forex traders   . Head and shoulders are a reversal formation and indicate a topping reversal after a bullish trend.At the same time, this chart pattern has its opposite equivalent – inverted (or inverse) head and shoulders. The inverted head and shoulders typically appears after a bearish trend and calls for a bottom in price. Below you will find illustrations of this pattern:

As you see, the head and shoulders formation really looks like a head with two shoulders. After an uptrend, the price creates a top, then it corrects. It creates a second, higher top afterwards and then it drops creating a third, lower top – head and shoulder.

It is the same with the inverted head and shoulders but instead of an uptrend we have a downtrend and instead of tops the price creates bottoms, as shown on the image above.

The bottoms forming the head are two points which create the signal line of the formation. This signal line is called a Neck Line. When the price closes a candle beyond the neck line, the head and shoulder formation is confirmed and we can enter the market with the respective position. This position should be short in case of head and shoulders and long in case of inverted head and shoulders. Your stop loss should be placed right above the last shoulder of the formation.

What Is Price Action Trading?

 Some traders make decisions based on the price movements of an asset. This is the premise of price action trading following the movement of prices and trading at the actions they think are most profitable.

Most price action traders don't use technical indicators such as moving average or Bollinger bands, but if you do, you should give them very little weight in the trading decision process. A price action trader believes that the only trustworthy source of information comes from the price itself and its movements.

If a stock price begins climbing, it shows that investors are buying because prices rise as traders buy. They then assess the price action based on the aggressiveness of buying; the historical charts; and real-time price information such as bids, offers, volume, velocity, and magnitude.

 

ADX Forex Signals Alert Strategy

Knowing how to combine the finest forex indicators in the most meaningful ways can allow you make much better trading decisions.

Conversely, if the indicators are combined in a wrong way, this could result to a mix-up, error in market interpretation and subsequent losses.

The ADX Forex Signals Alert strategy is designed to be meaningful on all currency pairs.

It gauges the strength of the trend under review and uses the information to investigate further on the likely trend direction.

The ADX strategy works pretty well on any currency pair and for any timeframe.

It suits beginners as well as experienced traders alike.

Let’s getting started with the chart setup:

Chart Setup

MetaTrader4 Indicators: adx-buy-sell.ex4 (Inputs Variable Modified; ADXcrossesPeriod=56), two-pole-super-smoother-filter.ex4 (Colors Width Modified; #0=2), ultimate-ma.ex4 (Colors Modified; #0=Yellow, Colors Width Modified; #0=2)

Preferred Time Frame(s): 1-Minute, 5-Minute, 15-Minutes, 30-Minutes, 1-Hour, 4-Hours, 1-Day, 1-Week

Recommended Trading Sessions: Any

Currency Pairs: Any pair

Download

Download the ADX Forex Signals Alert Strategy

Trailing Stop-Loss Forex Robot


 

Advanced Trailing Stop-Loss Forex Robot

This advanced trailing stop-loss forex robot can trail stop-losses based on parabolic Sar, average true range, moving averages, candlesticks, breakeven point, and more… You can change all options directly from the input tab.

Trading Signals

No trading signals

Trading Preferences

Platform: MT4

Currency pair: any

Recommended time frame: any

Trading sessions: any

Download