Top Banner
string gs_76 = "EA SCALPER STEP ABUNDANCE"; extern int magic = 1234; extern bool closeall = FALSE; extern bool closelosses = FALSE; extern double minlosses = 100.0; extern string moneymanagement = "Money Management"; extern double lots = 0.1; extern bool mm = FALSE; extern double risk = 1.0; extern double minlot = 0.01; extern double maxlot = 100.0; extern double lotdigits = 2.0; extern bool basketpercent = FALSE; extern double profit = 10.0; extern double loss = 30.0; extern string ordersmanagement = "Order Management"; extern bool isbrokerecn = FALSE; extern bool timeout = FALSE; extern double timeminutes = 60.0; extern double maxorders = 50.0; extern bool maxtradesperpair = FALSE; extern double maxtradespercent = 50.0; extern double pipstep = 0.0; extern bool hidesl = FALSE; extern bool hidetp = FALSE; extern double lstoploss = 0.0;
32

string gs

Nov 04, 2014

Download

Documents

Yufi Mustofa

string EA robotic
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: string gs

string gs_76 = "EA SCALPER STEP ABUNDANCE";

extern int magic = 1234;

extern bool closeall = FALSE;

extern bool closelosses = FALSE;

extern double minlosses = 100.0;

extern string moneymanagement = "Money Management";

extern double lots = 0.1;

extern bool mm = FALSE;

extern double risk = 1.0;

extern double minlot = 0.01;

extern double maxlot = 100.0;

extern double lotdigits = 2.0;

extern bool basketpercent = FALSE;

extern double profit = 10.0;

extern double loss = 30.0;

extern string ordersmanagement = "Order Management";

extern bool isbrokerecn = FALSE;

extern bool timeout = FALSE;

extern double timeminutes = 60.0;

extern double maxorders = 50.0;

extern bool maxtradesperpair = FALSE;

extern double maxtradespercent = 50.0;

extern double pipstep = 0.0;

extern bool hidesl = FALSE;

extern bool hidetp = FALSE;

extern double lstoploss = 0.0;

extern double sstoploss = 0.0;

Page 2: string gs

extern bool dynamicsl = FALSE;

extern int atrperiod = 14;

extern double atrmultiple = 1.0;

extern int atrtimeframe = 1440;

extern int atrshift = 1;

extern double ltakeprofit = 10.0;

extern double stakeprofit = 10.0;

extern double ltrailingstop = 20.0;

extern double strailingstop = 10.0;

extern int slippage = 1;

extern string entrylogics = "Entry Logics";

extern int closetimeframe = 5;

extern int closeshift = 0;

extern int matimeframe = 5;

extern int maperiod1 = 5;

extern int maperiod2 = 4;

extern int mamethod = 0;

extern int maprice = 1;

extern int mashift = 1;

extern bool sleeping = FALSE;

extern int sleepingminutes = 10;

extern string trendfilters = "Trend Filters";

extern bool enforceall = FALSE;

extern bool oppositeclose = FALSE;

extern bool reverseontrend = FALSE;

extern bool tradetrendsonly = FALSE;

extern int trendmaperiod = 14;

Page 3: string gs

extern bool mafilter = FALSE;

extern int mafiltertimeframe = 0;

extern int mafilterperiod = 100;

extern int mafiltermethod = 0;

extern int mafilterprice = 0;

extern int mafiltershift = 1;

extern bool damianifilter = FALSE;

extern int damianitimeframe = 0;

extern int visatr = 13;

extern int visstd = 20;

extern int sedatr = 40;

extern int sedstd = 100;

extern double thresholdlevel = 1.4;

extern int damianishift = 1;

extern string carmen = "Carmen Settings";

extern bool usecarmen = FALSE;

extern string Warning = "GBP/USD vs EUR/USD";

extern int average = 3;

extern double space = 1.0;

extern bool try_again = FALSE;

extern bool Display_TakeProfit = TRUE;

extern string SetOne = "**********************Set_One_Settings***************";

extern double Main_expand_rate_1 = 75.0;

extern double LineOne_expand_rate_1 = 20.0;

extern double LineTwo_expand_rate_1 = 10.0;

extern string SetTwo = "**********************Set_Two_Settings***************";

extern double start_at_pips_profit_2 = 50.0;

Page 4: string gs

extern double Main_expand_rate_2 = 65.0;

extern double LineOne_expand_rate_2 = 40.0;

extern double LineTwo_expand_rate_2 = 20.0;

extern string SetThree = "**********************Set_Three_Settings***********";

extern double start_at_pips_profit_3 = 100.0;

extern double Main_expand_rate_3 = 50.0;

extern double LineOne_expand_rate_3 = 25.0;

extern double LineTwo_expand_rate_3 = 15.0;

extern string SetFour = "**********************Set_Four_Settings***********";

extern double start_at_pips_profit_4 = 150.0;

extern double Main_expand_rate_4 = 35.0;

extern double LineOne_expand_rate_4 = 15.0;

extern double LineTwo_expand_rate_4 = 10.0;

extern int carmenshift = 1;

extern string timefilter = "Time Filter";

extern int summergmtshift = 2;

extern int wintergmtshift = 1;

extern bool generalfilter1 = FALSE;

extern int starthour1 = 7;

extern int startminutes1 = 0;

extern int endhour1 = 21;

extern int endminutes1 = 0;

extern bool generalfilter2 = FALSE;

extern int starthour2 = 7;

extern int startminutes2 = 0;

extern int endhour2 = 21;

extern int endminutes2 = 0;

Page 5: string gs

extern bool generalfilter3 = FALSE;

extern int starthour3 = 7;

extern int startminutes3 = 0;

extern int endhour3 = 21;

extern int endminutes3 = 0;

extern bool tradesunday = TRUE;

extern bool fridayfilter = FALSE;

extern int fridayhour = 21;

extern int fridayminutes = 0;

int gi_736;

int gi_740;

int gi_744;

int gi_748;

string gs_752;

string gs_760;

string gs_768;

string gs_776;

string gs_784;

string gs_792;

int g_str2time_800;

int g_str2time_804;

int g_str2time_808;

int gi_812;

int gi_816;

string gs_820;

string gs_828;

string gs_836;

Page 6: string gs

string gs_844;

int g_str2time_852;

int g_str2time_856;

int gi_860;

int gi_864;

string gs_868;

string gs_876;

string gs_884;

string gs_892;

int g_str2time_900;

int g_str2time_904;

bool gi_unused_908 = FALSE;

string gs_unused_912 = "Alert.wav";

int g_color_920 = Green;

int gi_unused_924 = 16776960;

int g_color_928 = Red;

int gi_unused_932 = 15631086;

int gi_unused_936 = 16711680;

int gi_unused_940 = 255;

int g_order_total_944;

int g_pos_948;

int gi_952;

double g_order_open_price_956;

double g_order_open_price_964;

double g_order_open_price_972;

double g_order_open_price_980;

double g_order_open_price_988;

Page 7: string gs

double g_order_open_price_996;

double gda_1004[14];

double gda_1008[14];

double gd_1012;

double gd_1020;

int g_digits_1028;

int init() {

g_digits_1028 = Digits;

if (g_digits_1028 == 3 || g_digits_1028 == 5) {

gd_1012 = 10.0 * Point;

gd_1020 = 10;

} else {

gd_1012 = Point;

gd_1020 = 1;

}

return (0);

}

void deinit() {

Comment("");

}

int start() {

double iatr_0;

double ima_8;

double icustom_16;

Page 8: string gs

double icustom_24;

double icustom_32;

double icustom_40;

double icustom_48;

double icustom_56;

double icustom_64;

double icustom_72;

bool li_80;

bool li_84;

bool li_88;

bool li_92;

bool li_96;

bool li_100;

string ls_104 = "2035.03.20";

int str2time_112 = StrToTime(ls_104);

if (TimeCurrent() >= str2time_112) return (0);

if (closeall) {

f0_7();

f0_8();

}

if (closelosses) {

f0_4();

f0_21();

}

if (basketpercent) f0_25(profit, loss);

if (timeout) {

f0_6();

Page 9: string gs

f0_16();

}

if (hidetp || hidesl) {

f0_12();

f0_22();

}

f0_23(ltrailingstop);

f0_0(strailingstop);

if (TimeCurrent() < gda_1004[TimeYear(TimeCurrent()) - 1999] && TimeCurrent() > gda_1008[TimeYear(TimeCurrent()) - 1999]) gi_748 = summergmtshift;

else gi_748 = wintergmtshift;

string ls_unused_116 = "";

string ls_124 = Year() + "." + Month() + "." + Day();

if (generalfilter1) {

gi_736 = starthour1 + gi_748;

if (gi_736 > 23) gi_736 -= 24;

if (gi_736 < 10) gs_752 = "0" + gi_736;

if (gi_736 > 9) gs_752 = gi_736;

if (startminutes1 < 10) gs_760 = "0" + startminutes1;

if (startminutes1 > 9) gs_760 = startminutes1;

g_str2time_800 = StrToTime(ls_124 + " " + gs_752 + ":" + gs_760);

gi_740 = endhour1 + gi_748;

if (gi_740 > 23) gi_740 -= 24;

if (endhour1 < 10) gs_768 = "0" + gi_740;

if (endhour1 > 9) gs_768 = gi_740;

if (endminutes1 < 10) gs_776 = "0" + endminutes1;

if (endminutes1 > 9) gs_776 = endminutes1;

Page 10: string gs

g_str2time_804 = StrToTime(ls_124 + " " + gs_768 + ":" + gs_776);

}

if (generalfilter2) {

gi_812 = starthour2 + gi_748;

if (gi_812 > 23) gi_812 -= 24;

gi_812 = starthour2 + gi_748;

if (gi_812 > 23) gi_812 -= 24;

if (gi_812 < 10) gs_820 = "0" + gi_812;

if (gi_812 > 9) gs_820 = gi_812;

if (startminutes2 < 10) gs_828 = "0" + startminutes2;

if (startminutes2 > 9) gs_828 = startminutes2;

g_str2time_852 = StrToTime(ls_124 + " " + gs_820 + ":" + gs_828);

gi_816 = endhour2 + gi_748;

if (gi_816 > 23) gi_816 -= 24;

if (endhour2 < 10) gs_836 = "0" + gi_816;

if (endhour2 > 9) gs_836 = gi_816;

if (endminutes2 < 10) gs_844 = "0" + endminutes2;

if (endminutes2 > 9) gs_844 = endminutes2;

g_str2time_856 = StrToTime(ls_124 + " " + gs_836 + ":" + gs_844);

}

if (generalfilter3) {

gi_860 = starthour3 + gi_748;

if (gi_860 > 23) gi_860 -= 24;

gi_860 = starthour3 + gi_748;

if (gi_860 > 23) gi_860 -= 24;

if (gi_860 < 10) gs_868 = "0" + gi_860;

if (gi_860 > 9) gs_868 = gi_860;

Page 11: string gs

if (startminutes3 < 10) gs_876 = "0" + startminutes3;

if (startminutes3 > 9) gs_876 = startminutes3;

g_str2time_900 = StrToTime(ls_124 + " " + gs_868 + ":" + gs_876);

gi_864 = endhour3 + gi_748;

if (gi_864 > 23) gi_864 -= 24;

if (endhour3 < 10) gs_884 = "0" + gi_864;

if (endhour3 > 9) gs_884 = gi_864;

if (endminutes3 < 10) gs_892 = "0" + endminutes3;

if (endminutes3 > 9) gs_892 = endminutes3;

g_str2time_904 = StrToTime(ls_124 + " " + gs_884 + ":" + gs_892);

}

if (fridayfilter) {

gi_744 = fridayhour + gi_748;

if (gi_744 > 23) gi_744 -= 24;

if (gi_744 < 10) gs_784 = "0" + gi_744;

if (gi_744 > 9) gs_784 = gi_744;

if (fridayminutes < 10) gs_792 = "0" + fridayminutes;

if (fridayminutes > 9) gs_792 = fridayminutes;

g_str2time_808 = StrToTime(ls_124 + " " + gs_784 + ":" + gs_792);

}

bool li_132 = TRUE;

if (generalfilter1 && (gi_736 <= gi_740 && TimeCurrent() < g_str2time_800 || TimeCurrent() > g_str2time_804) || (gi_736 > gi_740 && TimeCurrent() < g_str2time_800 &&

TimeCurrent() > g_str2time_804)) li_132 = FALSE;

bool li_136 = TRUE;

if (generalfilter2 && (gi_812 <= gi_816 && TimeCurrent() < g_str2time_852 || TimeCurrent() > g_str2time_856) || (gi_812 > gi_816 && TimeCurrent() < g_str2time_852 &&

TimeCurrent() > g_str2time_856)) li_136 = FALSE;

Page 12: string gs

bool li_140 = TRUE;

if (generalfilter3 && (gi_860 <= gi_864 && TimeCurrent() < g_str2time_900 || TimeCurrent() > g_str2time_904) || (gi_860 > gi_864 && TimeCurrent() < g_str2time_900 &&

TimeCurrent() > g_str2time_904)) li_140 = FALSE;

bool li_144 = TRUE;

if (tradesunday == FALSE && DayOfWeek() == 0) li_144 = FALSE;

bool li_148 = TRUE;

if (fridayfilter && li_132 == TRUE || li_136 == TRUE || li_140 == TRUE && DayOfWeek() == 5 && TimeCurrent() > g_str2time_808) li_148 = FALSE;

double iclose_152 = iClose(NULL, closetimeframe, closeshift);

double ima_160 = iMA(NULL, matimeframe, maperiod1, 0, mamethod, maprice, mashift);

double ima_168 = iMA(NULL, matimeframe, maperiod2, 0, mamethod, maprice, mashift);

double ima_176 = iMA(NULL, 0, trendmaperiod, 0, MODE_SMA, PRICE_CLOSE, 1);

double ima_184 = iMA(NULL, 0, trendmaperiod, 0, MODE_SMA, PRICE_CLOSE, 2);

if (dynamicsl) {

iatr_0 = iATR(NULL, atrtimeframe, atrperiod, atrshift);

lstoploss = iatr_0 * atrmultiple / Point / gd_1020;

sstoploss = iatr_0 * atrmultiple / Point / gd_1020;

}

if (mafilter) ima_8 = iMA(NULL, mafiltertimeframe, mafilterperiod, 0, mafiltermethod, mafilterprice, mafiltershift);

if (damianifilter) {

icustom_16 = iCustom(NULL, damianitimeframe, "Damiani_volatmeter v3.2", visatr, visstd, sedatr, sedstd, thresholdlevel, 0, damianishift);

icustom_24 = iCustom(NULL, damianitimeframe, "Damiani_volatmeter v3.2", visatr, visstd, sedatr, sedstd, thresholdlevel, 2, damianishift);

}

if (usecarmen) {

Page 13: string gs

icustom_32 = iCustom(NULL, 0, "carmens_eyes_v3.1", Warning, average, space, try_again, Display_TakeProfit, SetOne, Main_expand_rate_1, LineOne_expand_rate_1, LineTwo_expand_rate_1,

SetTwo, start_at_pips_profit_2, Main_expand_rate_2, LineOne_expand_rate_2, LineTwo_expand_rate_2, SetThree, start_at_pips_profit_3, Main_expand_rate_3, LineOne_expand_rate_3,

LineTwo_expand_rate_3, SetFour, start_at_pips_profit_4, Main_expand_rate_4, LineOne_expand_rate_4, LineTwo_expand_rate_4, 0, carmenshift);

icustom_40 = iCustom(NULL, 0, "carmens_eyes_v3.1", Warning, average, space, try_again, Display_TakeProfit, SetOne, Main_expand_rate_1, LineOne_expand_rate_1, LineTwo_expand_rate_1,

SetTwo, start_at_pips_profit_2, Main_expand_rate_2, LineOne_expand_rate_2, LineTwo_expand_rate_2, SetThree, start_at_pips_profit_3, Main_expand_rate_3, LineOne_expand_rate_3,

LineTwo_expand_rate_3, SetFour, start_at_pips_profit_4, Main_expand_rate_4, LineOne_expand_rate_4, LineTwo_expand_rate_4, 3, carmenshift);

icustom_48 = iCustom(NULL, 0, "carmens_eyes_v3.1", Warning, average, space, try_again, Display_TakeProfit, SetOne, Main_expand_rate_1, LineOne_expand_rate_1, LineTwo_expand_rate_1,

SetTwo, start_at_pips_profit_2, Main_expand_rate_2, LineOne_expand_rate_2, LineTwo_expand_rate_2, SetThree, start_at_pips_profit_3, Main_expand_rate_3, LineOne_expand_rate_3,

LineTwo_expand_rate_3, SetFour, start_at_pips_profit_4, Main_expand_rate_4, LineOne_expand_rate_4, LineTwo_expand_rate_4, 4, carmenshift);

icustom_56 = iCustom(NULL, 0, "carmens_eyes_v3.1", Warning, average, space, try_again, Display_TakeProfit, SetOne, Main_expand_rate_1, LineOne_expand_rate_1, LineTwo_expand_rate_1,

SetTwo, start_at_pips_profit_2, Main_expand_rate_2, LineOne_expand_rate_2, LineTwo_expand_rate_2, SetThree, start_at_pips_profit_3, Main_expand_rate_3, LineOne_expand_rate_3,

LineTwo_expand_rate_3, SetFour, start_at_pips_profit_4, Main_expand_rate_4, LineOne_expand_rate_4, LineTwo_expand_rate_4, 0, carmenshift + 1);

icustom_64 = iCustom(NULL, 0, "carmens_eyes_v3.1", Warning, average, space, try_again, Display_TakeProfit, SetOne, Main_expand_rate_1, LineOne_expand_rate_1, LineTwo_expand_rate_1,

Page 14: string gs

SetTwo, start_at_pips_profit_2, Main_expand_rate_2, LineOne_expand_rate_2, LineTwo_expand_rate_2, SetThree, start_at_pips_profit_3, Main_expand_rate_3, LineOne_expand_rate_3,

LineTwo_expand_rate_3, SetFour, start_at_pips_profit_4, Main_expand_rate_4, LineOne_expand_rate_4, LineTwo_expand_rate_4, 3, carmenshift + 1);

icustom_72 = iCustom(NULL, 0, "carmens_eyes_v3.1", Warning, average, space, try_again, Display_TakeProfit, SetOne, Main_expand_rate_1, LineOne_expand_rate_1, LineTwo_expand_rate_1,

SetTwo, start_at_pips_profit_2, Main_expand_rate_2, LineOne_expand_rate_2, LineTwo_expand_rate_2, SetThree, start_at_pips_profit_3, Main_expand_rate_3, LineOne_expand_rate_3,

LineTwo_expand_rate_3, SetFour, start_at_pips_profit_4, Main_expand_rate_4, LineOne_expand_rate_4, LineTwo_expand_rate_4, 4, carmenshift + 1);

}

g_order_open_price_964 = 0;

g_order_open_price_972 = 0;

g_order_open_price_988 = 0;

g_order_open_price_996 = 0;

if (OrdersTotal() > 0) {

for (g_pos_948 = 0; g_pos_948 < OrdersTotal(); g_pos_948++) {

OrderSelect(g_pos_948, SELECT_BY_POS, MODE_TRADES);

if (OrderSymbol() == Symbol() && OrderMagicNumber() == magic && OrderCloseTime() == 0) {

if (OrderType() == OP_BUY) {

g_order_open_price_956 = OrderOpenPrice();

if (g_order_open_price_956 > g_order_open_price_964) g_order_open_price_964 = g_order_open_price_956;

if (g_order_open_price_972 == 0.0 || g_order_open_price_956 < g_order_open_price_972) g_order_open_price_972 = g_order_open_price_956;

}

if (OrderType() == OP_SELL) {

g_order_open_price_980 = OrderOpenPrice();

Page 15: string gs

if (g_order_open_price_980 > g_order_open_price_988) g_order_open_price_988 = g_order_open_price_980;

if (g_order_open_price_996 == 0.0 || g_order_open_price_980 < g_order_open_price_996) g_order_open_price_996 = g_order_open_price_980;

}

}

}

}

bool li_192 = FALSE;

bool li_196 = FALSE;

if (enforceall) {

li_80 = TRUE;

li_84 = TRUE;

li_88 = TRUE;

li_92 = TRUE;

li_96 = TRUE;

li_100 = TRUE;

if (mafilter && (!(Ask > ima_8 && ima_176 > ima_184))) li_80 = FALSE;

if (mafilter && (!(Bid < ima_8 && ima_176 < ima_184))) li_92 = FALSE;

if (damianifilter && (!(icustom_16 < icustom_24 && ima_176 > ima_184))) li_84 = FALSE;

if (damianifilter && (!(icustom_16 < icustom_24 && ima_176 < ima_184))) li_96 = FALSE;

if (usecarmen && (!(icustom_32 > icustom_40 && icustom_32 > icustom_48 && (!(icustom_56 > icustom_64 && icustom_56 > icustom_72)) && ima_176 > ima_184))) li_88 = FALSE;

if (usecarmen && (!(icustom_32 < icustom_40 && icustom_32 < icustom_48 && (!(icustom_56 < icustom_64 && icustom_56 < icustom_72)) && ima_176 < ima_184))) li_100 = FALSE;

if (li_80 && li_84 && li_88 && mafilter || damianifilter || usecarmen) {

li_192 = TRUE;

if (oppositeclose) f0_8();

}

Page 16: string gs

if (li_92 && li_96 && li_100 && mafilter || damianifilter || usecarmen) {

li_196 = TRUE;

if (oppositeclose) f0_7();

}

} else {

if ((mafilter && Ask > ima_8 && ima_176 > ima_184) || (damianifilter && icustom_16 < icustom_24 && ima_176 > ima_184) || (usecarmen && icustom_32 > icustom_40 && icustom_32 > icustom_48 &&

(!(icustom_56 > icustom_64 && icustom_56 > icustom_72)) && ima_176 > ima_184)) {

li_192 = TRUE;

if (oppositeclose) f0_8();

}

if ((mafilter && Bid < ima_8 && ima_176 < ima_184) || (damianifilter && icustom_16 < icustom_24 && ima_176 < ima_184) || (usecarmen && icustom_32 < icustom_40 && icustom_32 < icustom_48 &&

(!(icustom_56 < icustom_64 && icustom_56 < icustom_72)) && ima_176 < ima_184)) {

li_196 = TRUE;

if (oppositeclose) f0_7();

}

}

if (mm) lots = f0_13();

if (!f0_27() && li_148 == TRUE && li_144 == TRUE && li_132 == TRUE || li_136 == TRUE || li_140 == TRUE) {

if ((li_192 && reverseontrend) || (iclose_152 < ima_160 && li_196 == FALSE && tradetrendsonly == FALSE)) {

if (!(g_order_open_price_972 - Ask >= pipstep * gd_1012 || Ask - g_order_open_price_964 >= pipstep * gd_1012)) return (0);

f0_9();

return (0);

}

Page 17: string gs

if ((li_196 && reverseontrend) || (iclose_152 > ima_168 && li_192 == FALSE && tradetrendsonly == FALSE)) {

if (!(Bid - g_order_open_price_988 >= pipstep * gd_1012 || g_order_open_price_996 - Bid >= pipstep * gd_1012)) return (0);

f0_19();

return (0);

}

}

return (0);

}

int f0_5(int a_cmd_0) {

int count_4 = 0;

if (OrdersTotal() > 0) {

for (g_pos_948 = OrdersTotal(); g_pos_948 >= 0; g_pos_948--) {

OrderSelect(g_pos_948, SELECT_BY_POS, MODE_TRADES);

if (OrderSymbol() == Symbol() && OrderType() == a_cmd_0 && OrderMagicNumber() == magic) count_4++;

}

return (count_4);

}

return (0);

}

double f0_13() {

double lots_0;

if (mm == TRUE) lots_0 = NormalizeDouble(AccountFreeMargin() / (100.0 * (NormalizeDouble(MarketInfo(Symbol(), MODE_MARGINREQUIRED), 4) + 5.0) / risk) - 0.05, lotdigits);

else lots_0 = lots;

Page 18: string gs

return (lots_0);

}

bool f0_27() {

for (int pos_0 = maxorders; pos_0 < OrdersTotal(); pos_0++) {

if (OrderSelect(pos_0, SELECT_BY_POS, MODE_TRADES))

if (OrderSymbol() == Symbol()) return (TRUE);

}

return (FALSE);

}

void f0_23(int ai_0) {

for (int pos_4 = maxorders; pos_4 < OrdersTotal(); pos_4++) {

if (OrderSelect(pos_4, SELECT_BY_POS, MODE_TRADES)) {

if (OrderSymbol() == Symbol() && OrderMagicNumber() == magic) {

if (OrderType() == OP_BUY) {

if (Bid - OrderOpenPrice() > ai_0 * gd_1012)

if (OrderStopLoss() < Bid - ai_0 * gd_1012) f0_14(Bid - ai_0 * gd_1012);

}

}

}

}

}

void f0_0(int ai_0) {

for (int pos_4 = maxorders; pos_4 < OrdersTotal(); pos_4++) {

if (OrderSelect(pos_4, SELECT_BY_POS, MODE_TRADES)) {

Page 19: string gs

if (OrderSymbol() == Symbol() && OrderMagicNumber() == magic) {

if (OrderType() == OP_SELL) {

if (OrderOpenPrice() - Ask > ai_0 * gd_1012)

if (OrderStopLoss() > Ask + ai_0 * gd_1012 || OrderStopLoss() == 0.0) f0_14(Ask + ai_0 * gd_1012);

}

}

}

}

}

void f0_14(double a_price_0) {

bool bool_8 = OrderModify(OrderTicket(), OrderOpenPrice(), a_price_0, OrderTakeProfit(), 0, CLR_NONE);

}

void f0_9() {

double price_0;

double price_8;

double lots_16 = f0_10();

if (lstoploss > 0.0 && hidesl == FALSE) price_0 = f0_18();

else price_0 = 0;

if (ltakeprofit > 0.0 && hidetp == FALSE) price_8 = f0_17();

else price_8 = 0;

string comment_24 = f0_3();

if (maxtradesperpair == FALSE || (maxtradesperpair && f0_5(OP_BUY) < NormalizeDouble(maxorders * maxtradespercent / 100.0, 0))) {

if (isbrokerecn == FALSE) OrderSend(Symbol(), OP_BUY, lots_16, Ask, slippage * gd_1020, price_0, price_8, comment_24, magic, 0, g_color_920);

Page 20: string gs

if (isbrokerecn) OrderSend(Symbol(), OP_BUY, lots_16, Ask, slippage * gd_1020, 0, 0, comment_24, magic, 0, g_color_920);

}

if (isbrokerecn) {

f0_26(lstoploss);

f0_2(ltakeprofit);

}

}

