Orders cant be placed

Discussion in 'Automated Trading' started by hilmy83, Jul 20, 2022.

  1. hilmy83

    hilmy83

    I'm pulling whatever's left of my hair trying to figure out why my trading algo cant place trades on the micro dax (FDXS). It works just fine on mes,mnq,mym. But for some reason, it goes into a loop to try to place trades on FDXS chart. This is a backtest and i tried live test yesterday, same issue

    I've alread verified i have eurex access cause i can place trades manually. Anyone an expert in MQL5 can help me figure this out?

    So the algo just keeps looping trying to places trades

    1.jpg

    Running debug shows no errors

    2.jpg
     
  2. hilmy83

    hilmy83

    This is the same EA running just fine on the mes,mnq,mym,m2k without errors/no looping. trades placed as expected.

    3.jpg
     
  3. I see that you also got errors with MNQU22, MESU22 and MYMU22. These are stop limit entries, so there could be errors if current price is within a certain range of the limit.

    Start by placing a limit order for FDXS in OnInit() (comment out OnTick function) and see if the order is accepted. Then progress to stop limit entries.
     
  4. hilmy83

    hilmy83

    what errors do you see? all the orders were placed and accepted. Plus these are all stop orders initially, not stop limits.

    upload_2022-7-20_22-43-44.png
     
  5. Yes, sorry, I meant stop entries. The errors I was referring to were :

    upload_2022-7-20_20-57-12.png

    I don't use stop orders, but I believe an error can be generated if the stop price is too close to the current price. Try entering orders in OnInit.
     
  6. Just guessing here, but could it be related to currency? All trades which execute correctly note in USD, whereas FDXS notes in EUR. Is your account able to trade in EUR?
     
  7. hilmy83

    hilmy83

    had to enlist the help of another programmer. looks like it works. Need to study the code more closely

    but at least now i can add the dax into the mix.

    upload_2022-7-21_10-50-14.png