Forex Trading 2018- TA/FA- Setups and discussion, page-3969

  1. 8,420 Posts.
    lightbulb Created with Sketch. 59
    Ok so here's another instalment on that EA development for you guys.

    In order to validate that the EA works properly when I test it, I need to be able to see when it executes instructions (buys, sells, exits, stoplosses, etc). MT4 has a HA indicator in the custom indicators menu but I haven't used it and don't know whether the moving average if used when the HA bars are turned on are based on the HA high & low or standard high & low.

    SO, I decided to download some data and create a spreadsheet that does all the calculations so I can see when the EA should be executing orders. I chose the NU as suggested by Rick and downloaded 2 years of daily data from this month back to July 2016.

    The spreadsheet is almost complete (I need to add the change of colour criterion to the position exit instruction), but thought it worth sharing the preliminary results.

    The following is an exerpt from the spreadsheet:

    NU HA data.PNG   
    Basically it takes the standard OHLC data & I calculate the HA OHLC & high & low lines as well as the lowest low & highest high of the last 10 bars. Then I calculate when the buy & sell signals occur, and when exits should occur. I have assumed that only one buy is open at a time, ie. if a buy position is already open I do not open another one, I simply wait for the 1st exit condition to occur and then exit. The buys & exits are coloured in green (buy) and red (buy exit) and sells are coloured in red and sell exits in green - essentially what you can see is that when a buy position is exited the condition is there to open a sell position, i.e. the conditions mostly coincide.

    I've calculated the pips profit/loss for each trade, and summed them to obtain an equity curve. The results are shown in the following graph:

    NU HA EqC.PNG

    So the result for the NU over the 2 year sample period is a profit of about 230 pips, although if you look at the equity curve is spends most of the 2 year period in the red. That's neither here nor there, at this stage we're just collecting data and the main purpse of the spreadsheet is to enable validation of correct execution of the EA when it is tested.

    But, just for fun, I thought what if rather than use HA bars, we apply the same rules but to standard bars - interesting result, because its better in this case (see equity curve below) - achieving a profit of about 1480 pips for the 2 year period:

    NU Std EqC.PNG

    I'm gonna do another spreadsheet on the UJ, one of the other markets Rick suggested, to see if the results are comparable, or completely different, and then I'll start testing the EA.

    Stay tuned for further updates.

    Cheers, Sharks
 
arrow-down-2 Created with Sketch. arrow-down-2 Created with Sketch.