void f0_19() {

double price_0;

double price_8;

double lots_16 = f0_10();

if (sstoploss > 0.0 && hidesl == FALSE) price_0 = f0_1();

else price_0 = 0;

if (stakeprofit > 0.0 && hidetp == FALSE) price_8 = f0_20();

else price_8 = 0;

string comment_24 = f0_3();

if (maxtradesperpair == FALSE || (maxtradesperpair && f0_5(OP_SELL) < NormalizeDouble(maxorders * maxtradespercent / 100.0, 0))) {

if (isbrokerecn == FALSE) OrderSend(Symbol(), OP_SELL, lots_16, Bid, slippage * gd_1020, price_0, price_8, comment_24, magic, 0, g_color_928);

if (isbrokerecn) OrderSend(Symbol(), OP_SELL, lots_16, Bid, slippage * gd_1020, 0, 0, comment_24, magic, 0, g_color_928);

}

if (isbrokerecn) {

f0_11(sstoploss);

f0_24(stakeprofit);

}

Page 21: string gs

}

void f0_15(int a_cmd_0) {

if (OrdersTotal() > 0) {

for (g_pos_948 = OrdersTotal(); g_pos_948 >= 0; g_pos_948--) {

OrderSelect(g_pos_948, SELECT_BY_POS, MODE_TRADES);

if (OrderSymbol() == Symbol() && OrderMagicNumber() == magic && OrderType() == a_cmd_0) OrderDelete(OrderTicket());

}

}

}

