MACD Twister
- Asesores Expertos
- Vo Mai Chi
- Versión: 1.0
The trading strategy bases on MACD signal and confluence of trends on multiple time frames. It supports martingale, smart trade and many options so that you can setup their own trading strategy from the basic one. Look for new idea, improve trading performance by yourself without limitation.
Outstanding Features
- Martingale trading: turn on/off martingale strategy. When you find out a parameter set which has a small value of maximum continuous loss, you can consider to turn on martingale mode to expert more return.
- Smart trading: trade in mind (virtual trade) to wait for a big loss(a threshold value) before enter actual trades, stop actual trading when total profit reaches a certain value(a threshold value).
- One direction trading: set EA to trade only on Short or Long. When you think current trend is up you can set EA only to enter Long positions and vice versa.
- Flexible on entry judgment: we can twist the way EA detect and decide a Long/Short entry.
- Parameterized multiple time frames: we can adjust number of time frames on which confluence of trends are determined.
Parameters
- LOT_SIZE: basic lot size for each trade. In martingale mode, volume can be changed.
- TRADE_FILTER: if you want EA to trade only on Short, choose TRADE_FILTER_SELL. If you want EA to trade only on Long, choose TRADE_FILTER_BUY.
- FAST_PERIOD: fast EMA period for MACD signal.
- LONG_PERIOD: slow EMA period for MACD signal.
- SIGNAL_PERIOD: signal line period for MACD signal.
- STOP_POINT: distance from open price to take profit (in point).
- SLTP_RATIO: ratio between stop loss distance and take profit distance(STOP_POINT)
- SLTP_DIFF: this value is used to calculate stop loss point. SL = STOP_POINT*SLTP_DIFF + SLTP_DIFF
- VOLUME_ADJUSTMENT: VOLUME_ADJ_DISABLE => turn of martingale trade; VOLUME_ADJ_COMB => turn on martingale trade (continuous loss trades is counted on both Short and Long); VOLUME_ADJ_SEP => turn on martingale trade(make Long and Short separately).
- VOLUME_ADJ_START_POINT: minimum number of continuous loss trades to trigger martingale trade.
- MAX_CONS_LOSS: maximum number of continuous loss trades to stop martingale trade.
- TIME_FRAME_CONFIRM_COUNT: number of time frames on which we determine confluence of trends. Valid values are 0, 1, 2, 3, 4, 5. 0 means we skip trend confirmation on time frames.
- PAUSE_ON_PROFIT: turn on/off smart trade. When accumulated profit exceeds a threshold value(<MAX_PROFIT_THRESHOLD>) EA will stop place new actual trade. It just trades in memory instead of actually trades and wait for a big loss happens (accumulated loss exceed <MIN_LOSS_THRESHOLD>) before resuming actual trades.
On each time frame, we have a group of parameters to check trend confirmation, these are parameters for first time frame (on other time frames we have similar parameter groups):
- TF1_PERIOD_START: the start value for period in MA calculation.
- TF1_PERIOD_STEP: difference value of <period> in MA lines.
- TF1_MA_COUNT: number of MA lines those involve to trend confirmation.
- TF1_MIN_CONFIRM_RATE: there will be <TF1_MA_COUNT> - 1 couple of MA lines therefore there are maximum <TF1_MA_COUNT> - 1 confirmations for trend. The number of confirmation rate for a trend must exceed <TF1_MIN_CONFIRM_RATE>
- TF1_MIN_CON_CONFIRM: trend confirmation will be checked from the first position of candlestick backward to position <TF1_MIN_CON_CONFIRM>.
- SIGNAL_CONFIRM_TYPE_TF1: to make a final decision when combining between MACD and trend signal. There are two options( SAME_DIRECTION, NOT_REVERSE). In the case of <SAME_DIRECTION>, to make a Buy position, both MACD and trend signal must be Buy signal. In case of <NOT_REVERSE>, the condition is loosen: if MACD gives Buy signal and current trend is not down trend then make a Buy position.
For ex: TF1_PERIOD_START = 10, TF1_PERIOD_STEP = 5, TF1_MA_COUNT = 5, TF1_MIN_CONFIRM = 3, TF1_MIN_CON_CONFIRM = 2.
There will be 5 MA lines: MA(10), MA(15), MA(20), MA(25), MA(30) and trend confirmation will be check from candlestick at position 1 to 2 because
TF1_MIN_CON_CONFIRM = 2.
At each position, there are 4 uptrend confirmation checking MA(10) > MA(15); MA(15) > MA(20); MA(20) > MA(25); MA(25) > MA(30). If we have at least 3 confirmation for up trend, EA will judge it is up trend.
Good job.