ObeyTheLimits EA

ObeyTheLimits (OTL) EA employs the first trading strategy depicted in the article "Order Strategies. Multi-Purpose Expert Advisor". Instead of trading with limit orders and take profits, OTL trades market. This way traders can also conceal their levels from their brokers.

Trading can start in two ways: either trader opens a trade manually using ObeyTheLimits_ManualTrade utility or OTL EA opens one with respect to the limits specifies by the trader. Then comes the price action part. If the price moves in the opposite direction, OTL opens new positions until the last position gets into profit by a predefined points. Then OTL closes all of the positions and starts over.

Backtests for this EA show that Crosses do better.

Input parameters

work_with_multiple_assets—Set it to true if you would like to run the EA for multiple symbols in one account. Also this will let you do other trades besides the EA. Otherwise you can only run one instance of the EA and not able to do other trades.

communicate_with_monitoring_indicator—Set it to true and you can monitor all OTL EA activities by the help of ObeyTheLimits_Monitor indicator.

take_limits_from_working_orders—Set it to true if you like to set limit levels from working orders. The following 3 inputs are needed if true is selected.

take_limits_from_sl_or_tp—Set it to stop_loss, and the limit level will be taken from the stop loss part of the working order. Similar is true for take_profit option.

set_sell_limit_comment (set_buy_limit_comment)—Set a string so that only the working orders with this string on the symbol is selected for sell (buy) limit extraction.

sell_limit (buy_limit)—If take_limits_from_working_orders is false then you need to supply this field.

auto_update_limits—Set it to true if you want the EA to update the limit levels automatically according to highest high or lowest low method. The number_of_past_bars is the range where EA looks for the highs and lows.

change_limits_to_stops—Set it to true if you would like the EA to change sell_limit to buy_stop and buy_limit to sell_stop.

start_lot—Size of the initial automatic position. Next amount will multiplied by lot_multiplier when adding new positions.

auto_close_open_pos—Set it to true if you would like the EA to manage open positions. Set it to false if you would like to manage closing them by yourself. The ObeyTheLimits_CloseAll utility script can be used for closing all positions.

open_new_if_price_oppose—Set a point value so that new position is opened when the price moves in the opposite direction and the difference between current quotation and the last positions price is greater than this value.

close_all_if_price_favor—Set a point value so that existing position(s) is(are) closed when the price moves in the same direction and the difference between current quotation and the last positions price is greater than this value.

close_all_when_fail_to_open_new_position—Set it to true if you would like to start over when the EA is unable to open new position in case of insufficient funds. Otherwise EA will not open a new position and wait for free margin to increase or the one or more positions are stopped out.

compansate_for_swaps—Set it true if you like the EA to compensate for negative swap accumulations on the symbol when closing the positions on that symbol for profit.

symbol_has_suffix—Some brokers modify the name of a symbol with a suffix (e.g., with a dot to indicate fix spreads, or with a "micro" suffix to indicate sub-lots). If this is the case, set it to true and then set symbol_suffix so that EA can extract the symbol properties properly.

auto_magic_number—Ea can use automatic magic number generation for the orders. The algorithm generates the same magic number for a symbol every time, so that even if you start over, the same magic number is used on that symbol. This way you can avoid malfunctioning of the EA. Sometimes there can be conflicts in magic numbers so that different symbols can get the same magic number (e.g., EURUSD and EURAUD), and these conflict can be avoided by the use of ObeyTheLimits_MagicNumber utility script.

magic_number—If the previous option is false, you need to specify a unique magic number for the symbol that the EA is running on.