string f0_3() {

return (gs_76);

}

double f0_10() {

return (lots);

}

double f0_18() {

return (Ask - lstoploss * gd_1012);

}

double f0_1() {

return (Bid + sstoploss * gd_1012);

}

Page 22: string gs

double f0_17() {

return (Ask + ltakeprofit * gd_1012);

}

double f0_20() {

return (Bid - stakeprofit * gd_1012);

}

void f0_25(double ad_0, double ad_8) {

double ld_16 = ad_0 * (AccountBalance() / 100.0);

double ld_24 = ad_8 * (AccountBalance() / 100.0);

gi_952 = AccountEquity() - AccountBalance();

if (gi_952 >= ld_16 || gi_952 <= (-1.0 * ld_24)) {

f0_7();

f0_8();

f0_15(OP_BUYSTOP);

f0_15(OP_SELLSTOP);

f0_15(OP_BUYLIMIT);

f0_15(OP_SELLLIMIT);

return;

}

}

void f0_22() {

if (OrdersTotal() > 0) {

for (g_pos_948 = OrdersTotal(); g_pos_948 >= 0; g_pos_948--) {

OrderSelect(g_pos_948, SELECT_BY_POS, MODE_TRADES);

Page 23: string gs

if (OrderSymbol() == Symbol() && OrderMagicNumber() == magic && OrderType() == OP_BUY && (hidesl && lstoploss > 0.0 && OrderProfit() <= (-1.0 * lstoploss) * OrderLots() - MarketInfo(Symbol(),

MODE_SPREAD) * OrderLots()) || (hidetp && ltakeprofit > 0.0 && OrderProfit() >= ltakeprofit * OrderLots())) OrderClose(OrderTicket(), OrderLots(), Bid, slippage * gd_1020);

}

}

}

void f0_12() {

if (OrdersTotal() > 0) {

for (g_pos_948 = OrdersTotal(); g_pos_948 >= 0; g_pos_948--) {

OrderSelect(g_pos_948, SELECT_BY_POS, MODE_TRADES);

if (OrderSymbol() == Symbol() && OrderMagicNumber() == magic && OrderType() == OP_SELL && (hidesl && sstoploss > 0.0 && OrderProfit() <= (-1.0 * sstoploss) * OrderLots() - MarketInfo(Symbol(),

MODE_SPREAD) * OrderLots()) || (hidetp && stakeprofit > 0.0 && OrderProfit() >= stakeprofit * OrderLots())) OrderClose(OrderTicket(), OrderLots(), Ask, slippage * gd_1020);

}

}

}

void f0_7() {

g_order_total_944 = OrdersTotal();

if (g_order_total_944 > 0) {

for (g_pos_948 = 0; g_pos_948 < g_order_total_944; g_pos_948++) {

OrderSelect(g_pos_948, SELECT_BY_POS, MODE_TRADES);

if (OrderSymbol() == Symbol() && OrderMagicNumber() == magic && OrderType() == OP_BUY) OrderClose(OrderTicket(), OrderLots(), Bid, slippage * gd_1020);

}

Page 24: string gs

}

}

void f0_8() {

g_order_total_944 = OrdersTotal();

if (g_order_total_944 > 0) {

for (g_pos_948 = 0; g_pos_948 < g_order_total_944; g_pos_948++) {

OrderSelect(g_pos_948, SELECT_BY_POS, MODE_TRADES);

if (OrderSymbol() == Symbol() && OrderMagicNumber() == magic && OrderType() == OP_SELL) OrderClose(OrderTicket(), OrderLots(), Ask, slippage * gd_1020);

}

}

}

void f0_4() {

g_order_total_944 = OrdersTotal();

if (g_order_total_944 > 0) {

for (g_pos_948 = 0; g_pos_948 < g_order_total_944; g_pos_948++) {

OrderSelect(g_pos_948, SELECT_BY_POS, MODE_TRADES);

if (OrderSymbol() == Symbol() && OrderMagicNumber() == magic && OrderType() == OP_BUY && OrderProfit() <= (-1.0 * minlosses)) OrderClose(OrderTicket(), OrderLots(), Bid, slippage * gd_1020);

}

}

}

void f0_21() {

g_order_total_944 = OrdersTotal();

if (g_order_total_944 > 0) {

Page 25: string gs

for (g_pos_948 = 0; g_pos_948 < g_order_total_944; g_pos_948++) {

OrderSelect(g_pos_948, SELECT_BY_POS, MODE_TRADES);

if (OrderSymbol() == Symbol() && OrderMagicNumber() == magic && OrderType() == OP_SELL && OrderProfit() <= (-1.0 * minlosses)) OrderClose(OrderTicket(), OrderLots(), Ask, slippage * gd_1020);

}

}

}

void f0_6() {

g_order_total_944 = OrdersTotal();

if (g_order_total_944 > 0) {

for (g_pos_948 = 0; g_pos_948 < g_order_total_944; g_pos_948++) {

OrderSelect(g_pos_948, SELECT_BY_POS, MODE_TRADES);

if (OrderSymbol() == Symbol() && OrderMagicNumber() == magic && OrderType() == OP_BUY && TimeCurrent() - OrderOpenTime() > 60.0 * timeminutes) OrderClose(OrderTicket(), OrderLots(), Bid, slippage * gd_1020);

}

}

}

void f0_16() {

g_order_total_944 = OrdersTotal();

if (g_order_total_944 > 0) {

for (g_pos_948 = 0; g_pos_948 < g_order_total_944; g_pos_948++) {

OrderSelect(g_pos_948, SELECT_BY_POS, MODE_TRADES);

if (OrderSymbol() == Symbol() && OrderMagicNumber() == magic && OrderType() == OP_SELL && TimeCurrent() - OrderOpenTime() > 60.0 * timeminutes) OrderClose(OrderTicket(), OrderLots(), Ask, slippage * gd_1020);

}

Page 26: string gs

}

}

void f0_26(int ai_0) {

RefreshRates();

double ask_4 = MarketInfo(Symbol(), MODE_ASK);

double bid_12 = MarketInfo(Symbol(), MODE_BID);

int order_total_20 = OrdersTotal();

if (order_total_20 > 0) {

for (int pos_24 = 0; pos_24 < order_total_20; pos_24++) {

OrderSelect(pos_24, SELECT_BY_POS, MODE_TRADES);

if (OrderType() <= OP_SELL && OrderSymbol() == Symbol() && OrderMagicNumber() == magic) {

if (OrderType() == OP_BUY) {

if (OrderStopLoss() == 0.0) {

OrderModify(OrderTicket(), OrderOpenPrice(), NormalizeDouble(ask_4 - ai_0 * gd_1012, g_digits_1028), OrderTakeProfit(), 0, Red);

return;

}

}

}

}

}

}

void f0_11(int ai_0) {

RefreshRates();

double ask_4 = MarketInfo(Symbol(), MODE_ASK);

Page 27: string gs

double bid_12 = MarketInfo(Symbol(), MODE_BID);

int order_total_20 = OrdersTotal();

if (order_total_20 > 0) {

for (int pos_24 = 0; pos_24 < order_total_20; pos_24++) {

OrderSelect(pos_24, SELECT_BY_POS, MODE_TRADES);

if (OrderType() <= OP_SELL && OrderSymbol() == Symbol() && OrderMagicNumber() == magic) {

if (OrderType() == OP_SELL) {

if (OrderStopLoss() == 0.0) {

OrderModify(OrderTicket(), OrderOpenPrice(), NormalizeDouble(bid_12 + ai_0 * gd_1012, g_digits_1028), OrderTakeProfit(), 0, Red);

return;

}

}

}

}

}

}

void f0_2(int ai_0) {

RefreshRates();

double ask_4 = MarketInfo(Symbol(), MODE_ASK);

double bid_12 = MarketInfo(Symbol(), MODE_BID);

int order_total_20 = OrdersTotal();

if (order_total_20 > 0) {

for (int pos_24 = 0; pos_24 < order_total_20; pos_24++) {

OrderSelect(pos_24, SELECT_BY_POS, MODE_TRADES);

if (OrderType() <= OP_SELL && OrderSymbol() == Symbol() && OrderMagicNumber() == magic) {

Page 28: string gs

if (OrderType() == OP_BUY) {

if (OrderTakeProfit() == 0.0) {

OrderModify(OrderTicket(), OrderOpenPrice(), OrderStopLoss(), NormalizeDouble(ask_4 + ai_0 * gd_1012, g_digits_1028), 0, Red);

return;

}

}

}

}

}

}

void f0_24(int ai_0) {

RefreshRates();

double ask_4 = MarketInfo(Symbol(), MODE_ASK);

double bid_12 = MarketInfo(Symbol(), MODE_BID);

int order_total_20 = OrdersTotal();

if (order_total_20 > 0) {

for (int pos_24 = 0; pos_24 < order_total_20; pos_24++) {

OrderSelect(pos_24, SELECT_BY_POS, MODE_TRADES);

if (OrderType() <= OP_SELL && OrderSymbol() == Symbol() && OrderMagicNumber() == magic) {

if (OrderType() == OP_SELL) {

if (OrderTakeProfit() == 0.0) {

OrderModify(OrderTicket(), OrderOpenPrice(), OrderStopLoss(), NormalizeDouble(bid_12 - ai_0 * gd_1012, g_digits_1028), 0, Red);

return;

}

}

Page 29: string gs

}

}

}

}