Exp TickSniper DEMO
本 EA 捕捉货币对的快速价格走势，并与走势同向开仓。
功能上与 MetaTrader 4 版本相同。它包括止损, 止盈和一个 平均系统。
注: 演示版没有可调整的参数。Lot = 0.01, 所有其它的参数按照省缺设置。它仅可以交易一个货币对 - EURUSD。
此 EA 也不适于在策略测试中测试！出于一些技术原因，它必须运行在实时环境。
本系统基于 MetaTrader 4 - MetaTrader 5 接收报价的速度。本系统自动判断下单价位，接收报价的速度和距离用于加仓和盈利的移动止损。
- OnlyModify - 该功能允许 EA 工作在持仓跟踪模式，不会开新单。
- Timeope - 毫秒间隔，用于 EA 检查信号。数值越大，则产生更多的信号，品质也越低。
- DistanceTickSpred - 在 Timeope 时间内，价格变化的差值，用于 EA 生成信号。
- TakeProfitTickSpred - 当前货币对的所有仓位放置共同止盈位的差值。
- DistanceAverageSpred - 当前货币对，相对于主仓位的加仓位差值。
- TrailingStopaTickSpred - 当前货币对的持仓盈利移动止损差值。一旦持仓的盈利大于或等于 TrailingStopaTickSpred (点数单位), 系统开始移动止损。在那时刻，止盈位清零。
- LotsMartin - 根据马丁格尔原理的加仓手数。
Lots (0.01 .........) - 设置所有交易为固定手数。
DynamicLot (true - false), LotBalancePcnt (可用保证金的百分比)。
这些参数用于调整自动计算和设定手数，取决于可用保证金的大小。您可以在文章 Autolot (在当前余额基础上计算手数) 里找到更多信息。
OpenHour (小时单位), OpenMinute (分钟单位), CloseHour (小时单位), CloseMinute (分钟单位)。
这些参数用于调整 EA 操作的时间范围。这个范围仅影响开新单。移动止损和盈亏平衡功能的运作，与此范围无关。
例如, 您希望 EA 仅在 2 p.m. 至 6.35 p.m 之间交易。则参数看起来像是:
OpenHour= 14, OpenMinute=0, CloseHour=18, CloseMinute =35。
交易将会在 14:00 至 18:35 期间执行; 其余时间所有策略产生的信号将被忽略。
StopLoss (0...) 点数单位。
这个参数是每笔持仓的止损。它是指定亏损点数值。一旦到达, 持仓将被服务器平仓。0 - 参数禁用; 并且止损等于 0。
此参数设置应不小于服务器允许的最小数值。否则 EA 将显示错误代码 130。
- Improved the operation of the Set_StopLoss_to_the_next_profitable_position_level
- Improved the operation of the Averager
- Added the SecondsToRefresh parameter to the EAPADPRO block - refresh rate of the information on the chart (default is 10 seconds). This is done to reduce the CPU load.
- Added the Set_StopLoss_to_the_next_profitable_position_level option. When enabled, this option monitors the open positions and transfers the stop loss to the next profitable levels. If the EA opens a BUY order, but the price moves against the position, 3 averaging positions are opened at the lower levels. Then, the price moves in the direction, but does not yet touch the middle line to activate the trailing stop. And if the price passes the opening level of lower position 2, the new option activates transferring the stop loss of the lowest position to the breakeven level. And if the price passes the level of the lower position 3, then the stop loss of the first position will be equal to the opening level of the position 2. And the stop loss of the position 2 = opening price of this position, and so on. If the price touches and goes down, the 2 positions will achieve breakeven and profit. Then the EA opens the averaging positions according to the algorithm again. But 2 profitable deals will be fixed.
- Fixed the breakeven error that occurred in accounts where the stop level = 0.
- Added the automatic spread level function. On accounts with commission, the EA may set too small levels due to the small spread. At the same time, the "Low" message will be displayed in the EAPADPRO dashboard. This function protects from using the EA on a small spread and allows to neutralize the difference between "normal trading" and trading on the accounts with the "small spread".
- Added support for the deposit currencies for the Autolot function, which are different from EUR USD RUB
- Added the RiskRate parameter - the exchange rate of your currency against the USD. The default RiskRate = 0 means that the EA will attempt to find the correct exchange rate in the "Market Watch". For the autolot to work adequately with all currency pair, it is necessary to "Show all" currency pairs in the "Market Watch".
Global update 2017
- Improved the signal detection system. Fully revised the algorithm for obtaining signals.
- Fully revised the function for determining the average spread. Changed the default value of the TimeToCheckAverageSpread parameter to 80000 (80 seconds) for determining the average spread
Note: During the first TimeToCheckAverageSpread/1000 seconds the EA does not trade, but collects information!
This done to average the floating spread of your broker and to avoid false signals during significant fluctuations in the spread values.
This option is disabled for fixed spreads.
- The DistanceMANUAL parameter has been renamed to AverageDistanceMANUAL;
- Updated the calculation of averaging and the MaxOrders parameter for hedging accounts.
- Algorithm for signal calculations will be disabled when the trading time (Time Traiding) is disabled in order to increase the testing speed of the EA.
- Modified the TrailingStep parameter. If TrailingStep =0, the TrailingStep = TrailingStop.
This means that the trailing stop modification step will be equal to the trailing stop level in spreads.
- Removed timer from the EA code, due to the unstable operation of the timer.
- When using trading by time, the calculation of the signals logic is stopped at non-trading time in order to increase the algorithm operation speed.
- Added the ReverseSignal parameter - reverses the strategy signals when enabled.
Note: When enabled, the МА filter is also reversed
- Added the Magic parameter (Other Settings block) - default values is -1 (for maintaining old positions without magic). If there are no existing positions, you may use a unique magic number.
- Added the CloseByMa parameter - when this parameter and the MA filter are used, the positions opened not based on the MA trend will be close
Note: if the position has averaging positions open, those positions will not be closed.
- Added support for rouble accounts for calculation of the automatic lot in DynamicLot
- Added parameter to manually set the distance for the TimeOpen signal:
DistanceTickMANUAL - set the signal distance in points.
DistanceTickMANUAL has a higher priority than DistanceTickSpred
- Added the EAPADPRO information panel
Details on the panel in our blog: https://www.mql5.com/ru/blogs/post/687140
Moved the technical information on the strategy to the Strategy block. Its details are not disclosed. This block helps in studying the market and subsequent signals
Added support for the EA operation on the Brazilian market.
Added automated calculation of commission and swap in the Trailing Stop and Breakeven functions.
Now Trailing Stop will only trigger when the position covers charged commission.
Improved the operation of trailing stop and stop loss modification.
Added parameter SaveTPafterTrailingStop - save the take profit when modifying the trailing stop
Version 16.998 - 2016.04.05
Fixed the error of determining the spread Min Max
Version 16.997 - 2016.03.28
Added the step parameter for the trailing stop - TrailingStep
Added the Rounding parameter:
Without rounding - place stop orders without rounding
To 1 digit - rounding to 1 digit. For example, if Stoploss= 1.23456, the trade will be opened with a stop loss of 1.23450
To 2 digits - rounding by 2 digits. For example, if Stoploss= 1.23456, the trade will be opened with a stop loss of 1.23400
Version 16.996 - 2016.02.19
Added the parameters:
MaxSpreadToNotTrade - maximum allowed spread. When exceeded trading is disabled
MinSpreadToNotTrade - minimum allowed spread. When exceeded trading is disabled
AveragingbyFilterMA - place an averaging order, only if the MA filter shows the same direction as the trade direction
(If the EA needs to open an averaging order and the MA is above the buy price, the averaging order is not opened).
Added the Autolot selection mode.
TypeAutolot= 1 Autolot is calculated based on the current balance
TypeAutolot= 2 Autolot is calculated based on the current free margin
Version 16.992 - 2015.12.23
Added automatic detection of the order filling type.
Version 16.991 - 2015.12.17
Set the default to MaxOrders = 5. The maximum number of averagings for the position = 5.
Version 16.979 - 2015.11.23
New parameter Slippage - slippage in points during trade opening. If a server returns a requote on a signal, the trade will be skipped.
New parameter CloseAllTradesbyOutofTime - all trades positions will be closed at the end of the trading time with Times options used.
Version 16.804 - 2015.08.05
ShowInfo=true - show an information block on the chart
Added a trend filter.
Algorithm for determining a trend - location of MA relative to the price.
The MA period parameter is included in PeriodFilterMa settings.
MA is determined by TF = M1
This fill policy means that an order can be executed only with the specified volume. If the required volume for a given financial instrument is currently unavailable in the market, the order will not be executed. The required volume can be filled using several offers currently available in the market.
This means that a trade will be executed with the maximum volume available in the market within the value indicated in the order. In case entire order volume is not available in the market at the moment, a partial fulfillment is possible, but any portion that cannot be filled immediately is canceled.
This fill policy is used for market, Limit and Stop Limit orders and only in the Market Execution and Exchange Execution modes. In case of partial filling a market or Limit order with remaining volume is not canceled but processed further.
When a Stop Limit order triggers, a relevant Limit order will be placed with the Return fill policy.
MinTimebeforenextAverage = 5; // Min Time in minutes for next step for averaging
The minimum number of minutes until the next opening of an Averaging order! Useful for large candlesticks. Thus, we set a limit for the next order opening in minutes.
Modification of the Stop Loss at a new spread every specified amount of seconds.
This allows you to modify the Stop Loss for a new spread.
The value of at least 10 seconds is recommended, so that you are not banned by your broker for frequent stop loss midifications.
If 0, the option is disabled.
This modification is disabled when your position reaches breakeven.
Added new averaging parameters:
DistanceAverageSpred_Koef = Koef to next step for averaging
- set spread increase/decrease ratio for trade averaging from the initial DistanceAverageSpred value.
DistanceAverageSpred_Koef = 2, DistanceAverageSpred = 50: the first averaging trade is performed at the distance of 50 current spreads. The second one is performed at the distance of 100 current spreads!
DistanceAverageSpred_Diferent = steps for averaging separated by commas
- set averaging values in spreads separated by comma.
"10,20,50,50,20,10" means that the first averaging trade is performed at the distance of 10 current spreads, the second one - 20 spreads, the third one - 50, etc.
If three values of "10,20,30" are specified, all trade distances after the third trade are equal to 30.
Added open parameters for manual setting:
TakeProfitMANUAL = TakeProfit 0 - Autoset
DistanceMANUAL = Distance of Averaging 0 - Autoset
TrailingStopaMANUAL = Distance TrallingStop 0 - Autoset
StopLossMANUAL = StopLoss 0 - Autoset
LevelWLossMANUAL and LevelProfitMANUAL
If you want to set fixed values, for example, for a stop loss, you may set StopLossMANUAL = 1 000 points.
Or if you want to set fixed values of the averaging distance, you may set DistanceMANUAL = 100 points.
Significantly increased the speed of the EA testing in the strategy tester.
Fixed too long stop loss received during a too high spread leap (if the spread is increased 10 times, the stop loss is too big).
Fixes reported bugs.
Added the info panel to the chart the EA is launched at.
Displayed signal volume and power.
- Forced Modification of SL\TP in Market Trade
- Comments To Open Orders
- Use trade sounds
Fixed errors reported by users.
Added forced attempt of Stop Loss modification when opening a deal.
Fixed variable "Maximum number of orders for averaging".
In case of any error from the server, a comment is added in the Log.
- Maximum number of orders during averaging.
- Stop loss of every next deal is calculated on the basis of the open price of the last order instead of the current price.
- Signals and variables of arrays containing signals are reset on start and every new day.
- Signals are now detect only at non-rollback movements in the same direction.
- PercentDDMAX - maximum drawdown of account equity at which the EA will start skipping signals for new trades.
- NoNewPosition_below_MarginLevel - minimum margin in percentage at which the EA can make trades. If the margin falls below this value, the EA will skip new signals.
- SecondsSleepEaAfterClose - sleep period in seconds. For the specified time after the last deal the EA will skip new signals.
Once a position becomes profitable, its stop loss is moved to breakeven.
The last deal and the timeframe are considered for averaging. Only one averaging can be used on 1 bar.
If a position is closed with a loss, it will start with initial lot.
- SpreadToNotTrade - spread limit. If the spread exceeds this value, new deals won't be opened. 0 means the option is disabled.
- PercentDDMAX - maximum drawdown by all symbols of the current account. If this value is reached, new deals will not be opened using signals. An exception is averaging deals.
- StoplossTickSpred - number of spreads for the stop loss.
When using initial trailing stop and a set of signals for modifying the stop loss, the initial stop loss is reset and the TrailingStop function starts working instead.
To decrease the number of requests sent to the server, the parameters accept the current spread value only when the main deal is performed.
The EA is best suited for working at VPS server.