Forum

[bug] visual strategy tester freeze and die each time I configure the chart to show ask price

I'm debugging using historical data, after the debugger hit my first break point, I go to "Charts -> Properties -> tick Show ask price line" and immediately the chart visual tester freeze. I need to stop debugging to be able to close the visual tester, if not it doesn't respond to anything at all. I

MT5 backtest bug - close a sell price on gap cause to open a buy position

my EA opens a short position and when reach to a certain profit level it tries to close it. but in this case the tp point is where there is a gap. in real life there shouldn't be a trade at that level. but more strangely asking to close a sell position lead to open a buy position. I wonder with

do we need to separate the function implementation from the class?

I understand that such feature is available in cpp, because the `.h` file and `.cpp` file can be separate and it's to make sure when you include a `.h` file you don't recreate the functions again. but I didn't see any explanation about why in MQL also we need to separate the function implemenation

Is anyway better to works with struct without default constructor?

struct TestStruct { TestStruct( int i, int x); /* data */ int item; }; TestStruct::TestStruct( int i, int x) { item = i; } class TestGround { private : TestStruct _struct; public : TestGround(); ~TestGround(); void Call(); }; TestGround::TestGround() : _struct( 0 , 0 ) {

is mql4 and mql5 still is different?

I've read some post that MQL5 is merged into the MQL4 but still couldn't find a definitive answer that what language I should write my code? checking the documentations, for example, for `ENUM_INIT_RETCODE` the number of item in the enum is different https://docs.mql4.com/basis/function/events