ROBOMINER NEW


DOWNLOAD

DOWNLOAD
" RAHASIA EXPERT ADVISOR "


BAGAIMANA MEMILIH EXPERT ADVISOR



TERIMA KASIH
http://www.forexrobotgratis.com

/*[[
        Name := Turbo_Robot1.1
        Author := MT
        Link :=
        Notes := M5 for all majors
        Lots := 1.00
        Stop Loss := 45
        Take Profit := 150
        Trailing Stop := 15
]]*/

extern double slippage=20,mm=1,risk=7.5,Lot=0.1,StopLoss=45,TakeProfit=150, TrailingStop=15;

int start()
  {

double bull=0,bear=0,sl=0,tp=0,cnt=0,b=0,s=0,Opentrades=0,lotsi=0,ITB=0,ITS=0,total=0;



ITB=iCustom(NULL,0,"SilverTrend_Signal",2,0,0,20,0,14,0,0,1);

ITS=iCustom(NULL,0,"SilverTrend_Signal",2,0,0,20,0,14,0,0,1);

bull = iBullsPower(NULL,0,5,PRICE_CLOSE,1);
bear = iBearsPower(NULL,0,5,PRICE_CLOSE,1);
Comment("bull+bear= ",bull + bear,"\n I Blue ",ITB,"\n I Red ",ITS);

//////////////////////////////////////////////////
///////////// Manage multiple trades /////////////
//////////////////////////////////////////////////

Opentrades=0;

total=OrdersTotal();
for(cnt=0;cnt<total;cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
      if ( OrderSymbol()==Symbol() ) Opentrades = Opentrades+1; 
}

//////////////////////////////////////////////////
///////////// Money Manager /////////////
//////////////////////////////////////////////////

if (mm != 0)
        lotsi=MathCeil(AccountBalance()*risk/10000)/10;
else
        lotsi=Lot;
       



if (Opentrades == 0)
   {
   if ((bull + bear > 0) && (ITB == 1) && (ITS == 0))
      {
      sl = Ask - StopLoss * Point;
      tp = Bid + TakeProfit * Point;
      OrderSend(Symbol(),OP_BUY,lotsi,Ask,slippage,sl,tp,0,0,Blue);
      }
   if ((bull + bear < 0) && (ITS == -1) && (ITB == 0))
      {
      sl = Bid + StopLoss * Point;
      tp = Ask - TakeProfit * Point;
      OrderSend(Symbol(),OP_SELL,lotsi,Bid,slippage,sl,tp,0,0,Red);
      }
   }


b = 1 * Point + iATR(NULL,0,5,1) * 1.5;
s = 1 * Point + iATR(NULL,0,5,1) * 1.5;


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

OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
      if ((OrderType()== OP_BUY) && (OrderSymbol()== Symbol()))
         {
         if ((OrderOpenPrice() > OrderStopLoss()) && (Bid-OrderOpenPrice() > StopLoss*Point))  
            {
            OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0,SlateBlue);
            return(0);
            }
         if ((Bid - OrderOpenPrice()) > b )
            {
            if ((OrderStopLoss()) < (Bid -b)) 
               {
               OrderModify(OrderTicket(),OrderOpenPrice(),Bid - b,OrderTakeProfit(),0,SlateBlue);
               return(0);
               }
            }
         }
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
      if ((OrderType()== OP_SELL) && (OrderSymbol()== Symbol()))         
         {
         if ((OrderOpenPrice() < OrderStopLoss()) && (OrderOpenPrice()-Ask > StopLoss*Point))
            {
            OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice(),OrderTakeProfit(),0,Red);
            return(0);
            }
         if ((OrderOpenPrice()-Ask ) > s )
            {
            if ((OrderStopLoss()) > (Ask + s))
            {
            OrderModify(OrderTicket(),OrderOpenPrice(),Ask + s,OrderTakeProfit(),0,Red);
            return(0);
            } 
         }
       }
 
   
}
}












,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

EA SEJUTA UMAT







#property copyright "Copyright © 2009,Milik Bersama"
#property link "http://www.kitacobaramerame.com"
#property show_inputs


extern string Expert_Comment = "OP Robot";
extern bool CloseAllNow = False;
extern int MaxTrades = 20;
extern int LotDigit = 1;
extern double Lots = 0.1;
extern double TakeProfit = 10.0;
extern double Pips = 7.0;
extern double Multiplier = 1.2;
extern double TS_Buy = 3.0;
extern double TS_Sell = 3.0;
extern double Slippage = 5.0;
extern bool UseHourTrade = FALSE;
extern int StartHour = 0;
extern int EndHour = 8;
extern int Magic = 291179;
extern double AutoCalculate = 20.0;
bool gi_80 = FALSE;
bool gi_84 = TRUE;
double gd_112 = 1.0;
double g_pips_128 = 0.0;
bool gi_164 = FALSE;
bool gi_176 = TRUE;
bool gi_180 = FALSE;
double gd_184 = 0.0;
bool gi_192 = FALSE;
double g_price_212;
double gd_220;
double gd_unused_228;
double gd_unused_236;
double g_price_244;
double g_bid_252;
double g_ask_260;
double gd_268;
double gd_276;
double gd_284;
bool gi_292;
int g_time_304 = 0;
int gi_308;
int gi_312 = 0;
double gd_316;
int g_pos_324 = 0;
int gi_328;
double gd_332 = 0.0;
bool gi_340 = FALSE;
bool gi_344 = FALSE;
bool gi_348 = FALSE;
int gi_352;
bool gi_356 = FALSE;
int g_datetime_360 = 0;
int g_datetime_364 = 0;
double gd_368;
double gd_376;

int init() {
gd_284 = MarketInfo(Symbol(), MODE_SPREAD) * Point;
if (IsTesting() == TRUE) Display_Info();
if (IsTesting() == FALSE) Display_Info();
return (0);
}

int deinit() {
return (0);
}

int start() {

if (CloseAllNow == True) {
CloseThisSymbolAll();
}

double l_ord_lots_0;
double l_ord_lots_8;
double l_iclose_16;
double l_iclose_24;
if (UseHourTrade) {
if (!(Hour() >= StartHour && Hour() <= EndHour)) {
Comment("Non-Trading Hours!");
return (0);
}
}
string ls_36 = "false";
string ls_44 = "false";
if (gi_192 == FALSE || (gi_192 && (EndHour > StartHour && (Hour() >= StartHour && Hour() <= EndHour)) || (StartHour > EndHour && !(Hour() >= EndHour && Hour() <= StartHour)))) ls_36 = "true";
if (gi_192 && (EndHour > StartHour && !(Hour() >= StartHour && Hour() <= EndHour)) || (StartHour > EndHour && (Hour() >= EndHour && Hour() <= StartHour))) ls_44 = "true";
if (gi_176) TrailingAlls(TS_Buy, TS_Sell, g_price_244);
if (gi_180) {
if (TimeCurrent() >= gi_308) {
Print("Closed All due to TimeOut");
}
}
if (g_time_304 == Time[0]) return (0);
g_time_304 = Time[0];
double ld_52 = CalculateProfit();
if (gi_164) {
if (ld_52 < 0.0 && MathAbs(ld_52) > AutoCalculate / 100.0 * AccountEquityHigh()) {
Print("Closed All due to Stop Out");
gi_356 = FALSE;
}
}
gi_328 = CountTrades();
if (gi_328 == 0) gi_292 = FALSE;
for (g_pos_324 = OrdersTotal() - 1; g_pos_324 >= 0; g_pos_324--) {
OrderSelect(g_pos_324, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() != Symbol() || OrderMagicNumber() != Magic) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic) {
if (OrderType() == OP_BUY) {
gi_344 = TRUE;
gi_348 = FALSE;
l_ord_lots_0 = OrderLots();
break;
}
}
if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic) {
if (OrderType() == OP_SELL) {
gi_344 = FALSE;
gi_348 = TRUE;
l_ord_lots_8 = OrderLots();
break;
}
}
}
if (gi_328 > 0 && gi_328 <= MaxTrades) {
RefreshRates();
gd_268 = FindLastBuyPrice();
gd_276 = FindLastSellPrice();
if (gi_344 && gd_268 - Ask >= Pips * Point) gi_340 = TRUE;
if (gi_348 && Bid - gd_276 >= Pips * Point) gi_340 = TRUE;
}
if (gi_328 < 1) {
gi_348 = FALSE;
gi_344 = FALSE;
gi_340 = TRUE;
gd_220 = AccountEquity();
}
if (gi_340) {
gd_268 = FindLastBuyPrice();
gd_276 = FindLastSellPrice();
if (gi_348) {
if (gi_80 || ls_44 == "true") {
fOrderCloseMarket(0, 1);
gd_316 = NormalizeDouble(Multiplier * l_ord_lots_8, gd_112);
} else gd_316 = fGetLots(OP_SELL);
if (gi_84 && ls_36 == "true") {
gi_312 = gi_328;
if (gd_316 > 0.0) {
RefreshRates();
gi_352 = OpenPendingOrder(1, gd_316, Bid, Slippage, Ask, 0, 0, Expert_Comment + "-" + gi_312, Magic, 0, HotPink);
if (gi_352 < 0) {
Print("Error: ", GetLastError());
return (0);
}
gd_276 = FindLastSellPrice();
gi_340 = FALSE;
gi_356 = TRUE;
}
}
} else {
if (gi_344) {
if (gi_80 || ls_44 == "true") {
fOrderCloseMarket(1, 0);
gd_316 = NormalizeDouble(Multiplier * l_ord_lots_0, gd_112);
} else gd_316 = fGetLots(OP_BUY);
if (gi_84 && ls_36 == "true") {
gi_312 = gi_328;
if (gd_316 > 0.0) {
gi_352 = OpenPendingOrder(0, gd_316, Ask, Slippage, Bid, 0, 0, Expert_Comment + "-" + gi_312, Magic, 0, Lime);
if (gi_352 < 0) {
Print("Error: ", GetLastError());
return (0);
}
gd_268 = FindLastBuyPrice();
gi_340 = FALSE;
gi_356 = TRUE;
}
}
}
}
}
if (gi_340 && gi_328 < 1) {
l_iclose_16 = iClose(Symbol(), 0, 2);
l_iclose_24 = iClose(Symbol(), 0, 1);
g_bid_252 = Bid;
g_ask_260 = Ask;
if (!gi_348 && !gi_344 && ls_36 == "true") {
gi_312 = gi_328;
if (l_iclose_16 > l_iclose_24) {
gd_316 = fGetLots(OP_SELL);
if (gd_316 > 0.0) {
gi_352 = OpenPendingOrder(1, gd_316, g_bid_252, Slippage, g_bid_252, 0, 0, Expert_Comment + "-" + gi_312, Magic, 0, HotPink);
if (gi_352 < 0) {
Print(gd_316, "Error: ", GetLastError());
return (0);
}
gd_268 = FindLastBuyPrice();
gi_356 = TRUE;
}
} else {
gd_316 = fGetLots(OP_BUY);
if (gd_316 > 0.0) {
gi_352 = OpenPendingOrder(0, gd_316, g_ask_260, Slippage, g_ask_260, 0, 0, Expert_Comment + "-" + gi_312, Magic, 0, Lime);
if (gi_352 < 0) {
Print(gd_316, "Error: ", GetLastError());
return (0);
}
gd_276 = FindLastSellPrice();
gi_356 = TRUE;
}
}
}
if (gi_352 > 0) gi_308 = TimeCurrent() + 60.0 * (60.0 * gd_184);
gi_340 = FALSE;
}
gi_328 = CountTrades();
g_price_244 = 0;
double ld_60 = 0;
for (g_pos_324 = OrdersTotal() - 1; g_pos_324 >= 0; g_pos_324--) {
OrderSelect(g_pos_324, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() != Symbol() || OrderMagicNumber() != Magic) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic) {
if (OrderType() == OP_BUY || OrderType() == OP_SELL) {
g_price_244 += OrderOpenPrice() * OrderLots();
ld_60 += OrderLots();
}
}
}
if (gi_328 > 0) g_price_244 = NormalizeDouble(g_price_244 / ld_60, Digits);
if (gi_356) {
for (g_pos_324 = OrdersTotal() - 1; g_pos_324 >= 0; g_pos_324--) {
OrderSelect(g_pos_324, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() != Symbol() || OrderMagicNumber() != Magic) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic) {
if (OrderType() == OP_BUY) {
g_price_212 = g_price_244 + TakeProfit * Point;
gd_unused_228 = g_price_212;
gd_332 = g_price_244 - g_pips_128 * Point;
gi_292 = TRUE;
}
}
if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic) {
if (OrderType() == OP_SELL) {
g_price_212 = g_price_244 - TakeProfit * Point;
gd_unused_236 = g_price_212;
gd_332 = g_price_244 + g_pips_128 * Point;
gi_292 = TRUE;
}
}
}
}
if (gi_356) {
if (gi_292 == TRUE) {
for (g_pos_324 = OrdersTotal() - 1; g_pos_324 >= 0; g_pos_324--) {
OrderSelect(g_pos_324, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() != Symbol() || OrderMagicNumber() != Magic) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic) OrderModify(OrderTicket(), g_price_244, OrderStopLoss(), g_price_212, 0, Yellow);
gi_356 = FALSE;
}
}
}
return (0);
}

double ND(double ad_0) {
return (NormalizeDouble(ad_0, Digits));
}

int fOrderCloseMarket(bool ai_0 = TRUE, bool ai_4 = TRUE) {
int li_ret_8 = 0;
for (int l_pos_12 = OrdersTotal() - 1; l_pos_12 >= 0; l_pos_12--) {
if (OrderSelect(l_pos_12, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic) {
if (OrderType() == OP_BUY && ai_0) {
RefreshRates();
if (!IsTradeContextBusy()) {
if (!OrderClose(OrderTicket(), OrderLots(), ND(Bid), 5, CLR_NONE)) {
Print("Error close BUY " + OrderTicket());
li_ret_8 = -1;
}
} else {
if (g_datetime_360 != iTime(NULL, 0, 0)) {
g_datetime_360 = iTime(NULL, 0, 0);
Print("Need close BUY " + OrderTicket() + ". Trade Context Busy");
}
return (-2);
}
}
if (OrderType() == OP_SELL && ai_4) {
RefreshRates();
if (!IsTradeContextBusy()) {
if (!OrderClose(OrderTicket(), OrderLots(), ND(Ask), 5, CLR_NONE)) {
Print("Error close SELL " + OrderTicket());
li_ret_8 = -1;
}
} else {
if (g_datetime_364 != iTime(NULL, 0, 0)) {
g_datetime_364 = iTime(NULL, 0, 0);
Print("Need close SELL " + OrderTicket() + ". Trade Context Busy");
}
return (-2);
}
}
}
}
}
return (li_ret_8);
}

double fGetLots(int a_cmd_0) {
double l_lots_4;
int l_datetime_12;
switch (LotDigit) {
case 0:
l_lots_4 = Lots;
break;
case 1:
l_lots_4 = NormalizeDouble(Lots * MathPow(Multiplier, gi_312), gd_112);
break;
case 2:
l_datetime_12 = 0;
l_lots_4 = Lots;
for (int l_pos_20 = OrdersHistoryTotal() - 1; l_pos_20 >= 0; l_pos_20--) {
if (OrderSelect(l_pos_20, SELECT_BY_POS, MODE_HISTORY)) {
if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic) {
if (l_datetime_12 < OrderCloseTime()) {
l_datetime_12 = OrderCloseTime();
if (OrderProfit() < 0.0) l_lots_4 = NormalizeDouble(OrderLots() * Multiplier, gd_112);
else l_lots_4 = Lots;
}
}
} else return (-3);
}
}
if (AccountFreeMarginCheck(Symbol(), a_cmd_0, l_lots_4) <= 0.0) return (-1);
if (GetLastError() == 134/* NOT_ENOUGH_MONEY */) return (-2);
if(l_lots_4<0.01) l_lots_4=0.01;
return (l_lots_4);
}

int CountTrades() {
int l_count_0 = 0;
for (int l_pos_4 = OrdersTotal() - 1; l_pos_4 >= 0; l_pos_4--) {
OrderSelect(l_pos_4, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() != Symbol() || OrderMagicNumber() != Magic) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic)
if (OrderType() == OP_SELL || OrderType() == OP_BUY) l_count_0++;
}
return (l_count_0);
}

void CloseThisSymbolAll() {
for (int l_pos_0 = OrdersTotal() - 1; l_pos_0 >= 0; l_pos_0--) {
OrderSelect(l_pos_0, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() == Symbol()) {
if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic) {
if (OrderType() == OP_BUY) OrderClose(OrderTicket(), OrderLots(), Bid, Slippage, Blue);
if (OrderType() == OP_SELL) OrderClose(OrderTicket(), OrderLots(), Ask, Slippage, Red);
}
Sleep(1000);
}
}
}

int OpenPendingOrder(int ai_0, double a_lots_4, double a_price_12, int a_slippage_20, double ad_24, int ai_unused_32, int ai_36, string a_comment_40, int a_magic_48, int a_datetime_52, color a_color_56) {
int l_ticket_60 = 0;
int l_error_64 = 0;
int l_count_68 = 0;
int li_72 = 100;
switch (ai_0) {
case 2:
for (l_count_68 = 0; l_count_68 < li_72; l_count_68++) {
l_ticket_60 = OrderSend(Symbol(), OP_BUYLIMIT, a_lots_4, a_price_12, a_slippage_20, StopLong(ad_24, g_pips_128), TakeLong(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52, a_color_56);
l_error_64 = GetLastError();
if (l_error_64 == 0/* NO_ERROR */) break;
if (!((l_error_64 == 4/* SERVER_BUSY */ || l_error_64 == 137/* BROKER_BUSY */ || l_error_64 == 146/* TRADE_CONTEXT_BUSY */ || l_error_64 == 136/* OFF_QUOTES */))) break;
Sleep(1000);
}
break;
case 4:
for (l_count_68 = 0; l_count_68 < li_72; l_count_68++) {
l_ticket_60 = OrderSend(Symbol(), OP_BUYSTOP, a_lots_4, a_price_12, a_slippage_20, StopLong(ad_24, g_pips_128), TakeLong(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52, a_color_56);
l_error_64 = GetLastError();
if (l_error_64 == 0/* NO_ERROR */) break;
if (!((l_error_64 == 4/* SERVER_BUSY */ || l_error_64 == 137/* BROKER_BUSY */ || l_error_64 == 146/* TRADE_CONTEXT_BUSY */ || l_error_64 == 136/* OFF_QUOTES */))) break;
Sleep(5000);
}
break;
case 0:
for (l_count_68 = 0; l_count_68 < li_72; l_count_68++) {
RefreshRates();
l_ticket_60 = OrderSend(Symbol(), OP_BUY, a_lots_4, Ask, a_slippage_20, StopLong(Bid, g_pips_128), TakeLong(Ask, ai_36), a_comment_40, a_magic_48, a_datetime_52, a_color_56);
l_error_64 = GetLastError();
if (l_error_64 == 0/* NO_ERROR */) break;
if (!((l_error_64 == 4/* SERVER_BUSY */ || l_error_64 == 137/* BROKER_BUSY */ || l_error_64 == 146/* TRADE_CONTEXT_BUSY */ || l_error_64 == 136/* OFF_QUOTES */))) break;
Sleep(5000);
}
break;
case 3:
for (l_count_68 = 0; l_count_68 < li_72; l_count_68++) {
l_ticket_60 = OrderSend(Symbol(), OP_SELLLIMIT, a_lots_4, a_price_12, a_slippage_20, StopShort(ad_24, g_pips_128), TakeShort(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52, a_color_56);
l_error_64 = GetLastError();
if (l_error_64 == 0/* NO_ERROR */) break;
if (!((l_error_64 == 4/* SERVER_BUSY */ || l_error_64 == 137/* BROKER_BUSY */ || l_error_64 == 146/* TRADE_CONTEXT_BUSY */ || l_error_64 == 136/* OFF_QUOTES */))) break;
Sleep(5000);
}
break;
case 5:
for (l_count_68 = 0; l_count_68 < li_72; l_count_68++) {
l_ticket_60 = OrderSend(Symbol(), OP_SELLSTOP, a_lots_4, a_price_12, a_slippage_20, StopShort(ad_24, g_pips_128), TakeShort(a_price_12, ai_36), a_comment_40, a_magic_48, a_datetime_52, a_color_56);
l_error_64 = GetLastError();
if (l_error_64 == 0/* NO_ERROR */) break;
if (!((l_error_64 == 4/* SERVER_BUSY */ || l_error_64 == 137/* BROKER_BUSY */ || l_error_64 == 146/* TRADE_CONTEXT_BUSY */ || l_error_64 == 136/* OFF_QUOTES */))) break;
Sleep(5000);
}
break;
case 1:
for (l_count_68 = 0; l_count_68 < li_72; l_count_68++) {
l_ticket_60 = OrderSend(Symbol(), OP_SELL, a_lots_4, Bid, a_slippage_20, StopShort(Ask, g_pips_128), TakeShort(Bid, ai_36), a_comment_40, a_magic_48, a_datetime_52, a_color_56);
l_error_64 = GetLastError();
if (l_error_64 == 0/* NO_ERROR */) break;
if (!((l_error_64 == 4/* SERVER_BUSY */ || l_error_64 == 137/* BROKER_BUSY */ || l_error_64 == 146/* TRADE_CONTEXT_BUSY */ || l_error_64 == 136/* OFF_QUOTES */))) break;
Sleep(5000);
}
}
return (l_ticket_60);
}

double StopLong(double ad_0, int ai_8) {
if (ai_8 == 0) return (0);
return (ad_0 - ai_8 * Point);
}

double StopShort(double ad_0, int ai_8) {
if (ai_8 == 0) return (0);
return (ad_0 + ai_8 * Point);
}

double TakeLong(double ad_0, int ai_8) {
if (ai_8 == 0) return (0);
return (ad_0 + ai_8 * Point);
}

double TakeShort(double ad_0, int ai_8) {
if (ai_8 == 0) return (0);
return (ad_0 - ai_8 * Point);
}

double CalculateProfit() {
double ld_ret_0 = 0;
for (g_pos_324 = OrdersTotal() - 1; g_pos_324 >= 0; g_pos_324--) {
OrderSelect(g_pos_324, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() != Symbol() || OrderMagicNumber() != Magic) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic)
if (OrderType() == OP_BUY || OrderType() == OP_SELL) ld_ret_0 += OrderProfit();
}
return (ld_ret_0);
}

void TrailingAlls(int ai_0, int ai_4, double a_price_8) {
int li_16;
double l_ord_stoploss_20;
double l_price_28;
if (ai_4 != 0) {
for (int l_pos_36 = OrdersTotal() - 1; l_pos_36 >= 0; l_pos_36--) {
if (OrderSelect(l_pos_36, SELECT_BY_POS, MODE_TRADES)) {
if (OrderSymbol() != Symbol() || OrderMagicNumber() != Magic) continue;
if (OrderSymbol() == Symbol() || OrderMagicNumber() == Magic) {
if (OrderType() == OP_BUY) {
li_16 = NormalizeDouble((Bid - a_price_8) / Point, 0);
if (li_16 < ai_0) continue;
l_ord_stoploss_20 = OrderStopLoss();
l_price_28 = Bid - ai_4 * Point;
if (l_ord_stoploss_20 == 0.0 || (l_ord_stoploss_20 != 0.0 && l_price_28 > l_ord_stoploss_20)) OrderModify(OrderTicket(), a_price_8, l_price_28, OrderTakeProfit(), 0, Aqua);
}
if (OrderType() == OP_SELL) {
li_16 = NormalizeDouble((a_price_8 - Ask) / Point, 0);
if (li_16 < ai_0) continue;
l_ord_stoploss_20 = OrderStopLoss();
l_price_28 = Ask + ai_4 * Point;
if (l_ord_stoploss_20 == 0.0 || (l_ord_stoploss_20 != 0.0 && l_price_28 < l_ord_stoploss_20)) OrderModify(OrderTicket(), a_price_8, l_price_28, OrderTakeProfit(), 0, Red);
}
}
Sleep(1000);
}
}
}
}

double AccountEquityHigh() {
if (CountTrades() == 0) gd_368 = AccountEquity();
if (gd_368 < gd_376) gd_368 = gd_376;
else gd_368 = AccountEquity();
gd_376 = AccountEquity();
return (gd_368);
}

double FindLastBuyPrice() {
double l_ord_open_price_0;
int l_ticket_8;
double ld_unused_12 = 0;
int l_ticket_20 = 0;
for (int l_pos_24 = OrdersTotal() - 1; l_pos_24 >= 0; l_pos_24--) {
OrderSelect(l_pos_24, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() != Symbol() || OrderMagicNumber() != Magic) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic && OrderType() == OP_BUY) {
l_ticket_8 = OrderTicket();
if (l_ticket_8 > l_ticket_20) {
l_ord_open_price_0 = OrderOpenPrice();
ld_unused_12 = l_ord_open_price_0;
l_ticket_20 = l_ticket_8;
}
}
}
return (l_ord_open_price_0);
}

double FindLastSellPrice() {
double l_ord_open_price_0;
int l_ticket_8;
double ld_unused_12 = 0;
int l_ticket_20 = 0;
for (int l_pos_24 = OrdersTotal() - 1; l_pos_24 >= 0; l_pos_24--) {
OrderSelect(l_pos_24, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() != Symbol() || OrderMagicNumber() != Magic) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == Magic && OrderType() == OP_SELL) {
l_ticket_8 = OrderTicket();
if (l_ticket_8 > l_ticket_20) {
l_ord_open_price_0 = OrderOpenPrice();
ld_unused_12 = l_ord_open_price_0;
l_ticket_20 = l_ticket_8;
}
}
}
return (l_ord_open_price_0);
}

void Display_Info() {
Comment("This system not for sale or Share\n", "Forex Account Server:", AccountServer(),
"\n", "Lots: ", Lots,
"\n", "Symbol: ", Symbol(),
"\n", "Price: ", NormalizeDouble(Bid, 4),
"\n", "Date: ", Month(), "-", Day(), "-", Year(), " Server Time: ", Hour(), ":", Minute(), ":", Seconds(),
"\n");


#property copyright "Copyright © forexeasystems"
#property link      "http://www.forexeasystems.com"

#include <stdlib.mqh>

extern string SharkII©forexeasystems = "Version 3.0 Build 16";
extern string Registred = "";
extern string TRADINGPARAMETER = "";
extern int MagicNumber = 753953;
extern bool Moneymanagement = TRUE;
extern double Lots = 0.1;
extern double MaximumRisk = 0.1;
extern int MaxSlippage = 10;
extern double MaxTradesize = 100.0;
extern bool Fridaymode = FALSE;
extern bool ShowMarketInfo = FALSE;
int gi_144 = 35;
int gi_148 = 9;
bool gi_152 = FALSE;
double g_time_156;
double g_bid_164;
double g_ask_172;
double g_spread_180;
double g_swaplong_188;
double g_swapshort_196;
double gd_204 = 1.0;
bool gi_212 = TRUE;
int gi_216 = 3;
bool gi_220 = FALSE;
bool gi_224 = FALSE;
int gi_228 = 9;
int gi_232 = 1;
int gi_236 = 255;
int gi_240 = 16711680;
bool gi_244 = FALSE;
int g_applied_price_248 = PRICE_CLOSE;
bool gi_unused_252 = FALSE;
int gi_unused_256 = 21;
int gi_unused_260 = 2;
int gi_unused_264 = 1;
int gi_unused_268 = 2;
int gi_unused_272 = 5;
bool gi_276 = FALSE;
bool gi_280 = TRUE;
int g_period_284 = 14;
int gi_unused_288 = 1;
double gd_292 = 100.0;
double gd_unused_300 = 100.0;
bool gi_308 = TRUE;
int g_ma_method_312 = MODE_SMA;
int g_price_field_316 = 0;
double gd_320 = 50.0;
double gd_328 = 25.0;
bool gi_336 = FALSE;
int g_shift_340 = 0;
int g_timeframe_344 = 0;
double g_imacd_348;
double g_imacd_356;
double g_istochastic_364;
double g_istochastic_372;
double g_istochastic_380;
double g_istochastic_388;
double g_isar_396;
double g_isar_404;
double g_imomentum_412;
double gd_unused_420;
string gs_dummy_428;
int gi_436;

int GetMarketInfo() {
   HideTestIndicators(TRUE);
   g_time_156 = MarketInfo(Symbol(), MODE_TIME);
   g_bid_164 = MarketInfo(Symbol(), MODE_BID);
   g_ask_172 = MarketInfo(Symbol(), MODE_ASK);
   g_spread_180 = MarketInfo(Symbol(), MODE_SPREAD);
   g_swaplong_188 = MarketInfo(Symbol(), MODE_SWAPLONG);
   g_swapshort_196 = MarketInfo(Symbol(), MODE_SWAPSHORT);
   if (ShowMarketInfo == TRUE) {
      Print("ModeTime:", g_time_156);
      Print("ModeBid:", g_bid_164);
      Print("ModeAsk:", g_ask_172);
      Print("ModeSpread:", g_spread_180);
      Print("ModeSwapLong:", g_swaplong_188);
      Print("ModeSwapShort:", g_swapshort_196);
   }
   return (0);
}

int init() {
   ObjectCreate("text_object", OBJ_LABEL, 0, 0, 0);
   ObjectSet("text_object", OBJPROP_XDISTANCE, 4);
   ObjectSet("text_object", OBJPROP_YDISTANCE, 20);
   ObjectSetText("text_object", "", 16777215);
   ObjectCreate("text_object", OBJ_LABEL, 0, 0, 0);
   ObjectSet("text_object", OBJPROP_XDISTANCE, 4);
   ObjectSet("text_object", OBJPROP_YDISTANCE, 20);
   ObjectSetText("text_object", "", 16777215);
   ObjectCreate("text_object", OBJ_LABEL, 0, 0, 0);
   ObjectSet("text_object", OBJPROP_XDISTANCE, 4);
   ObjectSet("text_object", OBJPROP_YDISTANCE, 20);
   ObjectSetText("text_object", "", 16777215);
   ObjectCreate("text_object", OBJ_LABEL, 0, 0, 0);
   ObjectSet("text_object", OBJPROP_XDISTANCE, 4);
   ObjectSet("text_object", OBJPROP_YDISTANCE, 20);
   ObjectSetText("text_object", "", 16777215);
   ObjectCreate("text_object", OBJ_LABEL, 0, 0, 0);
   ObjectSet("text_object", OBJPROP_XDISTANCE, 4);
   ObjectSet("text_object", OBJPROP_YDISTANCE, 20);
   ObjectSetText("text_object", "", 16777215);
   ObjectCreate("text_object", OBJ_LABEL, 0, 0, 0);
   ObjectSet("text_object", OBJPROP_XDISTANCE, 4);
   ObjectSet("text_object", OBJPROP_YDISTANCE, 20);
   ObjectSetText("text_object", "", 16777215);
   ObjectCreate("text_object", OBJ_LABEL, 0, 0, 0);
   ObjectSet("text_object", OBJPROP_XDISTANCE, 4);
   ObjectSet("text_object", OBJPROP_YDISTANCE, 20);
   ObjectSetText("text_object", "", 16777215);
   watermark();
   if (IsTradeContextBusy() == TRUE) Alert("EA SHARK >> TRADE CONTEX BUSY");
   if (MaxSlippage > 11) Alert("EA SHARK >> MAX SLIPPAGE TO HIGH");
   if (MaxSlippage < 2) Alert("EA SHARK >> MAX SLIPPAGE TO LITTLE");
   if (IsStopped() == TRUE) Alert("EA SHARK >> AUTO TRADING STOPPED BY BROKERSERVER");
   if (Bars < 1000) Alert("EA SHARK >> LESS THEN 1000 BARS IN THE CHART - EA CANNOT WORK");
   if (StringSubstr(Symbol(), 0, 6) != "EURUSD" && StringSubstr(Symbol(), 0, 6) != "EURUSDm") Alert("EA SHARK >> PLEASE PLACE THE EA ON THE 30 MIN EURUSD CHART");
   return (0);
}

int deinit() {
   return (0);
}

bool CheckExitCondition(string as_unused_0) {
   bool li_ret_8 = FALSE;
   return (li_ret_8);
}

bool CheckEntryConditionBUY() {
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 12, 26, 9, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 12, 26, 9, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 >= g_imacd_356) return (FALSE);
   }
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 12, 25, 9, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 12, 25, 9, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 >= g_imacd_356) return (FALSE);
   }
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 13, 26, 9, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 13, 26, 9, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 >= g_imacd_356) return (FALSE);
   }
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 13, 25, 9, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 13, 25, 9, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 >= g_imacd_356) return (FALSE);
   }
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 14, 26, 9, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 14, 26, 9, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 >= g_imacd_356) return (FALSE);
   }
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 14, 25, 9, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 14, 25, 9, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 >= g_imacd_356) return (FALSE);
   }
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 12, 25, 9, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 12, 25, 9, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 >= g_imacd_356) return (FALSE);
   }
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 13, 25, 9, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 13, 25, 9, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 >= g_imacd_356) return (FALSE);
   }
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 14, 25, 9, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 14, 25, 9, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 >= g_imacd_356) return (FALSE);
   }
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 24, 52, 18, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 24, 52, 18, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 >= g_imacd_356) return (FALSE);
   }
   if (gi_308) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 3, 3, 1, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      if (g_istochastic_364 >= gd_320) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 5, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 5, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 5, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 5, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 >= gd_320) return (FALSE);
      if (g_istochastic_380 >= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 <= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 6, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 6, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 6, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 6, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 >= gd_320) return (FALSE);
      if (g_istochastic_380 >= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 <= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 7, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 7, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 7, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 7, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 >= gd_320) return (FALSE);
      if (g_istochastic_380 >= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 <= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 8, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 8, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 8, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 8, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 >= gd_320) return (FALSE);
      if (g_istochastic_380 >= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 <= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 9, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 9, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 9, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 9, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 >= gd_320) return (FALSE);
      if (g_istochastic_380 >= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 <= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 10, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 10, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 10, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 10, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 >= gd_320) return (FALSE);
      if (g_istochastic_380 >= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 <= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 10, 6, 6, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 10, 6, 6, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 10, 6, 6, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 10, 6, 6, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 >= gd_320) return (FALSE);
      if (g_istochastic_380 >= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 <= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 49, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 49, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 49, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 49, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 >= gd_320) return (FALSE);
      if (g_istochastic_380 >= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 <= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 50, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 50, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 50, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 50, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 >= gd_320) return (FALSE);
      if (g_istochastic_380 >= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 <= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 51, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 51, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 51, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 51, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 >= gd_320) return (FALSE);
      if (g_istochastic_380 >= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 <= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 52, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 52, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 52, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 52, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 >= gd_320) return (FALSE);
      if (g_istochastic_380 >= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 <= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 19, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 19, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 19, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 19, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 >= gd_320) return (FALSE);
      if (g_istochastic_380 >= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 <= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 20, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 20, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 20, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 20, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 >= gd_320) return (FALSE);
      if (g_istochastic_380 >= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 <= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 21, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 21, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 21, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 21, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 >= gd_320) return (FALSE);
      if (g_istochastic_380 >= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 <= g_istochastic_372) return (FALSE);
   }
   if (gi_308) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 2, 3, 4, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      if (g_istochastic_364 >= gd_328) return (FALSE);
   }
   if (gi_308) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 3, 3, 1, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      if (g_istochastic_364 >= gd_328) return (FALSE);
   }
   if (gi_280) {
      g_isar_396 = iSAR(NULL, g_timeframe_344, 0.02, 0.2, g_shift_340);
      if (g_isar_396 > Ask) return (FALSE);
      g_isar_404 = iSAR(NULL, g_timeframe_344, 0.03, 0.3, g_shift_340);
      if (g_isar_404 < g_isar_396) return (FALSE);
   }
   if (gi_276) {
      g_imomentum_412 = iMomentum(NULL, g_timeframe_344, g_period_284, PRICE_OPEN, g_shift_340);
      gd_unused_420 = iMomentum(NULL, g_timeframe_344, g_period_284, PRICE_OPEN, g_shift_340 + 1);
      if (g_imomentum_412 >= gd_292) return (FALSE);
   }
   if (Fridaymode == TRUE && DayOfWeek() == 5) return (FALSE);
   return (TRUE);
}

bool CheckEntryConditionSELL() {
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 12, 26, 9, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 12, 26, 9, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 <= g_imacd_356) return (FALSE);
   }
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 12, 25, 9, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 12, 25, 9, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 <= g_imacd_356) return (FALSE);
   }
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 13, 26, 9, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 13, 26, 9, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 <= g_imacd_356) return (FALSE);
   }
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 13, 25, 9, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 13, 25, 9, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 <= g_imacd_356) return (FALSE);
   }
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 14, 26, 9, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 14, 26, 9, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 <= g_imacd_356) return (FALSE);
   }
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 14, 25, 9, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 14, 2, 9, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 <= g_imacd_356) return (FALSE);
   }
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 12, 25, 9, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 12, 25, 9, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 <= g_imacd_356) return (FALSE);
   }
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 13, 25, 9, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 13, 25, 9, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 <= g_imacd_356) return (FALSE);
   }
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 14, 25, 9, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 14, 25, 9, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 <= g_imacd_356) return (FALSE);
   }
   if (gi_244) {
      g_imacd_348 = iMACD(NULL, g_timeframe_344, 24, 52, 18, g_applied_price_248, MODE_MAIN, g_shift_340);
      g_imacd_356 = iMACD(NULL, g_timeframe_344, 24, 52, 18, g_applied_price_248, MODE_SIGNAL, g_shift_340);
      if (g_imacd_348 <= g_imacd_356) return (FALSE);
   }
   if (gi_308) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 3, 3, 1, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      if (g_istochastic_364 <= gd_320) return (FALSE);
   }
   if (gi_308) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 2, 3, 4, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      if (g_istochastic_364 <= gd_320) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 5, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 5, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 5, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 5, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 <= gd_320) return (FALSE);
      if (g_istochastic_380 <= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 >= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 6, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 6, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 6, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 6, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 <= gd_320) return (FALSE);
      if (g_istochastic_380 <= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 >= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 7, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 7, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 7, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 7, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 <= gd_320) return (FALSE);
      if (g_istochastic_380 <= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 >= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 8, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 8, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 8, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 8, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 <= gd_320) return (FALSE);
      if (g_istochastic_380 <= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 >= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 9, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 9, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 9, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 9, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 <= gd_320) return (FALSE);
      if (g_istochastic_380 <= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 >= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 10, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 10, 3, 3, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 10, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 10, 3, 3, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 <= gd_320) return (FALSE);
      if (g_istochastic_380 <= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 >= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 10, 6, 6, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 10, 6, 6, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 10, 6, 6, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 10, 6, 6, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 <= gd_320) return (FALSE);
      if (g_istochastic_380 <= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 >= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 49, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 49, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 49, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 49, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 <= gd_320) return (FALSE);
      if (g_istochastic_380 <= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 >= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 50, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 50, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 50, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 50, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 <= gd_320) return (FALSE);
      if (g_istochastic_380 <= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 >= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 51, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 51, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 51, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 51, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 <= gd_320) return (FALSE);
      if (g_istochastic_380 <= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 >= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 52, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 52, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 52, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 52, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 <= gd_320) return (FALSE);
      if (g_istochastic_380 <= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 >= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 19, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 19, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 19, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 19, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 <= gd_320) return (FALSE);
      if (g_istochastic_380 <= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 >= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 20, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 20, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 20, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 20, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 <= gd_320) return (FALSE);
      if (g_istochastic_380 <= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 >= g_istochastic_372) return (FALSE);
   }
   if (gi_336) {
      g_istochastic_364 = iStochastic(NULL, g_timeframe_344, 21, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340);
      g_istochastic_372 = iStochastic(NULL, g_timeframe_344, 21, 10, 20, g_ma_method_312, g_price_field_316, MODE_MAIN, g_shift_340 + 1);
      g_istochastic_380 = iStochastic(NULL, g_timeframe_344, 21, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340);
      g_istochastic_388 = iStochastic(NULL, g_timeframe_344, 21, 10, 20, g_ma_method_312, g_price_field_316, MODE_SIGNAL, g_shift_340 + 1);
      if (g_istochastic_364 <= gd_320) return (FALSE);
      if (g_istochastic_380 <= g_istochastic_364) return (FALSE);
      if (g_istochastic_388 >= g_istochastic_372) return (FALSE);
   }
   if (gi_280) {
      g_isar_396 = iSAR(NULL, g_timeframe_344, 0.05, 0.3, g_shift_340);
      if (g_isar_396 < Bid) return (FALSE);
      g_isar_404 = iSAR(NULL, g_timeframe_344, 0.04, 0.2, g_shift_340 + 1);
      if (g_isar_404 >= g_isar_396) return (FALSE);
   }
   if (gi_280) {
      g_isar_396 = iSAR(NULL, g_timeframe_344, 0.02, 0.2, g_shift_340);
      if (g_isar_396 < Bid) return (FALSE);
      g_isar_404 = iSAR(NULL, g_timeframe_344, 0.03, 0.3, g_shift_340 + 1);
      if (g_isar_404 >= g_isar_396) return (FALSE);
   }
   if (gi_276) {
      g_imomentum_412 = iMomentum(NULL, g_timeframe_344, g_period_284, PRICE_OPEN, g_shift_340);
      gd_unused_420 = iMomentum(NULL, g_timeframe_344, g_period_284, PRICE_OPEN, g_shift_340 + 1);
      if (g_imomentum_412 <= gd_292) return (FALSE);
   }
   if (Fridaymode == TRUE && DayOfWeek() == 5) return (FALSE);
   return (TRUE);
}

int start() {
   string ls_0;
   GetMarketInfo();
   if (Symbol() == "EURUSD" || Symbol() == "EURUSDm") {
         ls_0 = ""
            + "\n"
            + "SHARK 3.0 Ultimate Build 16 ©"
            + "\n"
            + "------------------------------------------------"
            + "\n"
            + "REGISTRED FOR: "
            + "\n"
            + ""
            + "\n"
            + "------------------------------------------------"
            + "\n"
            + "BROKER INFORMATIONS:"
            + "\n"
            + "Broker Company:      " + AccountCompany()
            + "\n"
            + "Broker Server:           " + AccountServer()
            + "\n"
            + "------------------------------------------------"
            + "\n"
            + "ACCOUNT INFORMATIONS:"
            + "\n"
            + "Account Name:          " + AccountName()
            + "\n"
            + "Account Number:       " + AccountNumber()
            + "\n"
            + "Account Leverage:     " + DoubleToStr(AccountLeverage(), 0)
            + "\n"
            + "Account Balance:       " + DoubleToStr(AccountBalance(), 2)
            + "\n"
            + "Account Currency:     " + AccountCurrency()
            + "\n"
            + "Account Equity:         " + DoubleToStr(AccountEquity(), 2)
            + "\n"
            + "------------------------------------------------"
            + "\n"
            + "MARGIN INFORMATIONS:"
            + "\n"
            + "Free Margin:              " + DoubleToStr(AccountFreeMargin(), 2)
            + "\n"
            + "Used Margin:              " + DoubleToStr(AccountMargin(), 2)
            + "\n"
            + "------------------------------------------------"
            + "\n"
         + "Actual Server Time     " + TimeToStr(TimeCurrent(), TIME_SECONDS);
      Comment(ls_0);
         if (gi_220) TrailingPositions();
         HandleOpenPositions();
         gi_436 = openPositions();
         if (gi_436 > 0) return (0);
         if (AccountFreeMargin() < 1000.0 * Moneymanagement()) {
            Alert("EA SHARK >> NOT ENOUGH MARGIN!", AccountFreeMargin());
            return (0);
         }
         if (CheckEntryConditionBUY()) OpenBuyOrder();
         if (CheckEntryConditionSELL()) OpenSellOrder();
   }
   return (0);
}