Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1088

 
MrBrooklin:

Thank you very much to everyone who responded to my question!

I just had another conversation with my forex dealer "PSB-Forex" and finally figured out what the problem is, namely why the strategy tester does not work on a ruble account. The problem is that the forex dealer PSB-Forex does not provide its clients with such a trading instrument as the currency pair USD/RUB.

Regards to all, Vladimir.

But there is a pair USD/RUR!

 
Andy:

Open demo: File-Open account-MetaQuotes-Demo

Go to: File-Connect to Trade Account-Select Account

I have done everything as you advised.

I have managed to replace RUB with RUR in the strategy tester, but everything has remained the same during testing.

Thanks for the help, once again!

Regards, Vladimir.

 
Vladimir Karputov:


Vladimir, why do you need to connect to the MQ demo account?

The check of the current version of MT shows 2085, while the standalone MQ terminal was updated to 2093 (if I'm not mistaken) immediately upon launching. Why are you dancing with such a tambourine? If 2093 is stable version, why other terminals can't see it?

By the way, MQ terminal shows that both latest stable and latest beta are installed. ????????

 
Сергей Таболин:


The newest versions are always on the MetaQuotes-Demo server. Dano has noticed - that if something does not work for a user, in 99% of cases the user is not just sitting on an old build, but on a very, very old one.

 

Just now the terminal itself updated to build 2093, but in the strategy tester this appeared



Can I change everything to Russian?

Regards, Vladimir.

 
MrBrooklin:

I just updated the terminal itself to build 2093, but in the strategy tester I got this



Can everything be changed to Russian?

Regards, Vladimir.

Maybe in the next beta version they will release a translation and make a nicer font. Right now this new menu is only in English.

 

Hello everyone! I'm coming back to you for advice, and I'm sure it's been done before... In the terminal settings you can set the deviation for everything at once, but the Expert Advisor trades on different instruments and needs different values. For opening/closing orders the standard solution from Trade.mqh is used. We tried to use something like

SetDeviationInPoints(const ulong deviation) { m_deviation=deviation; }

did not work, apparently, it is done somehow differently. In other words, how can we call void from Trade.mqh?

 
Anzhela Sityaeva:

Hello everyone! I'm coming back to you for advice, and I'm sure it's been done before... In the terminal settings you can set the deviation for everything at once, but the Expert Advisor trades different instruments and needs different values. For opening/closing orders the standard solution from Trade.mqh is used. We tried to use something like

did not work, it must be done somehow. In other words, how can we call void from Trade.mqh?

First, you need an .mqh file.

You will get the first line of the example.

#include <Trade\Trade.mqh>
CTrade trade;

Complete the second one. You can also write everything by hand.

And then

 trade.SetExpertMagicNumber(magicNumb);
or any other method.
 
Alexey Viktorov:

First you need an .mqh file

You will get the first line of the example

Finish the second one. You can also write everything by hand.

And then

or any other method.

Yes, but Trade.mqh is connected. The bool is called with no problem like this:

trade.PositionOpen( ...

When setting a deviation, void is used and cannot be called in the same way.

 
Anzhela Sityaeva:

Yes, but Trade.mqh is connected. The bools are called without any problems like this:

The deviation setting uses void and can't be called in the same way.

I don't see trade in this line.

Forum on trading, automated trading systems & strategy testing

FAQ from Beginners MQL5 MT5 MetaTrader 5

Anzhela Sityaeva, 2019.07.08 15:48

Hello guys! Again to you for advice and it's probably already passed... In the terminal settings you can set the deviation for everything at once, but the Expert Advisor trades on different instruments and different values are needed. For opening/closing orders the standard solution from Trade.mqh is used. We tried to use something like

SetDeviationInPoints(const ulong deviation) { m_deviation=deviation; }

did not work, it must be done somehow. In other words, how can we call void from Trade.mqh?

Ahhh sorry, it's a string from SB.

So, set it in the same way before opening a position

trade.SetDeviationInPoints(123);


Reason: