Errors, bugs, questions - page 2527

 
Vict:

Thank you. It is possible, in principle. But I wanted to consistently run a set of tests from a shell script.

Well, there's nothing stopping you from running it in series. Or even in parallel on different charts.

Only it seems that there was a problem with the scripts. Need to make an EA that kills itself (and the chart with it).

Ps: here it is
 

OrderCalcMargin stops working in indicators, in scripts it works in Expert Advisors, it also works in indicators says

(4014 System function is not allowed to be called)

It means that we can't calculate margin in an indicator ??????????


 
Vladimir Pastushak:

OrderCalcMargin stops working in indicators, in scripts it works in Expert Advisors, it also works in indicators says

(4014 System function is not allowed to be called)

We cannot calculate margin in an indicator ??????????

https://www.mql5.com/en/blogs/post/719643

Instant estimation of profit, margin level, drawdown on MetaTrader charts
Instant estimation of profit, margin level, drawdown on MetaTrader charts
  • 2018.07.16
  • www.mql5.com
I'm sure all of you use the crosshair tool on MetaTrader's charts. It's very useful to measure distance in bars or points between 2 spots. Yet I was always wondering, why it does not provide an option to show profit value, margin level, drawdown or gain percentage in addition to points. To remedy this problem I've developed a MQL program, which...
 
Andrey Khatimlianskii:

Well, there's nothing stopping you from running it in series. Or even in parallel on different charts.

Only it seems that there was a problem with the scripts. Need to make an EA that kills itself (and the chart with it).

Ps: here.

I see.

fxsaber, thank you for your efforts. I ran through your code, why do you use \r\n instead of \n ?

#define  STRING_END "\r\n"

The convention is that everyone uses \n in the code, and it is converted from the OS dependent end-of-line representation in I/O operations.

 
Vict:

I ran through your code, why do you use \r\n instead of \n?

Because it doesn't work otherwise.

 
fxsaber:

Because it doesn't work otherwise.

Yeah, I'm dumb. You write it in a binary. I'm used to Windows and its \r\n, so it just caught my eye.

 
Vict:

Yeah, I'm dumb. You write it in a binary file. I'm getting used to the \r\n vin, so it's kind of catching my eye.

This is because it's not immediately possible to come up with such a twist to write strings in a binary file.

But, as it turns out, it's convenient and concise.

 

There is a problem in MT5 - when running in portable mode (I don't use other ones) the tester doesn't pick up the actual file from the new code written - it writes that either there is no file or it uses an old version of the file from the Tester directory.

#property tester_file"PredFind\\Pred_Brut\\Test_Pred.csv";

It helps to see the file by restarting the terminal.

 
Has anyone had a problem with an invisible trade hanging in the terminal that uses margin but is not displayed?
 
Альжан Рахым:
Has anyone had a problem that there is an invisible trade hanging in the terminal that uses margin but is not displayed?

perhaps a pending order on crypto uses margin

Reason: