Questions from Beginners MQL5 MT5 MetaTrader 5 - page 559
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Here are the wonders of testing an EA program in MT5 (see picture-file)...Can there be positive eqivity with a negative balance ? and when is the balance negative ? Before turning to Trading Nation changed my mind a lot and never got around to it yet... I think it's time to get some sleep)
If anyone interested in the open code and set let me know ? - I will certainly post it. I have started to master MT5 with hedging and now, - miracles, though)
There are no miracles. There are open positions with a large surplus, and there is a closed position with a loss greater than the size of the balance sheet. There's no downside because there are enough funds to maintain the open positions.
Can you please tell me what my mistake is.
for(int i=0;i<N_Sell;i++) printf("OpenSellTime[%d] = %G",i,TimeToString(OpenSellTime[i],TIME_DATE|TIME_MINUTES)," PriceOpenSell[%d] = %G",i,PriceOpenSell[i]);
The date from OpenSellTime array is not printed and not the second part of the expression - PriceOpenSell.
And, I can't find aboutprintf commandslike%G and%d.
Good afternoon All!)
This is a question for a dummy in programming...
I am trying to compile an EA for a new build. The compiler gives me lots of different errors...
Here is one of them
if(oppositedelete){delete( OP_SELLSTOP);delete( OP_SELLLIMIT);}
There are 2 errors marked in red in this code fragment:'(' - object pointer expected
Having read a bit about the subject of the error, I understood that the name is reserved and I must replace it...
So the question is what to replace it with?
Good afternoon All!)
This is a question for a dummy in programming...
I am trying to compile an EA for a new build. The compiler gives me lots of different errors...
Here is one of them
if(oppositedelete){delete( OP_SELLSTOP);delete( OP_SELLLIMIT);}
There are 2 errors marked in red in this code fragment:'(' - object pointer expected
Having read a bit about the subject of the error, I understood that the name is reserved and I must replace it...
So the question is what to replace it with?
There is this line in the code
Print (";OpenSellTime - ",TimeToString(OpenSellTime[N_Sell],TIME_DATE|TIME_MINUTES), ";PriceOpenSell", PriceOpenSell[N_Sell]);
Why do I get this text in the output:
OpenSellTime - 2015.12.01 11:15
where ";" and the second part is"PriceOpenSell"?
There is this line in the code
Print (";OpenSellTime - ",TimeToString(OpenSellTime[N_Sell],TIME_DATE|TIME_MINUTES), ";PriceOpenSell", PriceOpenSell[N_Sell]);
Why do I get this text in the output:
OpenSellTime - 2015.12.01 11:15
where is the ";" and the second part"PriceOpenSell"?
removed ";" - worked.
The question about printf remains...
How do I correctly send a request to close a counter position?
If I close as before, opposite one, it gets lacquered ))
Already tried everything, still gives error 2016.04.15 13:17:24 Core 1 2016.03.29 09:00:00 failed close position #64 buy 0.81 EURUSD by position #0 [Invalid request]
Which fields to fill and which ones not? I guess it doesn't matter if the position opened is short or long.
Hello, Question about the tester.
I am testing a multicurrency Expert Advisor and I would like to see in the visualizer all the windows on all currency pairs that are being traded.
In the visualizer help it is said about some command "Chart" in the "View" section of the visualizer main menu, which seems to be used to open new charts. But for some reason I don't have "Chart" command at all and, accordingly, I cannot open charts of additional pairs. What is the problem here ?
How do I correctly send a request to close a counter position?
If I close as before, opposite one, it gets lacquered ))
Already tried everything, still gives error 2016.04.15 13:17:24 Core 1 2016.03.29 09:00:00 failed close position #64 buy 0.81 EURUSD by position #0 [Invalid request]
Which fields to fill and which ones not? As far as I understand, it does not matter whether the position is long or short.
Use minimal code - use standard library:
Agent Log: