0

When I was optimizing my EA, it always close any remaining positions for me.

But I think it will yield "inaccurate" results because the trades are "not finished".

The system might close an otherwise profiting trades "prematurely"!

Is there a way to disable the "Close at Stop" mechanism so the final trades are "ignored"!?

I just want to know what's the result "up to the last trade".

Much appreciated!

PS. I had tried searching for fxcm mt4 how to disable "close at stop" in ea from Google to no avail, I also tried to look through the MQL4 Reference and failed to find anything neither.

PiggyChu001
  • 440
  • 6
  • 20
  • No direct way to do that – Daniel Kniaz Mar 17 '20 at 13:16
  • @DanielKniaz Could you PLEASE be so kind and teach me the "indirect" way!? Much appreciated! – PiggyChu001 Mar 17 '20 at 13:41
  • Please describe your problem in detail... Two approaches are: to block undesired trades (probably using a script, so you run a test, save report, cut list of trades that are closed at last tick of last test day and paste into a log file, finally run the same test and block bad deals). quite complicated. another way is to loop over the deals in `OnTester()`, cut undesired and apply the required statistical gymnastics with the desired dataset and save as html, most likely without a picture of equity curve. – Daniel Kniaz Mar 17 '20 at 18:25

1 Answers1

0

The error usually occurs when the needed margin (plus current drawdown) gets higher then account balance.

In most cases, you can avoid the error message by setting the balance much higher and/or lowering the lotsize.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/30334544) – JR96 Nov 16 '21 at 16:21