//+------------------------------------------------------------------+ //| Copyright 2005, Gordago Software Corp. | //| http://www.gordago.com/ | //| Done by: Osama Ben Shaban, Email: o_shaban@hotmail.com | //| The Method is presented by Ganbah | //+------------------------------------------------------------------+ #property copyright "Copyright 2005, Gordago Software Corp." #property link "http://www.gordago.com" #define MAGIC 943448 extern double lStopLoss = 22; extern double sStopLoss = 22; extern double lTakeProfit = 10; extern double sTakeProfit = 10; extern color clOpenBuy = Blue; extern color clCloseBuy = Aqua; extern color clOpenSell = Red; extern color clCloseSell = Violet; extern color clModiBuy = Blue; extern color clModiSell = Red; extern string Name_Expert = "Generate from Gordago"; extern int Slippage = 1; extern bool UseSound = True; extern string NameFileSound = "alert.wav"; extern double Lots = 0.30; void deinit() { Comment(""); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int start(){ if(Bars<100){ Print("bars less than 100"); return(0); } if(lStopLoss<10){ Print("StopLoss less than 10"); return(0); } if(lTakeProfit<10){ Print("TakeProfit less than 10"); return(0); } if(sStopLoss<10){ Print("StopLoss less than 10"); return(0); } if(sTakeProfit<10){ Print("TakeProfit less than 10"); return(0); } double diRSI0=iRSI(NULL,60,3,PRICE_CLOSE,0); double diRSI1=iRSI(NULL,60,3,PRICE_CLOSE,0); if(AccountFreeMargin()<(1000*Lots)){ Print("We have no money. Free Margin = ", AccountFreeMargin()); return(0); } if (!ExistPositions()){ if ((diRSI0<20)){ OpenBuy(); return(0); } if ((diRSI1>80)){ OpenSell(); return(0); } } return (0); } bool ExistPositions() { for (int i=0; i