Designing an Automated Trading Program

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

  1. expiated

    expiated

    At 1.1345 EURUSD has the right structure to head south, so I will be interested to see if it actually does so.
     
    #31     Dec 18, 2018
  2. expiated

    expiated

    So in light of this outcome and my earlier observation regarding trades made through Tickmill, I might opt to execute trades ONLY when the stats are "perfectly" aligned. Such opportunities usually present themselves several times a day.

    ScreenHunter_2850 Dec. 17 23.03.jpg
     
    #32     Dec 18, 2018
  3. expiated

    expiated

    I have something new in the works, but will only be able to test it at opportune moments, so in the meantime, I'm just doing the same thing as before over at Nadex...

    ScreenHunter_2853 Dec. 18 11.54.jpg

    Unless CADJPY is at this time ready to reverse course and head north, the new numbers I'm crunching suggest that this move ought to lead to a successful trade...

    CADJPYM5.png
     
    Last edited: Dec 18, 2018
    #33     Dec 18, 2018
  4. expiated

    expiated

    It took six consecutive losing trades to stumble across a revelation that I believe might hold promise, so perhaps it will be worth it in the long run...

    ScreenHunter_2855 Dec. 18 16.45.jpg

    At this time I'm just waiting for the tactic/technique to give me permission to go long AUDJPY, NZDJPY and CADJPY.
     
    #34     Dec 18, 2018
  5. expiated

    expiated

    The go ahead came while I was rebooting my laptop and then got distracted, so I missed my opportunity to profit from NZDJPY...

    ScreenHunter_2858 Dec. 18 19.07.jpg

    But hopefully I did not get in too late with AUDJPY and CADJPY.
     
    #35     Dec 18, 2018
  6. expiated

    expiated

    The "something new" points to an opportunity in EURAUD

    EURAUDM5.png

    I have heard candlestick charts conceptualized as telling a story in a very clear, effective manner—providing information with just a glance, and yet, inviting scrutiny that is rewarded with the understanding of a narrative—which I thought was a rather deft analogy.

    However, the something new I am exploring sees the use of charts as more of a dance, where if you know the moves, you can anticipate and flow with your partner. I just finished coding indicators specifically designed to mesh with this new outlook, which reveals the logic behind my EURAUD entry...

    ScreenHunter_2859 Dec. 19 00.38.jpg

    Which did indeed turn out to be a successful trade...

    ScreenHunter_2860 Dec. 19 00.57.jpg
     
    Last edited: Dec 19, 2018
    #36     Dec 19, 2018
  7. expiated

    expiated

    I think my work is done. I have no additional comments about this setup except that I'm not sure how I arrived at it. I thought I had a final setup before and was happy with it, so how or why this one evolved, I'm not sure.

    I modified its configuration as it appeared in my last post so that it looks like the image below now, but there was nothing wrong with the setup I had before this "something new" revelation, so the fact that I feel this second "final" chart is even better means there is nothing else for me to do now but trade it.

    EURJPYM5.png

    P.S. I think this "second final" setup is also going to make the task of writing the rules for an automated system much simpler.
     
    Last edited: Dec 19, 2018
    #37     Dec 19, 2018
  8. expiated

    expiated

    Here the rules as currently conceptualized would execute a buy, not only of AUDJPY, but of AUDUSD, CADJPY, NZDJPY and NZDUSD as well.

    AUDJPYM5.png

    Pairs to sell would be USDCAD, EURAUD, GBPJPY and GBPUSD.
     
    #38     Dec 20, 2018
  9. expiated

    expiated

    There was one losing trade due to NZDJPY reversing direction almost immediately following the trade.

    ScreenHunter_2862 Dec. 20 05.21.jpg

    Indeed, this trade might not have even been entered by an automated system given that there was never a candlestick that both opened and closed above the trigger line. (Yes there was, but this is the wrong chart! I mistakenly captured the image of NZDUSD when I was supposed to be showing NZDJPY.)

    ScreenHunter_2863 Dec. 20 06.13.jpg

    If moving averages are what they are touted to be—powerful visual trend-spotting tools—then it seems to me that logic would dictate it is impossible for all moving averages to convey the actual/ultimate direction of a given exchange rate with the same degree of accuracy. Some moving averages must certainly do this job better than others, with one moving average doing so best of all.

    Consequently, I forego the use of standard moving average settings (i.e., the use of 10-, 20-, 50-, 100-, and 200-period parameters) and focus instead (in effect) on one carefully selected measure per timeframe.

    So had the system purchased NZDUSD where the first circle was drawn, it would have immediately exited when the rate fell below the trigger line instead of waiting to be stopped out. (This will probably have to be adjusted/fine tuned to deal with choppy market conditions.)

    It would have entered a short position instead, and remained short until the second circle, where it would have purchased the asset and remained long until the third circle. Hence, today’s activity would have generated even greater gains than it did, because trades would have been made in both directions, and profits would have run instead of positions being exited when pre-selected take profit targets were hit.
     
    Last edited: Dec 20, 2018
    #39     Dec 20, 2018
  10. expiated

    expiated

    I was for the most part satisfied with today’s performance and therefore began entertaining the possibility of paying someone to code the framework of an expert advisor that I can modify with specifics later on so that they are not able to go off and market my system on their own without sharing the revenue from its sales with me.

    ScreenHunter_2863 Dec. 20 14.54.jpg

    But I have never coded or used an expert advisor myself, so I will have to research how they are used in specific detail before I begin shopping for a coder to do this for me so I can better describe what I need.

    In the meantime, in preparation, I have initiated the task of quantifying the decision-making process that will reproduce or improve upon the results I observed this morning. I thought this would be pretty easy (since the system is so simple) but it actually took me several hours to finish this first step. This is what I’ve come up with so far…

    (Obviously, the color scheme does not match the image from my previous post.)

    Automated trading rules:

    Buy when the blue, green and red moving averages are sloping upward. Sell when they are each displaying a negative slope.

    You can enter long positions when the candlesticks begin forming south of the red moving average, but wait until they began turning north again before doing so—ideally after they are accompanied by a hook in the black moving average following contact with the lower band of the maroon-colored simple moving average envelope.

    The take-profit target will be the opposite (top) band of the same envelope if trading aggressively, or the halfway point if trading more conservatively. The stop loss should be equal to half the distance to this opposite band. However, do NOT exit the trade, even after the take-profit target is hit, if there is no reversal in price accompanied by a second hook in the black moving average. Remain in the trade until such an event occurs.

    (Of course, the reverse of all the above applies when the market is bearish.)

    Note however that if an asset is trending sharply, candlesticks will not form below the red moving average. You will know this is the situation when the bottom of the dark slate gray envelope plots to the outside of the top of the light coral envelope. Under these conditions, do NOT exit the position AT ALL until the black moving average once again makes contact with the red moving average. (In other words, under these circumstances, you will want to let your profits run!)

    (Again, do the opposite in bearish markets.)
     
    #40     Dec 21, 2018