Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1070

 
erotin:


I used the following class
CTrade m_trade;
and the function
m_trade.Buy
I used to get these annoying requotes, especially in multicurrency, even on demo server, despite all sorts of dancing with RefreshRates, slippage, the problem did not disappear.

Then I have moved to the
CTrade trade class;
and a function
trade.PositionOpen
I have not seen any requotes anymore. Maybe it can help you too

https://www.mql5.com/ru/code/16350

These are different methods of the same class. You haven't moved anywhere:)

It's just that the PositionOpen method requires to set parameters of the position to be opened, while the Buy methodopens with the set parameters by default. That's the difference.

 
Artyom Trishkin:

These are different methods of the same class. You haven't moved anywhere:)

It's just that the PositionOpen method requires to set parameters of the position to be opened, while the Buy methodopens with the set parameters by default. That's the difference.

Don't get in the way. The circus is gone and there's nowhere to go.

 

how to create USDEUR ?

 
molodets:

how to create USDEUR ?

flip EURUSD

 
Roman Sharanov:

flip the EURUSD

Like smart?


You don't need a mirror quotes.

We need a synthetic.

 
molodets:

like smart?

this is the topic here. instead of an answer they are trying to ....

To solve this problem: right-click on EURUSD in "Market Watch", select "Symbols Ctrl+U" in the context menu, then click Create Symbol and fill in the fields Symbol = USDEUR and below the field Synthetic Instrument Formula = 1.0 / EURUSD , then OK - OK, in the "Market Watch" window the USDEUR symbol will appear

or use the library to programmatically create a synthetic instrumenthttps://www.mql5.com/ru/forum/212096/page6#comment_9791450

Библиотеки: Symbol
Библиотеки: Symbol
  • 2018.10.30
  • www.mql5.com
Symbol: Автор: fxsaber...
 
Igor Makanu:

this is the topic here. instead of an answer they are trying to ....

on the subject: right-click on EURUSD in "Market Watch", select "Symbols Ctrl+U" in the context menu, then click Create Symbol and fill in the fields Symbol = USDEUR and below the field Synthetic Instrument Formula = 1.0 / EURUSD , then OK - OK, the USDEUR symbol appears in the "Market Watch" window

or use the library to programmatically create a synthetic instrumenthttps://www.mql5.com/ru/forum/212096/page6#comment_9791450

Thank you.

Too bad you can't trade them.

maybe there are owls [advisors] out there?

to trade them.

or codes that can be plugged into my owl.
 
molodets:

like smart?


I don't need a mirror quotes kind of thing.

You need a synthetic.

You have been correctly answered: "flip the EURUSD".

And if you don't know that it's not possible to flip the monitor without using an indicator, but mathematically-programmatically, it doesn't give you the right to be rude to people - the problem is your lack of understanding.

Clones are not allowed here.

 
Artyom Trishkin:

Clones are not allowed here.

Is it a shame to ask stupid questions under your own name?))

 

I wanted to spread the classes across 2 inludes, but I can't get rid of the problem of usingenum in both .mqh files

there's file 1.mqh:

enum        ENUM_DEAL_TYPE{NONE,BUY,SELL}
class A
{
        ENUM_DEAL_TYPE type
};

and file 2.mqh:

enum        ENUM_DEAL_TYPE{NONE,BUY,SELL}
class B
{
        ENUM_DEAL_TYPE type
};

When I attach it to the main code, I get an error

enumeration already defined 2.mqh

see previous declaration of'ENUM_DEAL_TYPE'

as far as I understand the "Conditional compilation (#ifdef, #ifndef, #else, #endif)" directive is needed - never had any experience here, hard going ((
Reason: