DIAD stands for Double In A Day and is inspired by an impressive looking trading manager to be found at https://www.doubleinadayforex.com/. There is an explanatory youtube video at https://www.youtube.com/watch?v=1iul8paae-M.
The commercial DIAD dos a lot of fancy stuff with lot sizing, profit targeting and risk. It looks like a top piece of kit that could be invaluable to those of us trading manually. I had a look at pricing by clicking a 'Buy' button yesterday and it appears the price is $229 but that may be wrong. I asked the coder for a copy to test out in advance of negotiating a discount for SHF members and am testing it out. I will let you all know if it proves useful.
The idea it gave me here are much more simple. Inside the attached zipfile you will find 6 'helper' EA's. Their titles should make their purpose obvious, but play around on demo first to get a feel for what they do.
They are not auto-traders. They are 'helpers' that you apply to the chart once you have decided to take a trade. I have taken to setting a pending order when the market forms a new peak high or low, just beyond the top/bottom sixth of the chart. I simply move the stop order if the price continues to move in the 'wrong' direction and forms a new peak. The idea is to catch the eventual and inevitable escape from the sixth area.
I set a take profit of 100 pips. DIAD gave me the idea of taking extra trades on the way up, moving the stop loss to breakeven plus a few pips to pay for commission etc at each stage. I coded this as a module for HGBnDnSSnFB and it has proven to be a powerful pips harvester; I have adapted it for use here.
As an example of use, imagine that a pair has entered the bottom sixth, so I am going to set a buy stop order just above the sixth area. I want to take a second trade at +30 and a third at +60. I apply the buy stop helper ea and it:
- sends the buy stop order then:
- draws a buy stop line at the order open price + Trade2AtPips (+30) and a breakeven line in between the open market trade and the buy stop line.
- draws a buy stop line at at the order open price + Trade3AtPips (+60) above the market trade open price, then a breakeven line in between the two buy stop lines.
- draws a take profit line 100 pips above the price of the open market trade.
- now imagine that the market rises and leaves the bottom sixth area, triggering the pending trade:
- the market continues to rise and reaches the second trade line. The helper EA sends a second buy trade, then moves the stop loss of both open trades to the price of the second breakeven line. The DiadBreakevenProfitPips input allows you to specify a few extra pips to try to pay swap/commission costs. The position is now risk free, because a retrace to the stop loss will result in the profit on the first trade paying the loss on the second trade.
- if the market continues to move upwards and reaches the third trade line, the helper sends a third buy trade and moves the stop losses of all three trades to the price of the second breakeven point. Should the market reverse and reach the stop losses, trade 2 pays for trade 3 and Trade 1 is the overall profit.
- The take profit of each new trade is set to the price of the take profit line.
- There is no need to divide your normal lot size by three. The only trade that will be exposed to the danger of loss is the initial trade.
The helpers delete the lines once each stage is completed, so there is no chance of trade repetition.
The helpers check that lines are in place and correct at every tick, and replaces them if they become deleted accidentally. The only difference in the code of each individual helper is the type of trade it is ordered to send. They can assume ownership of any existing trade with the same magic number (0 for manual trades) so long as they match the direction of the existing trade. Apply a sell helper to an existing buy trade and you will get chaos, so don't do it.
The second trade line is coloured turquoise by default, and the third is magenta; you have the options in the inputs to set your own colours. Buy lines are dashed and sell lines dotted. You do not have the option to change these and must not do so manually; the helpers are told which direction to trade by the line style. The first breakeven line is blue dash-dot and the second is salmon dash-dot. Here is what a buy stop chart will look like. The take profit line is the solid yellow one.
Here is an example of a buy stop chart, so you can see how yours should look. The arrow shows where the helper placed the the trade 50 pips above the market. You can see how I dragged the stop order down and the lines followed: A sell stop chart will look like this, again with the first stop order dragged to a new position: The helpers are only allowed to send the second trade if there is already a market order in place, and the third if there are already two open market orders. Do not close any of them manually without removing the helper first.
The helpers' job is done once the third trade is open and all three stops have been moved to the second breakeven price. They remove themselves from the chart and sound an alert to inform you. You can disable the alert by setting ShowRemovalMessage to 'false' - find it at the bottom of "General inputs".
Trade2AtPips is the distance from the initial order price to draw the second trade line. Trade3AtPips is the distance from the initial order price to draw the third trade line.
I coded these helpers with my DFC trading in mind. They can be applied to any manual trading where you think they will boost your profits.
--------------------------
Coders, the code in all the helpers is identical; I wrote the code so that all that needs changing is the value of the TradeType variable at line 36. If you add your own chunks of code, here is the easiest way to produce the next 5 variants:
- add and debug your code to one of the helpers.
- change the value of TradeType to reflect the OrderType() you wish to send.
- do a /File/Save As with a filename that reflects the OrderType().
-----------------------
It remains to be seen how useful all this will turn out to be. Play with the helpers and see.