Designing an Automated Trading Program

Discussion in 'Journals' started by expiated, Dec 16, 2018.

  1. expiated

    expiated

    Yeah, I use SMA envelopes for this, and chop is not really a problem trading manually because I scalp the range using a one-minute chart setup. I could probably program an EA to do the same thing, but I'll need to wait to see if MT4 will give me the data for 1- and 5-minute charts once markets are open again.
     
    #131     Feb 17, 2019
  2. expiated

    expiated

    I could only go by the information that was available to me, but userque was definitely correct. Having the expert advisor draw the indicators that determine trade execution turned out not to be a problem at all, so I find it curious that this does not seem to be a standard practice.
     
    #132     Feb 18, 2019
    userque likes this.
  3. expiated

    expiated

    Note to Self:
    This was another 4-Hour strategy. It has been the best so far, and is being archived as 4-Hour Numerical Price Prediction Algorithm No. 15.

    4-Hour Numerical Price Prediction Algorithm No 15.png

    Based on Version No. 15, I thought making the modification I applied to Version No. 16 (below) would make the strategy more profitable. Though I do not like the way the chart unfolded as well, the fact of the matter is that from an objective standpoint, it DID lead to a higher return.

    OANDA - MetaTrader.png
     
    Last edited: Feb 18, 2019
    #133     Feb 18, 2019
  4. expiated

    expiated

    Authorization Channel.png

    Before 2018 it was my contention that scalping was the only way I could trade successfully on a consistent basis, but I don’t think this is the case any longer, and attempting to get the expert advisor I requisitioned last week to return a profit has added to my comfort with longer-term charts by having possibly provided me with additional insight regarding price action within the context of a four-hour framework.

    Another thing it has done is suggested to me that I ought to resume making use of an “authorization channel,” an idea I began toying with last month.

    Based on the four-hour expert advisor, there is a specific moving average envelope I should set in stone for this purpose. Attempting to automate trading in this timeframe has also resulted in my accomplishing something that I have desired for just about forever, but had never been able to manage to my satisfaction.

    I have always wanted to define a trending market by slope, but never came up with an effective and objective way of doing so. However, by taking the difference between a specific moving average between two given time periods, dividing the difference by the time interval in between (in units of an hour or fractions of an hour), and multiplying the quotient by 10,000, I am now considering a trending market one in which the resulting figure is greater or less than a positive or negative 1.15 respectively.

    And despite the fact that I have been unable to program the expert advisor to avoid letting chop cut into what would otherwise be steadily climbing charts (see previous post), a look at the setup I’m using in real time makes it clear that there is really no reason this obstacle cannot be overcome when trading manually. It’s rather obvious when there is a pullback in price action so that a trader ought to be able to exit positions in a timely fashion rather than wait to be kicked out of positions by a stop loss.
     
    #134     Feb 19, 2019
  5. expiated

    expiated

    I think I’ve gotten as much as I’m going to get out of this first expert advisor (EA) I designed. It’s too “stupid” to take over the actual trading for me, so I’m glad I “stuck to my guns” and did not pay any more for its creation than I did.

    Having finished my analysis, I made three trades last night based on my new four-hour chart setup after corroborating what I believed I was looking at using my already established one-hour chart setup.

    ScreenHunter_3738 Feb. 19 08.56.jpg
     
    #135     Feb 19, 2019
  6. expiated

    expiated

    The quotient must be multiplied by 100 when dealing with yen pairs.
     
    #136     Feb 19, 2019
  7. expiated

    expiated

    Now that I switched from using my Tickmill platform to my OANDA platform (whose tester wasn’t working so well over the weekend, but seems to be performing just fine now that the markets are open again), I am able to test my expert advisor using lower time frames.

    The results led me to go back and reread Cheesy’s earlier post, which I now understand completely (the text was not quite clear to me before).

    I actually began toying with the exact technique he described about a month ago, except that I called it an “authorization channel” and actually drew the envelopes (no fancy color-changing moving averages for me).

    Testing the lower time frames just now revealed exactly where I need to tell the EA not to make trades—a limited area directly above and below my main trigger line. (See the yellow ellipses in the image below.)

    Chop Zone.png

    This is where the EA has been executing trades that have been eating up the gains made by what I believe would otherwise be an extremely profitable automated trading system.

    It looks like either fiverr or upwork will be getting some repeat business from me now.
     
    #137     Feb 19, 2019
  8. expiated

    expiated

    The NPP Robot as presently conceived:

    USDJPYH1.png

    This is not the genuine setup. It's just a mock representation of the concept. I should be receiving delivery on the EA in a day or two.

    Long positions are to be entered when the white moving average crosses above the bold PURPLE moving average from below, and exited when the white moving average makes contact with the DASHED purple moving average (at the top of the configuration) OR when the white moving average crosses below the RED moving average from above—whichever happens first!

    Short positions are to be entered when the white moving average crosses below the bold ORANGE moving average from above, and exited when the white moving average makes contact with the DASHED orange moving average (at the bottom of the configuration) OR when the white moving average crosses above the RED moving average from below—whichever happens first!
     
    #138     Feb 20, 2019
  9. expiated

    expiated

    Though the best four-hour algorithm I could come up with using the initial rendition (version no. 16) of my numerical price prediction expert advisor was based on the same principles I use when trading manually, the chart configuration was quite different from the final setup I settled on last month.

    I am therefore curious to see how well or poorly I will do if I try using this new chart structure manually, which is what I’m planning to do until the final version of the numerical price prediction expert advisor is determined.

    ScreenHunter_3747 Feb. 20 18.55.jpg
     
    Last edited: Feb 20, 2019
    #139     Feb 20, 2019
  10. expiated

    expiated

    The coding service has informed me that my EA will not be available today (as scheduled) so I might have to wait until next week before I can begin testing.

    ScreenHunter_3765 Feb. 21 20.59.jpg
     
    #140     Feb 22, 2019