Job finished
Specification
I would like to hire someone to build an MT4 indicator and an expert adviser that I intend to use to automate trading on a live account. It needs to operate efficiently and most of all accurately. I expect clearly documented clean source code as part of the deliverable. I remain the only owner of this indicator and EA after completion. I am also a programmer, but new to MQL4 so it will help to have code formatted and documented suitable for another developer to later modify should I ever become good enough to do so.
My strategy is basic and based on using a short-term HMA and long-term HMA. I typically use hma(50) and hma(15) in combination with a specific definition of a 3 bar reversal (see definition at bottom of page). I am asking for the following:
- An indicator that shows an up green or down red arrow when a 3 bar reversal closes whereby the long-term HMA and short-term HMA confirm the direction immediately or on the close of any bar according to chart time frame.
- An EA that provides all trading signals to open, close, set stops and take profit, and move the stop losses.
3 bar reversal Indicator
Inputs:
- long-term hma (default 50)
- short-term hma (default 15)
Buy signal: When bullish 3 bar reversal (3BR) closes and is confirmed by both hma signals being bullish. If both hmas are not bullish wait for the close of up to 3 more bars to get bullish confirmation. Number of bars needed for confirmation should be configurable and default to 3. The signal should be a green up arrow. On bar #2 there should be a green dot below.
Sell signal: Reverse of above. The indicator will be a red arrow pointing down on the bar that triggers an entry. There should be a red dot above bar 2 of the 3BR.
I recommend that you complete this indicator and let me test it before completing the EA.
See below for 3BR definition and examples.
3 Bar Reversal Expert Adviser
I recommend that you complete the indicator and let me test it before implementing the EA since the indicator is key to the correct operation of the EA.
When the long-term trend, as determined by the long-term hma, changes from bearish to bullish we will open only long positions. When the long-term hma is bearish we will open only short positions.
Dashboard and annotations on the chart:
Add any annotations to chart that are helpful. The dashboard should show current positions, total lots used / total lots allowed and anything you think might be useful should be added to a dashboard.
Inputs (these are just suggestions to give you an idea of what I might be looking for):
- primary entry lot size (0.02)
- secondary entry lot size (0.01)
- maximum positions -- primary entry plus secondary entries should not exceed this number of positions
- primary entry reward (2.0) -- tells take profit to be 2.0 X stop loss
- secondary entry reward (1.0) -- tells take profit to be 1.0 X stop loss
- long-term hma periods (50)
- short-term hma periods (15)
- hma applied price (close price)
- minimum stop loss (10 pips)
- use news (default true)
- show news (default true)
- show news text (default true)
- News: High impact (default true)
- News: Medium impact (default true)
- News: Low impact (default false)
- Minutes to close before news (default 10)
- Time management to close on Friday and at what time
- Time management to open new positions during major exchange hours
Long Setup:
- any time of the day, but must close positions before news events and by close of markets on Fridays
- any time frame
- any currency pair
- long-term hma bullish
Long Trigger:
- The first position opened after the long-term trend has changed is called the primary position. Each subsequent trigger in the same direction opens secondary positions.
- 3 Bar bullish Reversal with the third bar closing bullish (see attached images).
- Short-term HMA is bullish or becomes bullish on bar close within 3 bars following the 3 bar reversal
- If there are short positions then they are all closed at market price prior to opening long position
Short Setup and Trigger are the opposite of bullish.
Initial Stop Loss:
Stop Loss Adjustment:
- Long: Adjust stop to 1 pip below the low of the prior bullish 3BR (or prior swing low) as bullish 3BR's close. Must be at least 10 pips away or don't move stop loss.
- Short: inverse of above
Target:
- Primary entry: 2.0 times the distance entry is from the stop loss
- Secondary entry: 1.0 times the distance from the stop loss
Exit: At Take Profit, Stop Loss, when an entry is triggered in the opposite direction, news (optional), or Friday close
Three Bar Reversal (3BR) Definition
See the attached images of 3BR.
Long 3BR
- Bar 2 has a lower low than bar 1 and bar 3
- Bar 3 closes bullish. It doesn't have to go above or close above bar 2's close or high. It only has to close bullish.
Short 3BR is just the opposite
Here is a video where I try to explain the indicator and the EA. I expect the indicator to show something like up green arrows for buys and downward pointing red arrows for sells and green dotted lines for take profits and red dotted lines for stop losses.
https://www.dropbox.com/s/twou7aavc71ypxk/intro_to_3br_hma_strategy.mp4?dl=0