Index futures automation

Discussion in 'Journals' started by hilmy83, Jul 3, 2022.

Can a fully automated trading strategy work in the long run?

  1. YES!

    56 vote(s)
    66.7%
  2. Hell naw.

    15 vote(s)
    17.9%
  3. I don't know, I got my own trading to worry about.

    13 vote(s)
    15.5%
  1. hilmy83

    hilmy83

    #311     Apr 18, 2023
  2. hilmy83

    hilmy83

  3. hilmy83

    hilmy83

  4. hilmy83

    hilmy83

    Finally got back from my dev lol

    I investigated the problem. Indeed we know that the partial filling of reverse order may produce several deals like "out"; "out/in"; "in" instead of one deal of "out/in" type. Last release I'd corrected the version 5.5 so that it counts two types of deals: "out"; "out/in" (not only "out/in").

    But April 17 we see the similar situation: the EA becomes "blind" for the [negative] profit of the "out" deal #22776861 BUY 4.0 ($-156.00) 08:33:32 (13:33:32). I find only one explanation: when broker exchanged the deal BUY 4.0 then that position (SELL 4.0) was fully finished by MT5 terminal's executing system. Then the terminal MT5 opened "new" position with new ID by the broker's technical deal #22776862 BUY 4.0. It's outrageously if it's indeed so. After all, in fact, this is the same position (in the conditions of netting-account), it's just subjected to a reverse. So that position must have the same position's ID.

    So now we must very complicate the EA by functions of connecting "different" sequental positions (with different positions' IDs) to correctly calculate the process' entire profit. It's necessary for correct target placing in conditions of "full" closure of some positions (zero-position producing) by partial filling of reverse STOP-orders.

    Basically it seems that if the netting results in zero net position, a new order ID is assigned that causes the algo to misprice the target.

    Hopefully it's the right fix this time
     
    Last edited: Apr 21, 2023
    #314     Apr 21, 2023
  5. hilmy83

    hilmy83

  6. Hopefully. Here's a good article for him.
     
    #316     Apr 21, 2023
    hilmy83 likes this.
  7. hilmy83

    hilmy83

    You're a programmer yourself? I should just hire you :D
     
    #317     Apr 21, 2023
  8. I'm not a programmer by profession, though I have studied and programmed in a variety of languages including Fortran, Pascal, FoxPro, C# and R. I took 2 Udemy courses in MQL5 in the summer of 2021 and in August I started paying my dues, learning the ins and outs of futures netting account trade management. My 1st EA, that worked perfectly in demo mode, went haywire in live trading. It somehow entered into a loop that cost me $535 in commissions and the spread, opening and immediately closing MNQ and M2K, all in a couple of seconds. More lessons, each of a different nature, followed. The only way to learn is through live trading.
     
    #318     Apr 22, 2023
    shuraver, Sekiyo, Pica550 and 2 others like this.
  9. hilmy83

    hilmy83

  10. hilmy83

    hilmy83

    #320     Apr 25, 2023
    Sekiyo likes this.