BidAskTickVol_5 opens trades using only tick volume information. Large
differences between bid and ask volumes might signal possible changes
in market balance. The strategy executes on every tick (onTick event)
and uses tick volume information to open trade.
Sell when ask volume is higher and buy when bid volume is higher than
ask volume 16.5 times (parameter: vol_factor). Minimal volume is set
to 5 mil (vol_filter) and additional filters used are minimum candle
size filter (parameter candle_filter = 0.15 pips for 10M candle) and
STDDEV filter to avoid entering the market on flats. Parameter
min_stddev_filter is 4.9 (the value is calculated by STDDEV/pip_size),
similarly max_stddev_filter is set to 70 to limit the maximum
volatility.
The trade will be skipped when the spread (parameter: spread_filter)
is larger than 2 pips.
Trading amount is 22% (defaultRisk) from Equity*Leverage (Weekend
Leverage is used on Fridays).
After the trade is closed (OnTrade event) with loss, the variable
unsuccessful_trades will be incremented.
Every consecutive unsuccessful trade will decrease the trading amount
= amount/(unsuccessful_trades+1). First profitable trade will reset
unsuccessful_trades to 0.
TP is 18 and SL is 92 pips.
It also has system that triggers trade only when price is moving in
the right direction after conditions are met, it is controlled by two
parameters: distance - (2 pips) and trade_window - (5 secs). This
means if the difference between last and previous tick is against the
signal (the price is going up on sell signal) then delay opening the
trade for trade_window seconds until the price goes 2 pips (parameter:
dist) in desired direction.
Parameter expiration_time controls time in seconds after how long
unclosed trade should be forced to close, by default it is set to 0
(trades don't expire).
Parameters from_hour and to_hour can be used to limit trading hours,
they are set to 0 and 24 by default (trade on all hours).
Parameter weekday_filter can be used to skip trading on specified day
of the week, by default it is set to 0 (disabled), 1 means Sunday, 2 -
Monday and so on.
Following parameters were meant only for testing and since they don't
work they are disabled and not used in trading logic: ema filter
(parameter ema_period = 0), partial_close (false), and trailing_start
(0). Parameter npos controls how many positions can be opened (for
testing purposes), for contest only 1 position is allowed.