Please help me to edit EA and thank you

I need little help please
I have EA , I need to change some setting
I don’t know how .

1 In the EA that I have, the setting is 10 pips (TP)and I want to do 50 pips(TP), everything else is fine, I just want to do 50 pips instead of 10 pips.

2 If you are aware of EA, I will send the file

Thank you all very much

1 Like

That’s too easy. Post the code to the take profit level section here. I’ll analyze it and rewrite it to include the 50 pips desired.

1 Like

/*
Generated by MetaQuotes Software Corp.
Website: http://www.metaquotes.net/

*/
#property copyright " "
#property link " "
//#property show_inputs

int gi_76 = 1;
bool gi_80 = FALSE;
bool gi_84 = TRUE;
double gd_88 = 1.2;
double g_slippage_96 = 5.0;
extern double Lots = 0.1;
double gd_112 = 2.0;
double g_pips_120 = 10.0;
double g_pips_128 = 0.0;
double gd_136 = 3.0;
double gd_144 = 3.0;
double g_pips_152 = 7.0;
extern int MaxTrades = 20;
bool gi_164 = FALSE;
double gd_168 = 20.0;
bool gi_176 = TRUE;
bool gi_180 = FALSE;
double gd_184 = 0.0;
extern bool TimeFilter = FALSE;
extern bool UseHourTrade = FALSE;
extern int StartHour = 8;
extern int EndHour = 19;
int g_magic_208 = 12324;
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;
string gs_296 = “Profit Rocket”;
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 gi_388 = 86400;

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

extern string
Indicator_Setting = “---------- Indicator Setting”;
extern int
FastMAPeriod = 5, //Fast Moving Average Period
FastMAType = 1, //0:SMA 1:EMA 2:SMMA 3:LWMA
FastMAPrice = 0, //0:Close 1:Open 2:High 3:Low 4:Median 5:Typical 6:Weighted
FastMAshift = 0, //Fast Moving Average Shift
SlowMAPeriod = 13, //Slow Moving Average Period.
SlowMAType = 1, //0:SMA 1:EMA 2:SMMA 3:LWMA
SlowMAPrice = 0, //0:Close 1:Open 2:High 3:Low 4:Median 5:Typical 6:Weighted
SlowMAshift = 0; //Slow Moving Average Shift

int deinit() {
return (0);
}

int start() {
double l_ord_lots_0;
double l_ord_lots_8;
double l_iclose_16;
double l_iclose_24;
int li_0 = 581661;
int l_acc_number_4 = li_0;
if (l_acc_number_4 != li_0) {
Alert(“You can not use this account (” + DoubleToStr(l_acc_number_4, 0) + “) with this program!”);
return (0);
}
if (UseHourTrade) {
if (!(Hour() >= StartHour && Hour() <= EndHour)) {
CloseThisSymbolAll();
Comment(“Non-Trading Hours!”);
return (0);
}
}
string ls_40 = “false”;
string ls_48 = “false”;
if (TimeFilter == FALSE || (TimeFilter && ((EndHour > StartHour && (Hour() >= StartHour && Hour() <= EndHour)) || (StartHour > EndHour && !(Hour() >= EndHour && Hour() <= StartHour))))) ls_40 = “true”;
if (TimeFilter && ((EndHour > StartHour && !(Hour() >= StartHour && Hour() <= EndHour)) || (StartHour > EndHour && (Hour() >= EndHour && Hour() <= StartHour)))) ls_48 = “true”;
if (gi_176) TrailingAlls(gd_136, gd_144, g_price_244);
if (gi_180) {
if (TimeCurrent() >= gi_308) {
CloseThisSymbolAll();
Print(“Closed All due to TimeOut”);
}
}
if (g_time_304 == Time[0]) return (0);
g_time_304 = Time[0];
double ld_56 = CalculateProfit();
if (gi_164) {
if (ld_56 < 0.0 && MathAbs(ld_56) > gd_168 / 100.0 * AccountEquityHigh()) {
CloseThisSymbolAll();
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–) {
if(OrderSelect(g_pos_324, SELECT_BY_POS, MODE_TRADES)){
if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_208) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_208) {
if (OrderType() == OP_BUY) {
gi_344 = TRUE;
gi_348 = FALSE;
l_ord_lots_0 = OrderLots();
break;
}
}
if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_208) {
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 >= g_pips_152 * Point) gi_340 = TRUE;
if (gi_348 && Bid - gd_276 >= g_pips_152 * 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_48 == “true”) {
fOrderCloseMarket(0, 1);
gd_316 = NormalizeDouble(gd_88 * l_ord_lots_8, gd_112);
} else gd_316 = fGetLots(OP_SELL);
if (gi_84 && ls_40 == “true”) {
gi_312 = gi_328;
if (gd_316 > 0.0) {
RefreshRates();
gi_352 = OpenPendingOrder(1, gd_316, Bid, g_slippage_96, Ask, 0, 0, “Profit Rocket” + “-” + gi_312, g_magic_208, 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_48 == “true”) {
fOrderCloseMarket(1, 0);
gd_316 = NormalizeDouble(gd_88 * l_ord_lots_0, gd_112);
} else gd_316 = fGetLots(OP_BUY);
if (gi_84 && ls_40 == “true”) {
gi_312 = gi_328;
if (gd_316 > 0.0) {
gi_352 = OpenPendingOrder(0, gd_316, Ask, g_slippage_96, Bid, 0, 0, “Profit Rocket” + “-” + gi_312, g_magic_208, 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_40 == “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, g_slippage_96, g_bid_252, 0, 0, “Profit Rocket” + “-” + gi_312, g_magic_208, 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, g_slippage_96, g_ask_260, 0, 0, “Profit Rocket” + “-” + gi_312, g_magic_208, 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_64 = 0;
for (g_pos_324 = OrdersTotal() - 1; g_pos_324 >= 0; g_pos_324–) {
if(OrderSelect(g_pos_324, SELECT_BY_POS, MODE_TRADES))
{
if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_208) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_208) {
if (OrderType() == OP_BUY || OrderType() == OP_SELL) {
g_price_244 += OrderOpenPrice() * OrderLots();
ld_64 += OrderLots();
}
}
}
}
if (gi_328 > 0) g_price_244 = NormalizeDouble(g_price_244 / ld_64, Digits);
if (gi_356) {
for (g_pos_324 = OrdersTotal() - 1; g_pos_324 >= 0; g_pos_324–) {
if(OrderSelect(g_pos_324, SELECT_BY_POS, MODE_TRADES))
{
if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_208) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_208) {
if (OrderType() == OP_BUY) {
g_price_212 = g_price_244 + g_pips_120 * Point;
gd_unused_228 = g_price_212;
gd_332 = g_price_244 - g_pips_128 * Point;
gi_292 = TRUE;
}
}
if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_208) {
if (OrderType() == OP_SELL) {
g_price_212 = g_price_244 - g_pips_120 * 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–) {
if(OrderSelect(g_pos_324, SELECT_BY_POS, MODE_TRADES)){
if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_208) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_208)
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() == g_magic_208) {
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 (gi_76) {
case 0:
l_lots_4 = Lots;
break;
case 1:
l_lots_4 = NormalizeDouble(Lots * MathPow(gd_88, 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() == g_magic_208) {
if (l_datetime_12 < OrderCloseTime()) {
l_datetime_12 = OrderCloseTime();
if (OrderProfit() < 0.0) l_lots_4 = NormalizeDouble(OrderLots() * gd_88, 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);
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–) {
if(OrderSelect(l_pos_4, SELECT_BY_POS, MODE_TRADES))
{
if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_208) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_208)
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–) {
if(OrderSelect(l_pos_0, SELECT_BY_POS, MODE_TRADES)){
if (OrderSymbol() == Symbol()) {
if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_208) {
if (OrderType() == OP_BUY) OrderClose(OrderTicket(), OrderLots(), Bid, g_slippage_96, Blue);
if (OrderType() == OP_SELL) OrderClose(OrderTicket(), OrderLots(), Ask, g_slippage_96, 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–) {
if(OrderSelect(g_pos_324, SELECT_BY_POS, MODE_TRADES)){
if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_208) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_208)
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() != g_magic_208) continue;
if (OrderSymbol() == Symbol() || OrderMagicNumber() == g_magic_208) {
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–) {
if(OrderSelect(l_pos_24, SELECT_BY_POS, MODE_TRADES))
{
if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_208) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_208 && 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–) {
if(OrderSelect(l_pos_24, SELECT_BY_POS, MODE_TRADES))
{
if (OrderSymbol() != Symbol() || OrderMagicNumber() != g_magic_208) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == g_magic_208 && 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() {}

A. This is a terribly coded EA. Did you use an EA generator to create this?

B. On the line “double g_pips_120 = 10.0;”. Just change it to “double g_pips_120 = 50.0;”.

C. If that option doesn’t work, change “double g_pips_120=10.0” to 50.0, and change
“double g_pips_128 = 0.0;” to “double g_pips_128 = 50.0;”.

D. These are simple solutions, but judging the code in this EA was so poorly constructed, it may need to undergo total reconstruction altogether. (In other words, recoded).

2 Likes

Is that a concern? (I don’t know, myself - that’s why I’m asking!).

Thank you so much :blush: kind your help
You’re the great :+1:

0 errors, 5 warnings ,

Who or what coded this EA? (I see multiple warnings. No EA should have warnings). Was it coded by a generator? And is your problem fixed?

1 Like

No sir, the problem has not been solved yet 1 Now I want to remove only stoploss Please help and thank you for your time

Hi @vishal1993, I have tried your code, so many errors

But from the code I can say it’s an very old code.

MQL4 is no longer advice to use extern. It’s a legacy command (But it’s handy to be used).
The variables show here

double gd_unused_228;
double gd_unused_236;

Those line can be resulted from a de-compiler or generator. I was in a forum of EA developer, so many similar code are distributed as result of de-compilation origin.

Any way your problem wont be significant. That is because you run those statements without validation. (ordermodify, orderclose)

Instead of running them

OrderModify (ticketNo, ... ,... );

You are advised to validate it after

bool res=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(Bid-Point*TrailingStop,Digits),OrderTakeProfit(),0,Blue);
if(!res)
    Print("Error in OrderModify. Error code=",GetLastError());
else
    Print("Order modified successfully.");

As simple as that …

1 Like

This video is working in the same style, this is my link. But the file attached to me is 10-12 years old If you have any such experience, you can share it with me I want to invest in forex but I don’t have time so I am looking for this EA

Hi @vishal1993, if you know how it works, I can recreate one for you. Or at least the article that have detail enough about how it works.

There are many rebound techniques, at least 500 variants of it. If you can provide the detail and it’s transparent enough … I can develop it for free :grin:
as long as it suit my time …

Thank you so much
I can let you know .

I want to make one simple EA bro.

Example : $60,000 bitcoin price
Open 1 trade at BTC60000(0.01 Lot) TAKE PROFIT 60100.
Open 2 trade at BTC59900 (0.01 lot) Take profit 60000 .
Open 3 trade at BTC59800. (0.01 lot) Take profit 59900 .
Open 4 trade at BTC59700 (0.01 lot) take profit 59800
Open 5 trade at BTC59600 ( 0.01 lot ) take profit 59700

In this way, as soon as the price goes down, open an order and set a take profit

Hi @vishal1993, don’t get me wrong :smile:. I have interest only to find other kind of quantitative trading algorithm. If there are any interesting trading idea, I’m willing to listen and develop it together.

I am done with any mechanical EA. I can’t learn anything from it.
If anyone have good concept that solve trading problem from head to tail, I will be very interested to listen, improve and develop and EA together. I have developed more than 4k EA since 2009. Only few of them survive.

Yours is also considered a mechanical system. My offers was to Rebound EA. :slight_smile:

Btw, the Rebound EA is a grid system. I have many grid system running in my premises. :innocent:

I’m new in Forex market , I don’t know how create EA ,
If you have Good EA low risk , you can share with me .
Thank you so much for your reply . You’re well educated people

Hi @vishal1993, I belive you have joined many telegram EA’s groups. They share many EA and ready to use set. That will be a good start for you.

My EAs are private property. I can’t share since it will cause problems. I had done before, in the end, I was cursed and bullied. :grin:

I only have interest to find different idea about trading, work together to develop it if possible. :slight_smile: