//=============================================================================
//                                                                   Jaws.mq4
//                                              Copyright © 2006, Derk Wehler
//                                                       derkwehler@gmail.com
//
//=============================================================================
#property copyright "Copyright © 2006, Derk Wehler"
#property link      "no site"

// Input parameters
extern string	S1 = "== MONEY MANAGEMENT SETTINGS ==";
extern bool 	MoneyManagement = false;
extern double	TradeSizePercent = 10;	// Change to whatever percent of equity you wish to risk.
extern double	Lots = 1.0;
extern double	MaxLots = 100.0;
extern string	S1z = " ";
extern string	S2 = "==== INDICATOR SETTINGS ====";
extern string	S2a = "------- PARABOLIC SAR INDICATOR -------";
extern int		SAR_Step	 		= 0.02;
extern int		SAR_Maximum	 		= 0.2;
extern string	S2b = "---- PRICE CHANNEL STOP INDICATOR ----";
extern int		PCS_ChannelPeriod	= 9;
extern double	PCS_Risk			= 0.3;
extern int		PCS_Signal			= 1;
extern int		PCS_Line			= 1;
extern int		PCS_NBars			= 1000;
extern string	S2z = " ";
extern string	S3 = "==== EA SETTINGS ====";
extern bool		WaitForClose		= true;
extern string	S3a = "------ SL, TP AND TRAIL ------";
extern int		TakeProfit		 	= 60;
extern int		StopLoss		 	= 30;
extern string	S3z = " ";
extern string	S4c = "------ GENERAL EA ------";
extern int		Slippage			= 1;
extern int		MagicSeed			= 1969;
extern string	ExpertName			= "Jaws";
extern int		DebugLevel 			= 0;


static int 	prevBars = -1;

int 	MagicNumber;
double	SL;
double	TP;

static int	prevSAR_Mode  = -1;
static int	prevPCS_Mode  = -1;
static int	prevPCS_Mode2 = -1;
static int	prevPCS_Mode3 = -1;


int		PCS_Mode;
int		SAR_Mode;
int		CurPCS_Value;
int		CurSAR_Value;



//=============================================================================
//	expert initialization function
//=============================================================================
int init()
{
	// ------------------------------------------------
	// Put code here to test indicators.  Sample:
	// ------------------------------------------------
	
    for (int i=0; i < 20; i++)
    {
		double SAR0 = iSAR(NULL, 0, SAR_Step, SAR_Maximum, i);
        Comment("\ni = ", i, "\nSAR: ", SAR0);
        Sleep(2000);
    }
}
  
//=============================================================================
//	expert deinitialization function
//=============================================================================
int deinit()
{
	return (0);
}



//=============================================================================
//	Expert start function
//=============================================================================
int start()
{
	return (0);
}

