- The code works fine on a single currency symbol I am utilizing currency symbols. . .hence want this EA to support several charts, can this attribute be added by someone to the below code?

- An input like All Trades = True/False

- Is this possible??


Inserted Code // ------------------------------------------------------------------ //| FPA=BreakEven.mq4 | //| Copyright 2013, Forex Peace Army | //| http://www.forexpeacearmy.com | // ------------------------------------------------------------------ #property copyright Copyright 2013 © Peter @ Forex Peace Army #property link http://www.forexpeacearmy.com extern double Break_Even_Trigger_in_Pips = 10.0; extern double Break_Even_in_Pips = 1.0; series label_font_type = Calibri; int error_font_size = 12; color error_message_color = OrangeRed; double pip_value = 0.0; int pip_digits = 0; double stop_level_in_pips = 0.0; bool error_state = false; double equality_tolerance = 0.0; series error_message_name = BreakEven - Error Message; series error_title__input_parameters = FPA=BreakEven has only confused 8(; series error__title_order_modify = FPA=BreakEven: difficulty whilst changing order; series error__be_par_reserved = BE trigger is closer than BE itself.; series error__be_par_are_too_close = May \'t put stop level so near market price.; #define CORNER_UPPERLEFT 0 #define CORNER_UPPERRIGHT 1 #define CORNER_LOWERLEFT two #define CORNER_LOWERRIGHT 3 // -- test order parameters -- string test_time_strs#91;#93; = 2014.01.02 00:15, 2014.01.02 04:12 ; int test_orders#91;#93; = OP_SELL, OP_SELL ; double test_lots#91;#93; = 0.1, 0.1 ; bool test_placed#91;#93;; datetime test_times#91;#93;; // ------------------------------------------------------------------ // - Builtins: init(), deinit(), start() ---------------------------- // ------------------------------------------------------------------ int init() pip_value = MathPow(10.0, MathFloor(MathLog(Bid / 2.0) / MathLog(10.0)) - 3); pip_digits = MathRound(MathLog(pip_value / Stage ) / MathLog(10.0)); stop_level_in_pips = NormalizeDouble(MarketInfo(Symbol(), MODE_STOPLEVEL) * Point / pip_value, pip_digits); equality_tolerance = Point / 2.0; validate_external_parameters(); initialize_test_scenario(); return(0); // ------------------------------------------------------------------ int deinit() make_sure_error_message_hidden(); return(0); // ------------------------------------------------------------------ int start() do_test_scenario_activities(); check_trade_levels_to_set_be(); return(0); // ------------------------------------------------------------------ // - Particular modules ----------------------------------------------- // ------------------------------------------------------------------ void validate_external_parameters() error_state = false; if (Break_Even_Trigger_in_Pips lt; Break_Even_in_Pips) write_error_message(error_title__input_parameters, error__be_par_reserved); error_state = true; return; else if (Break_Even_Trigger_in_Pips - stop_level_in_pips lt; Break_Even_in_Pips) write_error_message(error_title__input_parameters, error__be_par_are_too_close); error_state = true; return; error_state = false; // ------------------------------------------------------------------ void check_trade_levels_to_set_be() // ------------------------------------------------------------------ bool order_is_in_be_or_further() if (OrderType() == OP_BUY) yield (OrderStopLoss() - OrderOpenPrice() gt; Break_Even_in_Pips * pip_value - equality_tolerance); if (OrderType() == OP_SELL) return((OrderStopLoss() ! ) = 0.0) (OrderOpenPrice() - OrderStopLoss() gt; Break_Even_in_Pips * pip_value - equality_tolerance)); return(true); // ------------------------------------------------------------------ bool order_is_triggered_by_be() if (OrderType() == OP_BUY) yield (Bid - OrderOpenPrice() gt; Break_Even_Trigger_in_Pips * pip_value - equality_tolerance); if (OrderType() == OP_SELL) yield (OrderOpenPrice() - Ask gt; Break_Even_Trigger_in_Pips * pip_value - equality_tolerance); return(false); // ------------------------------------------------------------------ void set_break_even() TIME_SECONDS) get_error_message(GetLastError())); // ------------------------------------------------------------------ void make_sure_error_message_hidden() object_hide(error_message_name 1); object_hide(error_message_name 2); // ------------------------------------------------------------------ void write_error_message(string name, string message) refresh_chart_label(error_message_name 1, name, error_message_color, label_font_type, error_font_size, 0, CORNER_LOWERLEFT, 12, 36); refresh_chart_label(error_message_name 2, message, error_message_color, label_font_type, error_font_size, 0, CORNER_LOWERLEFT, 12, 18); // ------------------------------------------------------------------ // - Test functions ------------------------------------------------- // ------------------------------------------------------------------ void initialize_test_scenario() ArrayResize(test_placed, ArraySize(test_time_strs)); ArrayResize(test_times, ArraySize(test_time_strs)); for(int I = 0; I lt; ArraySize(test_time_strs); I ) test_placed#91;I#93; = false; test_times#91;I#93; = StrToTime(test_time_strs#91;I#93;-RRB-; // ------------------------------------------------------------------ void do_test_scenario_activities() { if (IsTesting()) { for(int I = 0; t lt; ArraySize(test_times); I ) if (! Test_placed#91;I#93;-RRB- if ((Time#91;0#93; gt;= test_times#91;I#93;-RRB- (Time#91;1#93; lt; test_times#91;I#93;-RRB-) if (test_orders#91;I#93; == OP_BUY) OrderSend(Symbol(), OP_BUY, test_lots#91;I#93;, Ask, 7, 0.0, 0.0); if (test_orders#91;I#93; == OP_SELL) OrderSend(Symbol(), OP_SELL, test_lots#91;I#93;, Bid, 7, 0.0, 0.0); test_placed#91;I#93; = true; for(I = 0; t lt; 500000; I ) {} } } // ------------------------------------------------------------------ // - Library functions ---------------------------------------------- // ------------------------------------------------------------------ void refresh_chart_label(series label_name, series label_text, int clr, series font, int dimension, int window, int corner, int distance_x, int distance_y) if (ObjectFind(label_name) == -1) ObjectCreate(label_name, OBJ_LABEL, 0, 0, 0); ObjectSetText(label_name, label_text, size, font, clr); ObjectSet(label_name, OBJPROP_CORNER, corner); ObjectSet(label_name, OBJPROP_XDISTANCE, distance_x); ObjectSet(label_name, OBJPROP_YDISTANCE, distance_y); // ------------------------------------------------------------------ void object_hide(series object_name) if (ObjectFind(object_name) ! ) = -1) ObjectDelete(object_name); // ------------------------------------------------------------------ series get_error_message(int error_code) { change (error_code) { case 0: return(Server: No mistake returned (0)); case 1: return(Server: No mistake returned, but the outcome is unknown (1)); case 2: return(Server: Frequent mistake (2)); case 3: return(Server: Invalid trade parameters (3)); case 4: return(Server: Trade server is active (4)); case 5: return(Server: Old version of the customer terminal (5)); case 6: return(Server: No connection with trade server (6)); case 7: return(Server: Not enough rights (7)); case 8: return(Server: Too frequent asks (8)); case 9: return(Server: Malfunctional trade operation (9)); case 64: return(Server: Account disabled (64)); case 65: return(Server: Invalid account (65)); case 128: return(Server: Trade timeout (128)); case 129: return(Server: Invalid price (129)); case 130: return(Server: Invalid stops (130)); case 131: return(Server: Invalid trade quantity (131)); situation 132: yield (Listing: Market is shut (132)); case 133: return(Server: Trade is disabled (133)); case 134: return(Server: Not enough money (134)); case 135: return(Server: Price altered (135)); situation 136: yield (Server: Off quotes (136)); situation 137: yield (Listing: Broker is active (137)); situation 138: yield (Listing: Requote (138)); situation 139: return(Server: Order is secured (139)); case 140: return(Server: Long positions just allowed (140)); case 141: return(Server: Too many requests (141)); situation 145: yield (Server: Modifiion denied since Order too near market (145)); case 146: return(Server: Trade context is busy (146)); case 147: return(Server: Expirations are denied by broker (147)); case 148: return(Server: The amount of open and pending orders has reached the limit determined by the broker (148)); case 4000: return(Runtime: No error (4000)); case 4001: return(Runtime: Wrong function pointer (4001)); case 4002: return(Runtime: Array index is out of range (4002)); case 4003: return(Runtime: No memory for function call stack (4003)); case 4004: return(Runtime: Recursive stack overflow (4004)); case 4005: return(Runtime: Not enough stack for parameter (4005)); case 4006: return(Runtime: No memory for parameter string (4006)); case 4007: return(Runtime: No memory for temp string (4007)); case 4008: return(Runtime: Not initialized series (4008)); case 4009: return(Runtime: Not initialized string in array (4009)); case 4010: return(Runtime: No memory for array string (4010)); case 4011: return(Runtime: Too long string (4011)); case 4012: return(Runtime: Remainder from zero divide (4012)); case 4013: return(Runtime: Zero split (4013)); case 4014: return(Runtime: Unknown command (4014)); case 4015: return(Runtime: Wrong jump (never generated error (4015)); case 4016: return(Runtime: Not initialized array (4016)); case 4017: return(Runtime: DLL calls are not permitted (4017)); case 4018: return(Runtime: Cannot load library (4018)); case 4019: return(Runtime: Cannot call function (4019)); case 4020: return(Runtime: Expert function calls are not permitted (4020)); case 4021: return(Runtime: Not enough memory for temp string returned from function (4021)); case 4022: return(Runtime: System is busy (never generated error (4022)); case 4050: return(Runtime: Invalid function parameters count (4050)); case 4051: return(Runtime: Invalid function parameter value (4051)); case 4052: return(Runtime: String function internal error (4052)); case 4053: return(Runtime: Some array error (4053)); case 4054: return(Runtime: Incorrect series array using (4054)); case 4055: return(Runtime: Custom indior mistake (4055)); case 4056: return(Runtime: Arrays are incompatible (4056)); case 4057: return(Runtime: Global variables processing error (4057)); case 4058: return(Runtime: Global variable not found (4058)); case 4059: return(Runtime: Function is not allowed in testing mode (4059)); case 4060: return(Runtime: Function is not supported (4060)); case 4061: return(Runtime: Send mail error (4061)); case 4062: return(Runtime: String parameter anticipated (4062)); case 4063: return(Runtime: Integer parameter anticipated (4063)); case 4064: return(Runtime: Double parameter anticipated (4064)); case 4065: return(Runtime: Array as parameter anticipated (4065)); case 4066: return(Runtime: Requested history data in updating state (4066)); case 4067: return(Runtime: Some error in trading function (4067)); case 4099: return(Runtime: End of file (4099)); case 4100: return(Runtime: Some file error (4100)); case 4101: return(Runtime: Wrong file name (4101)); case 4102: return(Runtime: Too many opened files (4102)); case 4103: return(Runtime: Cannot open file (4103)); case 4104: return(Runtime: Incompatible access to a file (4104)); case 4105: return(Runtime: No order selected (4105)); case 4106: return(Runtime: Unknown symbol (4106)); case 4107: return(Runtime: Invalid price (4107)); case 4108: return(Runtime: Invalid ticket (4108)); case 4109: return(Runtime: Trade is not permitted. Enable checkbox \Permit live trading\ in the expert properties (4109)); situation 4110: yield (Runtime: Longs are not permitted. Check the expert properties (4110)); situation 4111: yield (Runtime: Shorts are not permitted. Check the expert properties (4111)); case 4200: yield (Runtime: Object exists already (4200)); situation 4201: yield (Runtime: Unknown object property (4201)); situation 4202: yield (Runtime: Object doesn't exist (4202)); situation 4203: yield (Runtime: Unknown object type (4203)); situation 4204: yield (Runtime: Regardless of name (4204)); situation 4205: yield (Runtime: Object coordinates error (4205)); situation 4206: yield (Runtime: No given subwindow (4206)); situation 4207: yield (Runtime: Some mistake in object function (4207)); default: return(Unknown error code: error_code); } } // ------------------------------------------------------------------