Job finished
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Specification
![](https://c.mql5.com/21/291/5581282548444.png)
Expert Advisor based on the signal of Halftrend TT (x5x4) Source indy
- If Halftrend TT indicator gives a buy signal , the expert enters a trade on the direction of the signal (Long trade )
Then the expert keeps opening long positions after each candle close, until the maximum number of positions is reached, or the take profit is reached, or if there is an opposite signal (sell )from the half trend indy. When this happens, all the long positions are closed, and a new short position is opened.
- If Halftrend TT indicator gives a sell signal , the expert enters a trade on the direction of the signal (short trade )
Then the expert keeps opening short positions after each candle close , until the maximum number of positions is reached, or the take profit is reached or there is an opposite signal (buy) from the haftrend indy. When this happens , all the short positions are closed, and a new long position is opened.
Specification 1 : Since when we put the expert advisor to work on a chart there is already a buy or sell signal from the haftrend indy , there must be an option on the expert to wait for a fresh signal , or open a position according to the existing signal .
Specification 2: After a new position is opened according to the half trend indicator , there must be an option to enter additional trades only when new candles are opposite to the initial position.
For example, half trend indicator turns bullish and the expert enters one long position. Then the expert adds up to this position only on red candles and not on every candle.
Specification 3: Please note that the expert must be able to trade regular candles, renko bars, and range bars. Renko bars and range bars are on Offline charts. For renko bars we use the expert “Renko live chart V3.4” and for range bars we use the expert “Range bars expert advisor mnc minor” which can be provided upon request.
Expert Variables:
Maximum number of positions:
Lot Size:
Stop Loss on total positions: Example 1000 USD.
Take profit on total positions: Example 1000 USD.
Slippage: We trade mainly indices so a range of 1 to 100 points could work. For example, if i trade the US 30 index CFD then a maximum slippage of three points is acceptable. Meaning if the expert must buy at 34.000 the maximum price the expert can open the position is 34.303, which is 30 points since the tick increment in US30 index is 0.1.
New position adding :
Option 1: Every new candle
Option 2 Only on opposite candles
Expert opens trades :
Option 1: On new signal
Option 2 On existing signal
Halftrend TT indicator variables.
Trading hours : the hours must be adapted to the hours i see in my mt4 terminal