Forum

How Are Points Selected in the Balance & Equity Graph of a Backtest

Hi everyone, I want to know that how are points selected in the balance & equity graph of a backtest in MT4/MT5. For example, in a balance & equity graph , we can find continuous points A, B, C in a balance & equity graph. Point A: Balance $1000, Equity $1000, Time 09.10.2020 18:00 The next point B

What is the default value of order ticket? Is checking order ticket's value a proper way to confirm a market order is filled?

Hi everyone! I am using CTrade library to open a long position at the market price then get the order ticket number. The CTrade document says "Successful completion of the PositionOpen(...) method does not always mean successful execution of the trade operation.", so I want to check if the order is

[Plz help] New bar detection function in an indicator doesn't work in backtest visual mode

Hi everyone, I have a problem as follows. When I use the function isNewBar_up() to detect a new bar in higher-level chart in a self-made indicator in real time it works well. The functions comes from here: https://www.mql5.com/en/articles/159 However, when I run some backtest in visual mode(model

Please Help: I modified MT4's DMI+ADX indicator but one line is not displayed

Hi everyone I modified MT4's official DMI+ADX indicator( https://www.mql5.com/en/code/7955 ) to make it same as other other platforms. The change is, MT4 calculates the EMA of (±DM/TrueRange) for ±DI while my version is to calculate EMA of ±DM and TrueRange separately then divide them. The ADX part

What's the timing of an OrderClose()'s result being returned?

Hi everyone. I hope you are fine. I have a question: What's the exact timing of an OrderClose()'s result(true/false) being returned? In the following code, will the result of OrderClose() be immediately returned in row1, so we can use it in row2 within the same tick ? Or shall we wait for the order