//+------------------------------------------------------------------+
//|                                            RapidEntry 3 SELL.mq4 | 
//|                                       http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © TakeProfit104, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net/"

#include <stdlib.mqh>  
#include <WinUser32.mqh> 
//+-------------------------------------------------------------------+
//| Auto order entery for any currency pair. This will place 3 orders |
//| to SELL at the current BID price. The orders will include the same|
//| Stop loss of 15 pips and three different TakeProfits of +20, +40, |
//| and +100 pips.                                                    |
//+-------------------------------------------------------------------+

//#property show_inputs

// Initialize external variables  
extern string Lot_Values = "Std Lot = 1.0, Mini Lot = 0.1, Micro Lot = 0.01"; //Comment
extern double Lots = 0.10; // change this number to change the lotsize
extern string StopLoss_TakeProfit_Values = "StopLoss = 20.0 is 20 pips, etc."; //Comment
extern double StopLoss = 20;  // change this number to change the stoploss
extern double TakeProfit1 = 20; // change this number to change the takeprofit
extern double TakeProfit2 = 40; // change this number to change the takeprofit
extern double TakeProfit3 = 100; // change this number to change the takeprofit

// Start the process
int start()
  {

// Initialize internal variables
   int ticket_1;
   int ticket_2;
   int ticket_3;
   
// Update data
   RefreshRates();                     

// Submit orders

   ticket_1=OrderSend(Symbol(),OP_SELL,Lots,Bid,5,Bid+StopLoss*Point,Bid-TakeProfit1*Point,Symbol()+" SELL Order 1",0,0,CLR_NONE);
   ticket_2=OrderSend(Symbol(),OP_SELL,Lots,Bid,5,Bid+StopLoss*Point,Bid-TakeProfit2*Point,Symbol()+" SELL Order 2",0,0,CLR_NONE);
   ticket_3=OrderSend(Symbol(),OP_SELL,Lots,Bid,5,Bid+StopLoss*Point,Bid-TakeProfit3*Point,Symbol()+" SELL Order 3",0,0,CLR_NONE); 

   while (ticket_1 < 0) 
   {
   RefreshRates();                     // Update data
   ticket_1=OrderSend(Symbol(),OP_SELL,Lots,Bid,5,Bid+StopLoss*Point,Bid-TakeProfit1*Point,Symbol()+" SELL Order 1",0,0,CLR_NONE);
   }
   while (ticket_2 < 0) 
   {
   RefreshRates();                     // Update data
   ticket_2=OrderSend(Symbol(),OP_SELL,Lots,Bid,5,Bid+StopLoss*Point,Bid-TakeProfit2*Point,Symbol()+" SELL Order 2",0,0,CLR_NONE);
   }
   
   while (ticket_3 < 0) 
   {
   RefreshRates();                     // Update data
   ticket_3=OrderSend(Symbol(),OP_SELL,Lots,Bid,5,Bid+StopLoss*Point,Bid-TakeProfit3*Point,Symbol()+" SELL Order 3",0,0,CLR_NONE); 
   }
   
//----
   return(0);
  }
//+------------------------------------------------------------------+