//+-------------------------------------------------------------------------------+
//|                                                          IBFX - Quick Buy.mq4 |
//|                                Copyright © 2010, InterbankFX LLC |
//|                                              http://www.ibfx.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, Interbank FX LLC"
#property link      "http://www.ibfx.com"
#property show_inputs
#include <IBFX - Quick Scripts.mqh>

extern int   MagicNumber = 915; 
extern double          Lots = 0.01;    /* If you want to use a static lots value change this value! */
extern double          Risk = 1.0;    /* If you want the script to use % of your account to calculate
                                        Lots to trade make sure Lots is set to 0.0   */   
extern int      Slippage = 3;                                           
extern int      StopLoss = 20;     // Number in Pips ie: 50 for 50 pips.
extern int  ProfitTarget = 30;     // Number in Pips ie: 50 for 50 pips.
extern int      MaxRetry = 10;     // If the Order Fails - How many time do we retry?
extern string    Commentary = "IBFX - Quick Buy ";
      
void start()
{
      //+-------------------------------------------------------------------------+
      //|               DO NOT MODIFY ANYTHING BELOW THIS LINE!!!                 |
      //+-------------------------------------------------------------------------+
      
            Sym = Symbol();
      SymPoints = MarketInfo( Sym, MODE_POINT  );
      SymDigits = MarketInfo( Sym, MODE_DIGITS );
      
           if( SymPoints == 0.00001 ) { SymPoints = 0.0001; }
      else if( SymPoints == 0.001 )   { SymPoints = 0.01; }
   
      if( Lots <= 0.0 ) 
      { 
         Lots = MM(Sym, Risk ); 
         if( Risk <= 0 ) 
         {  
            Alert( Commentary + "- Invalid Lots/Risk settings!" ); 
            return;
         }
      }
      
      Comment( "IBFX - QuickBuy | Placing Long Order, please wait ..." );						   
      EnterLong( Sym, Lots, Commentary, StopLoss, ProfitTarget, MagicNumber, MaxRetry, Slippage );
      Comment("");
      return;
}
//+-------------------------------------------------------------------------------+

