Description of ForYou expert advisor

Description of ForYou expert advisor

18 February 2019, 12:51
Thorsten Rohweder
0
143

Expert advisor EA ForYou trades EURUSD and GPUSD in Asian time trade window.

EA ForYou realizes famous Hamster strategy with extended trade window and additional pair GBPUSD.

current set files are v2.1 and valid for version v2.2 as well. You can find them on page 6 comment 113 :

https://www.mql5.com/en/market/product/32833#!tab=tab_p_comments&comment=10732354&page=6


List of parameters :


MagicS1  every expert advisor needs a magic number to identify its own positions. Magic number is a technical attribute attached to every opened position and might be empty or filled depending on your trade style (manual or automated). With EA ForYou identification is done on pair and 'magic number'. You need  2nd magic number when running M1 and M5 time frame on same pair.

Example for valid MagicNo and pair combination : EURUSD-M1-81904, EURUSD-M5-81903, GBPUSD-M1-81904, GBPUSD-M5-81903. You can  run all 4 combinations with 2 magic numbers if you like. It is not neccesary to change different Magic numbers for GBPUSD and EURUSD as long as you run only one chart per pair. As soon as you use more than chart on a pair you will need a 2nd magic number. Delivered set files are fine with magic numbers inside set files.

profile  this parameter is for information only and will be shown up in 1st line of charts panel. Sometimes parameters get lost on upgrade or handling. Make sure profile name (you are free in naming of course or leaving empty) match pair and time frame. Set files contain profiles like 'EURUSD M1' and are designed for indicated pair and time frame. A single look at terminal will ensure charts and time frames match.

comment  this value will be transported to positions 'comment' field and informational only as profile parameter. On run time written value will extended by internal information as kind of trade (buy or sell), kind of triggering signal (1 to 4) and number of order (0 to 7, how much depends on parameter maxorders). If empty internal information will not be written. Thus you can hide expert advisor or kind from broker. The only information broker will have is : you are trading automated. Wide SL and TP will hide nature of trading as well.

Lots  start balance per position in combination with parameter perbalance. If Lots is 0.01 , EA For You will open 0.01 on each perbalance of your account's blance. example : balance 1000, Lots=0.01,perbalance=200. EA ForYou will open 0.05 for every position.

perbalance  if set to value >0, see description Lots. If perbalance = 0 EA ForYou will run with position size Lots. Example: balance 1000,Lots=0.0.1,perbalance=0.  EA ForYou will open 0.01 for every position.

Note, that delivered set files are optimized in money management in combination with parameter close_percent. If you lower the resulting position size you may lower close_percent as well.

vTP  virtual Target profit per position. This value should always be set to 5. EA ForYou will use this value as basis for calculation and might close with different realized target profit. EA ForYou shows calculated accumulated vTP in panel. Values vary from 2.5 to 5 pips and might be risen to 8 or 10 pips on suitable situations. Anyway  EA ForYou wiull close below or above indicated value and does not work with fixed TP.

TP,SL techncial target profit and stop loss. EA ForYou controls positions  with open and close conditions and does not use TP and SL to hit. Brokers and market intend to touch SL and nearby TP to maximize their profits. That's why professional software hides real values. We should never touch, closing is done by other parameters.

consider_comm if set ti true, EA ForYou considers commission and restricts percentage of profit to broker with max_brokers_profit_percent.

max_brokers_profit_percent percentage of profit given to broker as a maximum. examples :  profit 10 €/$  , commission 2 €/$, max_brokers_profit_percent=20. EA will close, 8 €/$ will be realized netto profit. 2 €/$ are taken by broker.  profit 8 €/$  , commission 2 €/$, max_brokers_profit_percent=20. EA will not close yet , it needs 10 $/€ to fulfill condition.

comm_per_lot_in_backtest for baktest only. Your broker takes this value for round turn on 1 Lot. It depends on base currency of youzr account as well. For exact value see trade conditions for four broker, account type, base currency and traded pair at your brokers web page.

rsi_buy opening filter for BUY positions. position will be opened if RSI is at a low value.

rsi_sell opening filter for SELL positions. position will be opened if RSI is at a high value.

maxspread : positions are opened and closed if current spread is not higher than maxspread. On ECN accounts maxspread 15 is good for EURUSD, 20 for GBPUSD. This prevents pip stealing by broker/market in higher spread conditions during night and high volatile situations over day.

open_max_percent: if accounts overall draw down is higher than this value, EA ForYou will not oen new first positions. Note : EA forYouz will continue to trade open baskets and will open consecutive needed postions on this basket and try close. If draw down continues, no new first position will be opened then.

close_on_counter if set to true positions will be closed on counter signal under special conditions. Default is true.

rsi_sell_close, rsi_high_close RSI values for counter signal.

close_percent draw down percentage of current chart (magicno and pair identification) to close all positions in that chart. Positions of other charts are nor considered nor will be closed.

BE_order_use usage of break even mechanism. Default true. EA ForYou will try to close with BE_order_pips for each position in special situations.

BE_delay_hours a single position will be closed with break even points when market doesn't show impulses to open an other position and price doesn't reach calculated vTP. EA ForYou will try to close position after BE_delay_hours hours.  Special situation with a single position closed after BE_delay_hours is realized no matter if BE_order_is_maxorder set to true or false or what value is in BE_orders parameter.

BE_order_pips pips per position to close in special situations in usage of break even mechanism Value is lower than vTP.

BE_order_is_maxorder when true EA will use break even mechanism if  open orders is equal maxorders.

Example : maxorders=8, open orders=8. EA ForYou will ignore parameter BE_orders and initiate break even machanism in special situations.  maxorders=8, open orders=6. EA ForYou will try to get vTP calculated pips for each position.

BE_orders if BE_order_is_maxorder is false, break even mechanism will be active when open positions are greater or equal this value and BE_order_is_maxorder is false.

It is advised to initiate break even mechanism below maxorders, thus BE_order_is_maxorder is set to false, BE_orders =maxorders -1.

close_avg_SL if accumulated averaged pips (negative)  exceed close_avg_SLK value basket will be closed. Example : 6 positions, close_avg_SL=300 (positive value!). As soon as loss exceeds -300 pips (negative value !) , all positions belonging to that basket will be closed. Other positions belonging to the chart will stay open.

start_time begin of trading time window, server time

end_time end of trading time window, sever time

start_time and end_time need to be adapted on broker and summer/winter time. default values are 23 o'clock and 3 a.m. Asian trading session begins at 1.a.m int hat window and broker interrupts trading at 24.00/0.00. From 24.00/0.00  to 1 a.m. spreads increase. You will see up to 100 points on GBPUSD and 50 on EURUSD. EA ForYou will not open or close on that high values. Trades are either closed before midnight or almost contined after Asian ttrading time starts.                

                     start_time   end_time

GMT+0        21                1

GMT+1         22               2

GMT+2         23               3 (Default)

GMT+3         0                 4

GMT+4         1                 5

GMT+5         2                 6

GMT+6         3                 7

GMT+7         4                 8

GMT+8         5                 9

GMT+9         6                10

holidays if set to true EA ForYou will not start new first positions on christmas time December/January, but finish opened trades initiated before holiday time.

lastday12  last day to open first position in December. Default (December) 15th

firstday01 first day to open first position in January. Default (January) 4th

friday_logics if set to true, EA ForYou will not open new first positions after Friday friday_stop_time

friday servers weekday when market will close. If GMT offset of broker's server is very different from GMT this could be a different day. 'Friday' should be fine in most cases.

friday_stop_time server time to prevent open new first postions. All existing positions will be left open and new positions are added after that time to exiting baskets. Default 12 (noon). then panel will indicate Fridays stop (if no position is open from day before).

Backtest does not show disadvantages of trading over weekend, but a risk of unforseen global events with impact on pairs exists of course. Positions kept over weekend will suffer from added swap fees if negative swap on deal.

allow_url_in_mt4_options fixed informational value http://ec.forexprostools.com/ to enter in terminals options Tools->options->Expert advisor->Allow WebRequest for listed URL. News filter will only work with allowance for WebRequest and show up erros otherwise.


AvoidNews  Switching news filter on/off

IncludeMediumNews Include medium news to prevent start of new first trades. High news are always included if AvoidNews is set to true.

StopMinutesBeforeNews/StopMinutesAfterNews time window in minutes to prevent new first positions around news event. Panel will turn to beige in news time.

showInfo switch panel in chart on/off

color map of panel:

  • blue   : waiting
  • green : trading, in profit
  • red    : trading, in loss
  • grey   : trading is switched off by user
  • beige : news time

showButton switch activity and status buttons in chart on/off














Share it with friends: