Forum

Who can help tell why the code can't show "rectangle"?

With the code below, I want to show a rectangle frame around the latest 3 bars. Who can help tell why the code can't show the "rectangle frame"? I couldn't find the root cause. Also attached the print log below for reference. Maybe you can copy the code below as an indicator for try too

How to prevent this happen while trading?

I don't want big slippage happen while opening or closing orders. However, the slippage is still often much higher as over "10" although I set "slippage=3" already. Now that the slippage in "OrderSend()" and "OrderClose()" don't work at all, why MQ team added it as the function parameters? How can I

Double confirming the calculation method

a. Double confirm with you that it's not necessary to use '2' below but ok to use '1' below to compare for "int" types. Correct? 1. if (a > b) 2. if (a - b > Point / 2.) b. How many digits does the number precision reach while need to use '2' for comparing

What are the possible reasons?

The same EA I made can place “OrderModify()” in other brokers, but can’t at 1 broker from the second time of modification. I checked my code and the broker's environment and can confirm no issue in my code. So please note that this topic is to check possible reasons out of code. What are the

Professors, Professors, please help, so Confused on the code execution !!!

So frustrated I haven't any idea how this happened! The code ran on 2 brokers for 3 months. Today the issue below suddenly happened at 1 broker. Please refer to the log and code below. The code should run sentence by sentence based OnTick. However, please refere to the time marked in yellow. Why

Is the File Name Wrong?

When open a file, get the error "5002". Use "Print()" the file name, got "C:\Users\900077605\AppData\Roaming\MetaQuotes\Terminal\3222703EF955C10T7523LJHO8922D2\Info.csv" Could you please help tell what is the name problem? Thanks

How to get Used Margin of an order?

It's not easy to see the used Margin of an order if there are a few orders opened. 1. Is there a simple way to get the used Margin of an order? 2. If there is a short order of "Eur/Gbp" and my account money is "Usd", should I use the bid or ask price of "Eur/ Usd " to calculate the used margin? 3

Where can I find the difference instructions of these functions?

Where can I find the difference instructions of the functions below? I didn't find the differences even though I tried to print the return values. 1. Between DoubleToStr() and DoubleToString()? 2. Between CharToString() and CharToStr() ? 3. Between StringGetCharacter() and StringGetChar()? You can

Believe this needs an expert familiar on the arrays of Structure !!!

Please refer to the screenshot below. Why does the "Experts Log" always say "array out of range" even though I changed "symbolCount" in line 37 into '0'? Below is the complete code. #property strict input string ExClude= "#" ; input string Prefix= "" ;

what is the good way to detect if a symbol is existing?

What is the good way to detect if a symbol is existing? E.g. How to detect if "EurUsd.Pro" is existing or not